mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 23:34:47 -05:00
Move everything into std subdir
This commit is contained in:
parent
a355f7c807
commit
151ce0266e
273 changed files with 0 additions and 142 deletions
|
@ -1,32 +0,0 @@
|
|||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
import { xrun } from "../prettier/util.ts";
|
||||
import { red, green } from "../fmt/colors.ts";
|
||||
|
||||
/**
|
||||
* Checks whether any source file is changed since the given start time.
|
||||
* If some files are changed, this function exits with 1.
|
||||
*/
|
||||
async function main(startTime: number): Promise<void> {
|
||||
console.log("test checkSourceFileChanges ...");
|
||||
const changed = new TextDecoder()
|
||||
.decode(await xrun({ args: ["git", "ls-files"], stdout: "piped" }).output())
|
||||
.trim()
|
||||
.split("\n")
|
||||
.filter(file => {
|
||||
const stat = Deno.lstatSync(file);
|
||||
if (stat != null) {
|
||||
return (stat as any).modified * 1000 > startTime;
|
||||
}
|
||||
});
|
||||
if (changed.length > 0) {
|
||||
console.log(red("FAILED"));
|
||||
console.log(
|
||||
`Error: Some source files are modified during test: ${changed.join(", ")}`
|
||||
);
|
||||
Deno.exit(1);
|
||||
} else {
|
||||
console.log(green("ok"));
|
||||
}
|
||||
}
|
||||
|
||||
main(parseInt(Deno.args[1]));
|
|
@ -1,8 +0,0 @@
|
|||
parameters:
|
||||
exe_suffix: ""
|
||||
|
||||
steps:
|
||||
- bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-write --allow-read --allow-env ./format.ts --check
|
||||
- bash: export START_TIME=$(date +%s)
|
||||
- bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-net --allow-write --allow-read --allow-env --config=tsconfig.test.json ./testing/runner.ts --exclude node_modules,**/testdata
|
||||
- bash: deno${{ parameters.exe_suffix }} run --allow-run --allow-read .ci/check_source_file_changes.ts $START_TIME
|
|
@ -1,5 +0,0 @@
|
|||
steps:
|
||||
- bash: npm install eslint@$(ESLINT_VERSION) typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin@$(TS_ESLINT_VERSION) @typescript-eslint/parser@$(TS_ESLINT_VERSION) eslint-config-prettier
|
||||
- template: ./template.unix.yml
|
||||
- bash: npx eslint "**/*.ts" --max-warnings=0
|
||||
- template: ./template.common.yml
|
|
@ -1,8 +0,0 @@
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '10.x'
|
||||
- bash: npm install eslint@$(ESLINT_VERSION) typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin@$(TS_ESLINT_VERSION) @typescript-eslint/parser@$(TS_ESLINT_VERSION) eslint-config-prettier
|
||||
- template: ./template.unix.yml
|
||||
- bash: npx eslint "**/*.ts" --max-warnings=0
|
||||
- template: ./template.common.yml
|
|
@ -1,3 +0,0 @@
|
|||
steps:
|
||||
- bash: curl -L https://deno.land/x/install/install.sh | sh -s $(DENO_VERSION)
|
||||
- bash: echo '##vso[task.prependpath]$(HOME)/.deno/bin/'
|
|
@ -1,8 +0,0 @@
|
|||
steps:
|
||||
- bash: npm install eslint@$(ESLINT_VERSION) typescript@$(TS_VERSION) @typescript-eslint/eslint-plugin@$(TS_ESLINT_VERSION) @typescript-eslint/parser@$(TS_ESLINT_VERSION) eslint-config-prettier
|
||||
- powershell: iwr https://deno.land/x/install/install.ps1 -out install.ps1; .\install.ps1 $(DENO_VERSION)
|
||||
- bash: echo "##vso[task.prependpath]C:\Users\VssAdministrator\.deno\\bin"
|
||||
- bash: npx eslint "**/*.ts" --max-warnings=0
|
||||
- template: ./template.common.yml
|
||||
parameters:
|
||||
exe_suffix: ".exe"
|
21
LICENSE
21
LICENSE
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright 2018-2019 the Deno authors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,25 +0,0 @@
|
|||
variables:
|
||||
DENO_VERSION: "v0.20.0"
|
||||
TS_VERSION: "3.4.5"
|
||||
ESLINT_VERSION: "6.5.1"
|
||||
TS_ESLINT_VERSION: "2.3.2"
|
||||
|
||||
# TODO Try to get eslint to run under Deno, like prettier
|
||||
jobs:
|
||||
- job: "Linux"
|
||||
pool:
|
||||
vmImage: "Ubuntu-16.04"
|
||||
steps:
|
||||
- template: .ci/template.linux.yml
|
||||
|
||||
- job: "Mac"
|
||||
pool:
|
||||
vmImage: "macOS-10.13"
|
||||
steps:
|
||||
- template: .ci/template.mac.yml
|
||||
|
||||
- job: "Windows"
|
||||
pool:
|
||||
vmImage: "vs2017-win2016"
|
||||
steps:
|
||||
- template: .ci/template.windows.yml
|
32
format.ts
32
format.ts
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/env -S deno run --allow-run --allow-write --allow-read --allow-env
|
||||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
const { exit, args, execPath } = Deno;
|
||||
import { parse } from "./flags/mod.ts";
|
||||
import { xrun } from "./prettier/util.ts";
|
||||
|
||||
async function main(opts): Promise<void> {
|
||||
const args = [
|
||||
execPath(),
|
||||
"run",
|
||||
"--allow-write",
|
||||
"--allow-read",
|
||||
"prettier/main.ts",
|
||||
"--ignore",
|
||||
"node_modules",
|
||||
"--ignore",
|
||||
"**/testdata",
|
||||
"--ignore",
|
||||
"**/vendor",
|
||||
"--write"
|
||||
];
|
||||
|
||||
if (opts.check) {
|
||||
args.push("--check");
|
||||
}
|
||||
|
||||
args.push(".");
|
||||
|
||||
exit((await xrun({ args }).status()).code);
|
||||
}
|
||||
|
||||
main(parse(args));
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue