diff --git a/.gitignore b/.gitignore index 3cca40165a..f56cf19add 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,7 @@ src/**/*.js src/**/*.map scripts/**/*.js scripts/**/*.map + +schematics/src/**/*.js +schematics/src/**/*.js.map +schematics/src/**/*.d.ts diff --git a/package.json b/package.json index b3a464f62a..85b137bbe4 100755 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "build.es2015": "node ./scripts/es2015/bundle.es2015.js", "start": "ng serve --aot --host 0.0.0.0", "pretest": "run-s lint build", - "test": "ng test", + "test": "ng test && npm run test:schematics", + "test:schematics": "jasmine schematics/src/**/*.spec.js", "test-cross": "SAUCE=true ng test", "test-coverage": "ng test --code-coverage", "version": "node scripts/version && npm run version.changelog", @@ -153,7 +154,7 @@ "tslint": "5.10.0", "tslint-config-valorsoft": "2.1.1", "typedoc": "0.11.1", - "typescript": "~2.7.2", + "typescript": "2.7.2", "wait-on": "2.1.0", "wallaby-webpack": "3.9.7", "webpack-bundle-analyzer": "2.11.3", diff --git a/schematics/.gitignore b/schematics/.gitignore deleted file mode 100644 index 82677b5884..0000000000 --- a/schematics/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -# Outputs -src/**/*.js -src/**/*.js.map -src/**/*.d.ts - -# IDEs -.idea/ -jsconfig.json -.vscode/ - -# Misc -node_modules/ -npm-debug.log* -yarn-error.log* - -# Mac OSX Finder files. -**/.DS_Store -.DS_Store diff --git a/schematics/.npmignore b/schematics/.npmignore deleted file mode 100644 index c55ccfc3f5..0000000000 --- a/schematics/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -# Ignores TypeScript files, but keeps definitions. -*.ts -!*.d.ts diff --git a/schematics/README.md b/schematics/README.md deleted file mode 100644 index cf544dfbb6..0000000000 --- a/schematics/README.md +++ /dev/null @@ -1,21 +0,0 @@ -### Testing - -To test locally, install `@angular-devkit/schematics-cli` globally and use the `schematics` command line tool. That tool acts the same as the `generate` command of the Angular CLI, but also has a debug mode. - -Check the documentation with -```bash -schematics --help -``` - -### Unit Testing - -`npm run test` will run the unit tests, using Jasmine as a runner and test framework. - -### Publishing - -To publish, simply do: - -```bash -npm run build -npm publish -``` \ No newline at end of file diff --git a/schematics/package.json b/schematics/package.json deleted file mode 100644 index 3f7dfbf791..0000000000 --- a/schematics/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "schematics", - "version": "0.0.0", - "description": "ng add schematic", - "scripts": { - "build": "tsc -p tsconfig.json", - "test": "npm run build && jasmine src/**/*.spec.js" - }, - "keywords": [ - "schematics" - ], - "author": "Dmitriy Shekhovtsov ", - "license": "MIT", - "schematics": "./src/collection.json" -} diff --git a/scripts/ci/npm-ng-latest.sh b/scripts/ci/npm-ng-latest.sh index 4ef5a99645..71994d3583 100755 --- a/scripts/ci/npm-ng-latest.sh +++ b/scripts/ci/npm-ng-latest.sh @@ -14,4 +14,7 @@ npm i @angular/animations@latest \ @angular/platform-browser-dynamic@latest \ @angular/router@latest \ @angular/service-worker@latest \ - rxjs@6.0.0 + @schematics/angular@latest \ + typescript@3.1.1 \ + tsickle@0.33.0 \ + rxjs@6.3 diff --git a/src/chronos/utils/type-checks.ts b/src/chronos/utils/type-checks.ts index 5d3acb704a..7c45b890c2 100644 --- a/src/chronos/utils/type-checks.ts +++ b/src/chronos/utils/type-checks.ts @@ -34,7 +34,9 @@ export function isArray(input?: any): input is T[] { ); } -export function hasOwnProp(a: T /*object*/, b: string): b is keyof T { +// TODO: returned type should be changed to "b is Extract" +// after update to typescript 3.1.1 (issue 4728) +export function hasOwnProp(a: T /*object*/, b: string): boolean { return Object.prototype.hasOwnProperty.call(a, b); } diff --git a/src/tsconfig.json b/src/tsconfig.json index f2e82ff6bc..92927a95bb 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -11,6 +11,7 @@ "inlineSources": true, "noEmitHelpers": false, "noImplicitAny": true, + "suppressImplicitAnyIndexErrors": true, "declaration": true, "skipLibCheck": false, "stripInternal": true,