Skip to content

Commit ebaaad8

Browse files
authored
feat: merge nativescript-doctor source (#5621)
2 parents 9f73e96 + 1abf106 commit ebaaad8

37 files changed

+4962
-0
lines changed

.github/workflows/npm_release.yml renamed to .github/workflows/npm_release_cli.yml

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: 'nativescript -> npm'
33
on:
44
push:
55
branches: [ 'master' ]
6+
paths-ignore:
7+
- 'packages/**'
68
workflow_dispatch:
79

810
env:
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: '@nativescript/doctor -> npm'
2+
3+
on:
4+
push:
5+
branches: [ 'master' ]
6+
paths:
7+
- 'packages/doctor'
8+
workflow_dispatch:
9+
10+
defaults:
11+
run:
12+
working-directory: packages/doctor
13+
14+
env:
15+
NPM_TAG: 'next'
16+
17+
jobs:
18+
release:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Setup
25+
run: npm install
26+
27+
- name: Generate Version
28+
run: |
29+
echo NPM_VERSION=$(node -e "console.log(require('./package.json').version);")-$NPM_TAG-$(date +"%m-%d-%Y")-$GITHUB_RUN_ID >> $GITHUB_ENV
30+
31+
- name: Bump Version
32+
run: npm --no-git-tag-version version $NPM_VERSION
33+
34+
- name: Build @nativescript/doctor
35+
run: npm run pack
36+
37+
- name: Publish @nativescript/doctor
38+
env:
39+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
40+
run: |
41+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
42+
echo "Publishing @nativescript/doctor@$NPM_VERSION to NPM with tag $NPM_TAG..."
43+
# npm publish nativescript-doctor-$NPM_VERSION.tgz --tag $NPM_TAG

packages/doctor/.gitignore

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# nyc test coverage
18+
.nyc_output
19+
20+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21+
.grunt
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (http://nodejs.org/api/addons.html)
27+
build/Release
28+
29+
# Dependency directories
30+
node_modules
31+
jspm_packages
32+
package-lock.json
33+
34+
# Optional npm cache directory
35+
.npm
36+
37+
# Optional REPL history
38+
.node_repl_history
39+
40+
npm-debug.log
41+
node_modules
42+
docs/html
43+
tscommand*.tmp.txt
44+
.tscache/
45+
*.seed
46+
*.log
47+
*.csv
48+
*.dat
49+
*.out
50+
*.pid
51+
*.gz
52+
*.tgz
53+
*.tmp
54+
*.sublime-workspace
55+
56+
pids
57+
logs
58+
results
59+
scratch/
60+
.idea/
61+
.settings/
62+
.vscode/
63+
test-reports.xml
64+
65+
*.js
66+
*.js.map
67+
/lib/.d.ts
68+
.d.ts
69+
!/*.js

packages/doctor/.npmignore

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.idea
2+
.gitattributes
3+
.gitmodules
4+
*.sublime-project
5+
lint.*
6+
.jshint*
7+
.npmignore
8+
*.tgz
9+
test-reports.xml
10+
for-developers.md
11+
prepublish.js
12+
Gruntfile.js
13+
BuildPackage.cmd
14+
tscommand.tmp.txt
15+
.tscache/
16+
17+
bin/nativescript
18+
bin/*.cmd
19+
20+
lib/**/*.ts
21+
lib/**/*.js.map
22+
23+
test/
24+
.vscode
25+
coverage/
26+
scratch/
27+
*.suo
28+
.travis.yml
29+
docs/html/
30+
dev/
31+
32+
tscommand*.tmp.txt
33+
34+
tslint.json
35+
tsconfig.json

packages/doctor/.travis.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: node_js
2+
node_js:
3+
- '14'
4+
git:
5+
submodules: false
6+
before_script:
7+
- npm install grunt-cli
8+
- npm install
9+
script:
10+
- node_modules/.bin/grunt lint
11+
- node_modules/.bin/grunt pack --no-color

packages/doctor/CHANGELOG.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## [2.0.5](https://github.com/NativeScript/nativescript-doctor/compare/v2.0.4...v2.0.5) (2021-10-08)
2+
3+
4+
### Bug Fixes
5+
6+
* android-31 target version ([#71](https://github.com/NativeScript/nativescript-doctor/issues/71)) ([b7c7278](https://github.com/NativeScript/nativescript-doctor/commit/b7c7278b1425950a3168784293090617c021303f))
7+
* removed max java version limitation ([#67](https://github.com/NativeScript/nativescript-doctor/issues/67)) ([3e96ec1](https://github.com/NativeScript/nativescript-doctor/commit/3e96ec16298f5205ed2511baf94b23d36d80c454))
8+
* **windows:** handle paths correctly ([#64](https://github.com/NativeScript/nativescript-doctor/issues/64)) ([9db60b6](https://github.com/NativeScript/nativescript-doctor/commit/9db60b64970d229c539e03b888b1e93195367da4))
9+
10+
11+
12+
## [2.0.4](https://github.com/NativeScript/nativescript-doctor/compare/v2.0.3...v2.0.4) (2020-09-06)
13+
14+
15+
### Bug Fixes
16+
17+
* runtime version validation and getMaxSupportedCompileVersion ([a7d71a0](https://github.com/NativeScript/nativescript-doctor/commit/a7d71a0dde6e174d507098dad388ba7d6db3163b))
18+
19+
20+
21+
## [2.0.3](https://github.com/NativeScript/nativescript-doctor/compare/v2.0.1...v2.0.3) (2020-09-06)
22+
23+
24+
### Bug Fixes
25+
26+
* support tgz runtime versions ([20641e7](https://github.com/NativeScript/nativescript-doctor/commit/20641e7528c189161138822504389436ce6805ce))
27+
28+
29+
30+
## [2.0.1](https://github.com/NativeScript/nativescript-doctor/compare/v1.14.2...v2.0.1) (2020-09-06)
31+
32+
33+
### Features
34+
35+
* nativescript 7 support ([6b88f4c](https://github.com/NativeScript/nativescript-doctor/commit/6b88f4c2195cf15e20e9df043270b1cf105093fe))
36+
37+
38+
39+
## [1.14.2](https://github.com/NativeScript/nativescript-doctor/compare/v1.14.1...v1.14.2) (2020-06-25)
40+
41+
42+
### Features
43+
44+
* **android:** support v30 ([#61](https://github.com/NativeScript/nativescript-doctor/issues/61)) ([20612a2](https://github.com/NativeScript/nativescript-doctor/commit/20612a2b36bbe684dfe7b9c7191399c8bade9773))
45+
46+
47+

packages/doctor/Gruntfile.js

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
module.exports = function (grunt) {
2+
grunt.initConfig({
3+
ts: {
4+
options: grunt.file.readJSON("tsconfig.json").compilerOptions,
5+
6+
devlib: {
7+
src: ["lib/**/*.ts", "typings/**/*.ts"],
8+
reference: "lib/.d.ts"
9+
},
10+
11+
devall: {
12+
src: ["lib/**/*.ts", "test/**/*.ts", "typings/**/*.ts"],
13+
reference: "lib/.d.ts"
14+
},
15+
16+
release_build: {
17+
src: ["lib/**/*.ts", "test/**/*.ts", "typings/**/*.ts"],
18+
reference: "lib/.d.ts",
19+
options: {
20+
sourceMap: false,
21+
removeComments: true
22+
}
23+
}
24+
},
25+
26+
tslint: {
27+
build: {
28+
files: {
29+
src: ["lib/**/*.ts", "test/**/*.ts", "typings/**/*.ts", "!**/*.d.ts"]
30+
},
31+
options: {
32+
configuration: grunt.file.readJSON("./tslint.json"),
33+
project: "tsconfig.json"
34+
}
35+
}
36+
},
37+
38+
watch: {
39+
devall: {
40+
files: ["lib/**/*.ts", 'test/**/*.ts'],
41+
tasks: [
42+
'ts:devall',
43+
'shell:npm_test'
44+
],
45+
options: {
46+
atBegin: true,
47+
interrupt: true
48+
}
49+
},
50+
ts: {
51+
files: ["lib/**/*.ts", "test/**/*.ts"],
52+
tasks: [
53+
'ts:devall'
54+
],
55+
options: {
56+
atBegin: true,
57+
interrupt: true
58+
}
59+
}
60+
},
61+
62+
shell: {
63+
options: {
64+
stdout: true,
65+
stderr: true,
66+
failOnError: true
67+
},
68+
build_package: {
69+
command: "npm pack"
70+
},
71+
npm_test: {
72+
command: "npm test"
73+
}
74+
},
75+
76+
clean: {
77+
src: ["test/**/*.js*", "lib/**/*.js*", "!lib/hooks/**/*.js", "!Gruntfile.js", "*.tgz"]
78+
}
79+
});
80+
81+
grunt.loadNpmTasks("grunt-contrib-clean");
82+
grunt.loadNpmTasks("grunt-contrib-watch");
83+
grunt.loadNpmTasks("grunt-shell");
84+
grunt.loadNpmTasks("grunt-ts");
85+
grunt.loadNpmTasks("grunt-tslint");
86+
87+
grunt.registerTask("delete_coverage_dir", function () {
88+
var done = this.async();
89+
var rimraf = require("rimraf");
90+
rimraf("coverage", function (err) {
91+
if (err) {
92+
console.log("Error while deleting coverage directory from the package: ", err);
93+
done(false);
94+
}
95+
96+
done();
97+
});
98+
});
99+
100+
grunt.registerTask("test", ["ts:devall", "shell:npm_test"]);
101+
102+
grunt.registerTask("pack", [
103+
"clean",
104+
"ts:release_build",
105+
"shell:npm_test",
106+
"delete_coverage_dir",
107+
"shell:build_package"
108+
]);
109+
grunt.registerTask("lint", ["tslint:build"]);
110+
grunt.registerTask("all", ["clean", "test", "lint"]);
111+
grunt.registerTask("rebuild", ["clean", "ts:devlib"]);
112+
grunt.registerTask("default", "ts:devlib");
113+
};

0 commit comments

Comments
 (0)