diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6017323fc..ed7b91e8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/setup-node@v2 with: - node-version: 12.14 + node-version: 12.20.0 registry-url: 'https://registry.npmjs.org' - name: Install dependencies diff --git a/.github/workflows/graduate.yml b/.github/workflows/graduate.yml index 8c35912c1..328eaeb5e 100644 --- a/.github/workflows/graduate.yml +++ b/.github/workflows/graduate.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/setup-node@v2 with: - node-version: 12.14 + node-version: 12.20.0 registry-url: 'https://registry.npmjs.org' - name: Install dependencies diff --git a/package.json b/package.json index c3b250838..e4e6ab7fa 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "author": "Evgeny Barabanov", "license": "MIT", "engines": { - "node": ">=12.14.1" + "node": ">=12.20.0" }, "scripts": { "bootstrap:packages": "lerna bootstrap --scope '@angular-builders/*'", @@ -23,11 +23,14 @@ "format": "prettier --write \"**/*.{js,ts,html,md}\"", "clean": "lerna clean", "graduate": "lerna publish --conventional-commits --conventional-graduate", - "prepare": "husky install" + "prepare": "husky install", + "update:packages": "lerna exec --concurrency 1 --scope '@angular-builders/*' 'node \"$LERNA_ROOT_PATH\"/scripts/update-package.js'", + "update:examples": "lerna exec --concurrency 1 --ignore '@angular-builders/*' 'node \"$LERNA_ROOT_PATH\"/scripts/update-example.js'", + "update:root": "node ./scripts/update-package.js" }, "devDependencies": { - "@angular/compiler": "^12.0.0", - "@angular/compiler-cli": "^12.0.0", + "@angular/compiler": "^13.0.0", + "@angular/compiler-cli": "^13.0.0", "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^13.1.0", "@types/jest": "^26.0.0", diff --git a/packages/custom-webpack/e2e/custom-webpack-browser-schema.spec.ts b/packages/custom-webpack/e2e/custom-webpack-browser-schema.spec.ts index d727d1a2b..7172954de 100644 --- a/packages/custom-webpack/e2e/custom-webpack-browser-schema.spec.ts +++ b/packages/custom-webpack/e2e/custom-webpack-browser-schema.spec.ts @@ -9,7 +9,7 @@ describe('custom webpack browser builder test', () => { }); it('Should fit the schema of @angular-devkit/build-angular:browser', () => { - const originalBrowserSchema = require('@angular-devkit/build-angular/src/browser/schema.json'); + const originalBrowserSchema = require('@angular-devkit/build-angular/src/builders/browser/schema.json'); customWebpackBrowserSchema.properties['customWebpackConfig'] = undefined; customWebpackBrowserSchema.properties['indexTransform'] = undefined; expect(originalBrowserSchema.properties).toEqual(customWebpackBrowserSchema.properties); diff --git a/packages/custom-webpack/e2e/custom-webpack-karma-schema.spec.ts b/packages/custom-webpack/e2e/custom-webpack-karma-schema.spec.ts index 1f8c292dd..0a27a1fec 100644 --- a/packages/custom-webpack/e2e/custom-webpack-karma-schema.spec.ts +++ b/packages/custom-webpack/e2e/custom-webpack-karma-schema.spec.ts @@ -9,7 +9,7 @@ describe('custom webpack karma builder test', () => { }); it('Should fit the schema of @angular-devkit/build-angular:karma', () => { - const originalBrowserSchema = require('@angular-devkit/build-angular/src/karma/schema.json'); + const originalBrowserSchema = require('@angular-devkit/build-angular/src/builders/karma/schema.json'); customWebpackBrowserSchema.properties['customWebpackConfig'] = undefined; customWebpackBrowserSchema.properties['indexTransform'] = undefined; expect(originalBrowserSchema.properties).toEqual(customWebpackBrowserSchema.properties); diff --git a/packages/custom-webpack/e2e/custom-webpack-server-schema.spec.ts b/packages/custom-webpack/e2e/custom-webpack-server-schema.spec.ts index 6f64cb991..829dec20d 100644 --- a/packages/custom-webpack/e2e/custom-webpack-server-schema.spec.ts +++ b/packages/custom-webpack/e2e/custom-webpack-server-schema.spec.ts @@ -9,7 +9,7 @@ describe('custom webpack server builder test', () => { }); it('Should fit the schema of @angular-devkit/build-angular:server', () => { - const originalBrowserSchema = require('@angular-devkit/build-angular/src/server/schema.json'); + const originalBrowserSchema = require('@angular-devkit/build-angular/src/builders/server/schema.json'); customWebpackBrowserSchema.properties['customWebpackConfig'] = undefined; customWebpackBrowserSchema.properties['indexTransform'] = undefined; expect(originalBrowserSchema.properties).toEqual(customWebpackBrowserSchema.properties); diff --git a/packages/custom-webpack/examples/full-cycle-app/.gitignore b/packages/custom-webpack/examples/full-cycle-app/.gitignore index f4f46a5fe..574ca989f 100644 --- a/packages/custom-webpack/examples/full-cycle-app/.gitignore +++ b/packages/custom-webpack/examples/full-cycle-app/.gitignore @@ -32,6 +32,7 @@ speed-measure-plugin.json .history/* # misc +/.angular/cache /.sass-cache /connect.lock /coverage diff --git a/packages/custom-webpack/examples/full-cycle-app/angular.json b/packages/custom-webpack/examples/full-cycle-app/angular.json index 9a1e5f699..d3978224b 100644 --- a/packages/custom-webpack/examples/full-cycle-app/angular.json +++ b/packages/custom-webpack/examples/full-cycle-app/angular.json @@ -113,19 +113,6 @@ "scripts": [] } }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tsconfig.app.json", - "tsconfig.spec.json", - "e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { diff --git a/packages/custom-webpack/examples/full-cycle-app/package.json b/packages/custom-webpack/examples/full-cycle-app/package.json index f2f899a7a..7864219e4 100644 --- a/packages/custom-webpack/examples/full-cycle-app/package.json +++ b/packages/custom-webpack/examples/full-cycle-app/package.json @@ -11,24 +11,24 @@ }, "private": true, "dependencies": { - "@angular/animations": "^12.0.0", - "@angular/common": "^12.0.0", - "@angular/compiler": "^12.0.0", - "@angular/core": "^12.0.0", - "@angular/forms": "^12.0.0", - "@angular/platform-browser": "^12.0.0", - "@angular/platform-browser-dynamic": "^12.0.0", - "@angular/router": "^12.0.0", + "@angular/animations": "^13.0.0", + "@angular/common": "^13.0.0", + "@angular/compiler": "^13.0.0", + "@angular/core": "^13.0.0", + "@angular/forms": "^13.0.0", + "@angular/platform-browser": "^13.0.0", + "@angular/platform-browser-dynamic": "^13.0.0", + "@angular/router": "^13.0.0", "rxjs": "~6.5.2", "tslib": "^2.0.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-builders/custom-webpack": "latest", - "@angular-devkit/build-angular": "^12.0.0", - "@angular/cli": "^12.0.0", - "@angular/compiler-cli": "^12.0.0", - "@angular/language-service": "^12.0.0", + "@angular-devkit/build-angular": "^13.0.1", + "@angular/cli": "^13.0.1", + "@angular/compiler-cli": "^13.0.0", + "@angular/language-service": "^13.0.0", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", @@ -45,6 +45,6 @@ "puppeteer": "^5.5.0", "ts-node": "~8.1.1", "tslint": "~6.1.0", - "typescript": "~4.2.4" + "typescript": "~4.4.4" } -} +} \ No newline at end of file diff --git a/packages/custom-webpack/examples/full-cycle-app/src/polyfills.ts b/packages/custom-webpack/examples/full-cycle-app/src/polyfills.ts index 3eb385e4d..b40974e69 100644 --- a/packages/custom-webpack/examples/full-cycle-app/src/polyfills.ts +++ b/packages/custom-webpack/examples/full-cycle-app/src/polyfills.ts @@ -18,16 +18,6 @@ * BROWSER POLYFILLS */ -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags diff --git a/packages/custom-webpack/examples/full-cycle-app/src/test.ts b/packages/custom-webpack/examples/full-cycle-app/src/test.ts index ee51ae25f..32942eea3 100644 --- a/packages/custom-webpack/examples/full-cycle-app/src/test.ts +++ b/packages/custom-webpack/examples/full-cycle-app/src/test.ts @@ -10,7 +10,9 @@ import { declare const require: any; // First, initialize the Angular testing environment. -getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { + teardown: { destroyAfterEach: false }, +}); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. diff --git a/packages/custom-webpack/examples/sanity-app/.gitignore b/packages/custom-webpack/examples/sanity-app/.gitignore index f4f46a5fe..574ca989f 100644 --- a/packages/custom-webpack/examples/sanity-app/.gitignore +++ b/packages/custom-webpack/examples/sanity-app/.gitignore @@ -32,6 +32,7 @@ speed-measure-plugin.json .history/* # misc +/.angular/cache /.sass-cache /connect.lock /coverage diff --git a/packages/custom-webpack/examples/sanity-app/angular.json b/packages/custom-webpack/examples/sanity-app/angular.json index f148d9d21..a2e7bb4bc 100644 --- a/packages/custom-webpack/examples/sanity-app/angular.json +++ b/packages/custom-webpack/examples/sanity-app/angular.json @@ -91,19 +91,6 @@ "scripts": [] } }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tsconfig.app.json", - "tsconfig.spec.json", - "e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { diff --git a/packages/custom-webpack/examples/sanity-app/package.json b/packages/custom-webpack/examples/sanity-app/package.json index cf25fdd8e..e764fafa4 100644 --- a/packages/custom-webpack/examples/sanity-app/package.json +++ b/packages/custom-webpack/examples/sanity-app/package.json @@ -11,24 +11,24 @@ }, "private": true, "dependencies": { - "@angular/animations": "^12.0.0", - "@angular/common": "^12.0.0", - "@angular/compiler": "^12.0.0", - "@angular/core": "^12.0.0", - "@angular/forms": "^12.0.0", - "@angular/platform-browser": "^12.0.0", - "@angular/platform-browser-dynamic": "^12.0.0", - "@angular/router": "^12.0.0", + "@angular/animations": "^13.0.0", + "@angular/common": "^13.0.0", + "@angular/compiler": "^13.0.0", + "@angular/core": "^13.0.0", + "@angular/forms": "^13.0.0", + "@angular/platform-browser": "^13.0.0", + "@angular/platform-browser-dynamic": "^13.0.0", + "@angular/router": "^13.0.0", "rxjs": "~6.5.2", "tslib": "^2.0.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-builders/custom-webpack": "latest", - "@angular-devkit/build-angular": "^12.0.0", - "@angular/cli": "^12.0.0", - "@angular/compiler-cli": "^12.0.0", - "@angular/language-service": "^12.0.0", + "@angular-devkit/build-angular": "^13.0.1", + "@angular/cli": "^13.0.1", + "@angular/compiler-cli": "^13.0.0", + "@angular/language-service": "^13.0.0", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", @@ -44,6 +44,6 @@ "puppeteer": "^5.5.0", "ts-node": "~8.2.0", "tslint": "~6.1.0", - "typescript": "~4.2.4" + "typescript": "~4.4.4" } -} +} \ No newline at end of file diff --git a/packages/custom-webpack/examples/sanity-app/src/polyfills.ts b/packages/custom-webpack/examples/sanity-app/src/polyfills.ts index 3eb385e4d..b40974e69 100644 --- a/packages/custom-webpack/examples/sanity-app/src/polyfills.ts +++ b/packages/custom-webpack/examples/sanity-app/src/polyfills.ts @@ -18,16 +18,6 @@ * BROWSER POLYFILLS */ -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags diff --git a/packages/custom-webpack/examples/sanity-app/src/test.ts b/packages/custom-webpack/examples/sanity-app/src/test.ts index ee51ae25f..32942eea3 100644 --- a/packages/custom-webpack/examples/sanity-app/src/test.ts +++ b/packages/custom-webpack/examples/sanity-app/src/test.ts @@ -10,7 +10,9 @@ import { declare const require: any; // First, initialize the Angular testing environment. -getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { + teardown: { destroyAfterEach: false }, +}); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. diff --git a/packages/custom-webpack/package.json b/packages/custom-webpack/package.json index 02a1148c0..c2a0a2aa5 100644 --- a/packages/custom-webpack/package.json +++ b/packages/custom-webpack/package.json @@ -15,7 +15,7 @@ "author": "JeB Barabanov", "license": "MIT", "engines": { - "node": ">=12.14.1" + "node": ">=12.20.0" }, "keywords": [ "cli", @@ -37,9 +37,9 @@ }, "builders": "builders.json", "dependencies": { - "@angular-devkit/architect": ">=0.1200.0 < 0.1300.0", - "@angular-devkit/build-angular": "^12.0.0", - "@angular-devkit/core": "^12.0.0", + "@angular-devkit/architect": ">=0.1300.0 < 0.1400.0", + "@angular-devkit/build-angular": "^13.0.0", + "@angular-devkit/core": "^13.0.0", "lodash": "^4.17.15", "ts-node": "^10.0.0", "tsconfig-paths": "^3.9.0", diff --git a/packages/custom-webpack/src/schemes.ts b/packages/custom-webpack/src/schemes.ts index 60b0b9d7d..45c597707 100644 --- a/packages/custom-webpack/src/schemes.ts +++ b/packages/custom-webpack/src/schemes.ts @@ -1,27 +1,27 @@ // Base schemes from build-angular@0.1202.7 module.exports = [ { - originalSchemaPath: '@angular-devkit/build-angular/src/browser/schema.json', + originalSchemaPath: '@angular-devkit/build-angular/src/builders/browser/schema.json', schemaExtensionPaths: [`${__dirname}/browser/schema.ext.json`, `${__dirname}/schema.ext.json`], newSchemaPath: `${__dirname}/../dist/browser/schema.json`, }, { - originalSchemaPath: '@angular-devkit/build-angular/src/server/schema.json', + originalSchemaPath: '@angular-devkit/build-angular/src/builders/server/schema.json', schemaExtensionPaths: [`${__dirname}/server/schema.ext.json`, `${__dirname}/schema.ext.json`], newSchemaPath: `${__dirname}/../dist/server/schema.json`, }, { - originalSchemaPath: '@angular-devkit/build-angular/src/karma/schema.json', + originalSchemaPath: '@angular-devkit/build-angular/src/builders/karma/schema.json', schemaExtensionPaths: [`${__dirname}/karma/schema.ext.json`, `${__dirname}/schema.ext.json`], newSchemaPath: `${__dirname}/../dist/karma/schema.json`, }, { - originalSchemaPath: '@angular-devkit/build-angular/src/dev-server/schema.json', + originalSchemaPath: '@angular-devkit/build-angular/src/builders/dev-server/schema.json', schemaExtensionPaths: [`${__dirname}/dev-server/schema.ext.json`], newSchemaPath: `${__dirname}/../dist/dev-server/schema.json`, }, { - originalSchemaPath: '@angular-devkit/build-angular/src/extract-i18n/schema.json', + originalSchemaPath: '@angular-devkit/build-angular/src/builders/extract-i18n/schema.json', schemaExtensionPaths: [`${__dirname}/extract-i18n/schema.ext.json`], newSchemaPath: `${__dirname}/../dist/extract-i18n/schema.json`, }, diff --git a/packages/jest/examples/multiple-apps/.gitignore b/packages/jest/examples/multiple-apps/.gitignore index f4f46a5fe..574ca989f 100644 --- a/packages/jest/examples/multiple-apps/.gitignore +++ b/packages/jest/examples/multiple-apps/.gitignore @@ -32,6 +32,7 @@ speed-measure-plugin.json .history/* # misc +/.angular/cache /.sass-cache /connect.lock /coverage diff --git a/packages/jest/examples/multiple-apps/angular.json b/packages/jest/examples/multiple-apps/angular.json index 0fd9627e2..15a597b19 100644 --- a/packages/jest/examples/multiple-apps/angular.json +++ b/packages/jest/examples/multiple-apps/angular.json @@ -86,19 +86,6 @@ "globalMocks": ["getComputedStyle", "styleTransform"] } }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "projects/my-first-app/tsconfig.app.json", - "projects/my-first-app/tsconfig.spec.json", - "projects/my-first-app/e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { @@ -197,19 +184,6 @@ "test": { "builder": "@angular-builders/jest:run" }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "projects/my-second-app/tsconfig.app.json", - "projects/my-second-app/tsconfig.spec.json", - "projects/my-second-app/e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { @@ -249,18 +223,6 @@ }, "test": { "builder": "@angular-builders/jest:run" - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "projects/my-shared-library/tsconfig.lib.json", - "projects/my-shared-library/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } } } }}, diff --git a/packages/jest/examples/multiple-apps/package.json b/packages/jest/examples/multiple-apps/package.json index 36db5c31a..d49277249 100644 --- a/packages/jest/examples/multiple-apps/package.json +++ b/packages/jest/examples/multiple-apps/package.json @@ -11,24 +11,24 @@ }, "private": true, "dependencies": { - "@angular/animations": "^12.0.0", - "@angular/common": "^12.0.0", - "@angular/compiler": "^12.0.0", - "@angular/core": "^12.0.0", - "@angular/forms": "^12.0.0", - "@angular/platform-browser": "^12.0.0", - "@angular/platform-browser-dynamic": "^12.0.0", - "@angular/router": "^12.0.0", + "@angular/animations": "^13.0.0", + "@angular/common": "^13.0.0", + "@angular/compiler": "^13.0.0", + "@angular/core": "^13.0.0", + "@angular/forms": "^13.0.0", + "@angular/platform-browser": "^13.0.0", + "@angular/platform-browser-dynamic": "^13.0.0", + "@angular/router": "^13.0.0", "rxjs": "~6.5.2", "tslib": "^2.0.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-builders/jest": "latest", - "@angular-devkit/build-angular": "^12.0.0", - "@angular/cli": "^12.0.0", - "@angular/compiler-cli": "^12.0.0", - "@angular/language-service": "^12.0.0", + "@angular-devkit/build-angular": "^13.0.1", + "@angular/cli": "^13.0.1", + "@angular/compiler-cli": "^13.0.0", + "@angular/language-service": "^13.0.0", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", @@ -36,10 +36,10 @@ "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", "jest": "^27.0.0", - "ng-packagr": "^12.0.0", + "ng-packagr": "^13.0.0", "protractor": "~7.0.0", "ts-node": "~8.2.0", "tslint": "~6.1.0", - "typescript": "~4.2.4" + "typescript": "~4.4.4" } -} +} \ No newline at end of file diff --git a/packages/jest/examples/multiple-apps/projects/my-first-app/src/polyfills.ts b/packages/jest/examples/multiple-apps/projects/my-first-app/src/polyfills.ts index 3eb385e4d..b40974e69 100644 --- a/packages/jest/examples/multiple-apps/projects/my-first-app/src/polyfills.ts +++ b/packages/jest/examples/multiple-apps/projects/my-first-app/src/polyfills.ts @@ -18,16 +18,6 @@ * BROWSER POLYFILLS */ -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags diff --git a/packages/jest/examples/multiple-apps/projects/my-second-app/src/polyfills.ts b/packages/jest/examples/multiple-apps/projects/my-second-app/src/polyfills.ts index 3eb385e4d..b40974e69 100644 --- a/packages/jest/examples/multiple-apps/projects/my-second-app/src/polyfills.ts +++ b/packages/jest/examples/multiple-apps/projects/my-second-app/src/polyfills.ts @@ -18,16 +18,6 @@ * BROWSER POLYFILLS */ -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags diff --git a/packages/jest/examples/multiple-apps/projects/my-shared-library/tsconfig.lib.prod.json b/packages/jest/examples/multiple-apps/projects/my-shared-library/tsconfig.lib.prod.json index 2617a83e3..6330633d9 100644 --- a/packages/jest/examples/multiple-apps/projects/my-shared-library/tsconfig.lib.prod.json +++ b/packages/jest/examples/multiple-apps/projects/my-shared-library/tsconfig.lib.prod.json @@ -4,6 +4,6 @@ "declarationMap": false }, "angularCompilerOptions": { - "enableIvy": false + "compilationMode": "partial" } } \ No newline at end of file diff --git a/packages/jest/examples/simple-app/.gitignore b/packages/jest/examples/simple-app/.gitignore index f4f46a5fe..574ca989f 100644 --- a/packages/jest/examples/simple-app/.gitignore +++ b/packages/jest/examples/simple-app/.gitignore @@ -32,6 +32,7 @@ speed-measure-plugin.json .history/* # misc +/.angular/cache /.sass-cache /connect.lock /coverage diff --git a/packages/jest/examples/simple-app/angular.json b/packages/jest/examples/simple-app/angular.json index a8635bb5b..631bd34de 100644 --- a/packages/jest/examples/simple-app/angular.json +++ b/packages/jest/examples/simple-app/angular.json @@ -88,19 +88,6 @@ "options": { } }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tsconfig.app.json", - "tsconfig.spec.json", - "e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { diff --git a/packages/jest/examples/simple-app/package.json b/packages/jest/examples/simple-app/package.json index 09eddcfda..1f70cd601 100644 --- a/packages/jest/examples/simple-app/package.json +++ b/packages/jest/examples/simple-app/package.json @@ -11,24 +11,24 @@ }, "private": true, "dependencies": { - "@angular/animations": "^12.0.0", - "@angular/common": "^12.0.0", - "@angular/compiler": "^12.0.0", - "@angular/core": "^12.0.0", - "@angular/forms": "^12.0.0", - "@angular/platform-browser": "^12.0.0", - "@angular/platform-browser-dynamic": "^12.0.0", - "@angular/router": "^12.0.0", + "@angular/animations": "^13.0.0", + "@angular/common": "^13.0.0", + "@angular/compiler": "^13.0.0", + "@angular/core": "^13.0.0", + "@angular/forms": "^13.0.0", + "@angular/platform-browser": "^13.0.0", + "@angular/platform-browser-dynamic": "^13.0.0", + "@angular/router": "^13.0.0", "rxjs": "~6.5.2", "tslib": "^2.0.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-builders/jest": "latest", - "@angular-devkit/build-angular": "^12.0.0", - "@angular/cli": "^12.0.0", - "@angular/compiler-cli": "^12.0.0", - "@angular/language-service": "^12.0.0", + "@angular-devkit/build-angular": "^13.0.1", + "@angular/cli": "^13.0.1", + "@angular/compiler-cli": "^13.0.0", + "@angular/language-service": "^13.0.0", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", @@ -40,6 +40,6 @@ "protractor": "~7.0.0", "ts-node": "~8.2.0", "tslint": "~6.1.0", - "typescript": "~4.2.4" + "typescript": "~4.4.4" } -} +} \ No newline at end of file diff --git a/packages/jest/examples/simple-app/src/polyfills.ts b/packages/jest/examples/simple-app/src/polyfills.ts index 3eb385e4d..b40974e69 100644 --- a/packages/jest/examples/simple-app/src/polyfills.ts +++ b/packages/jest/examples/simple-app/src/polyfills.ts @@ -18,16 +18,6 @@ * BROWSER POLYFILLS */ -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags diff --git a/packages/jest/package.json b/packages/jest/package.json index 7f81b7d31..1e84ee693 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -10,7 +10,7 @@ "author": "JeB Barabanov", "license": "MIT", "engines": { - "node": ">=12.14.1" + "node": ">=12.20.0" }, "main": "dist/index.js", "files": [ @@ -39,9 +39,9 @@ "ci": "./scripts/ci.sh" }, "dependencies": { - "@angular-devkit/architect": ">=0.1200.0 < 0.1300.0", - "@angular-devkit/core": "^12.0.0", - "jest-preset-angular": "^9.0.1", + "@angular-devkit/architect": ">=0.1300.0 < 0.1400.0", + "@angular-devkit/core": "^13.0.0", + "jest-preset-angular": "11.0.0-rc.1", "lodash": "^4.17.15" }, "peerDependencies": { diff --git a/packages/timestamp/example/.gitignore b/packages/timestamp/example/.gitignore index 47a793bdb..398896b57 100644 --- a/packages/timestamp/example/.gitignore +++ b/packages/timestamp/example/.gitignore @@ -32,6 +32,7 @@ speed-measure-plugin.json .history/* # misc +/.angular/cache /.sass-cache /connect.lock /coverage diff --git a/packages/timestamp/example/angular.json b/packages/timestamp/example/angular.json index 66479cd5c..f64ac3ca0 100644 --- a/packages/timestamp/example/angular.json +++ b/packages/timestamp/example/angular.json @@ -104,19 +104,6 @@ "builder": "@angular-builders/timestamp:file", "options": {} }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tsconfig.app.json", - "tsconfig.spec.json", - "e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { diff --git a/packages/timestamp/example/package.json b/packages/timestamp/example/package.json index 5461bcdcf..60303fdb7 100644 --- a/packages/timestamp/example/package.json +++ b/packages/timestamp/example/package.json @@ -11,24 +11,24 @@ }, "private": true, "dependencies": { - "@angular/animations": "^12.0.0", - "@angular/common": "^12.0.0", - "@angular/compiler": "^12.0.0", - "@angular/core": "^12.0.0", - "@angular/forms": "^12.0.0", - "@angular/platform-browser": "^12.0.0", - "@angular/platform-browser-dynamic": "^12.0.0", - "@angular/router": "^12.0.0", - "rxjs": "~7.3.0", + "@angular/animations": "^13.0.0", + "@angular/common": "^13.0.0", + "@angular/compiler": "^13.0.0", + "@angular/core": "^13.0.0", + "@angular/forms": "^13.0.0", + "@angular/platform-browser": "^13.0.0", + "@angular/platform-browser-dynamic": "^13.0.0", + "@angular/router": "^13.0.0", + "rxjs": "~7.4.0", "tslib": "^2.0.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-builders/timestamp": "latest", - "@angular-devkit/build-angular": "^12.0.0", - "@angular/cli": "^12.0.0", - "@angular/compiler-cli": "^12.0.0", - "@angular/language-service": "^12.0.0", + "@angular-devkit/build-angular": "^13.0.1", + "@angular/cli": "^13.0.1", + "@angular/compiler-cli": "^13.0.0", + "@angular/language-service": "^13.0.0", "@types/jasmine": "~3.8.1", "@types/jasminewd2": "~2.0.3", "@types/node": "^16.0.0", @@ -43,6 +43,6 @@ "protractor": "~7.0.0", "ts-node": "~10.1.0", "tslint": "~6.1.0", - "typescript": "~4.3.2" + "typescript": "~4.4.4" } -} +} \ No newline at end of file diff --git a/packages/timestamp/example/src/polyfills.ts b/packages/timestamp/example/src/polyfills.ts index 3eb385e4d..b40974e69 100644 --- a/packages/timestamp/example/src/polyfills.ts +++ b/packages/timestamp/example/src/polyfills.ts @@ -18,16 +18,6 @@ * BROWSER POLYFILLS */ -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags diff --git a/packages/timestamp/example/src/test.ts b/packages/timestamp/example/src/test.ts index ee51ae25f..32942eea3 100644 --- a/packages/timestamp/example/src/test.ts +++ b/packages/timestamp/example/src/test.ts @@ -10,7 +10,9 @@ import { declare const require: any; // First, initialize the Angular testing environment. -getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { + teardown: { destroyAfterEach: false }, +}); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. diff --git a/packages/timestamp/package.json b/packages/timestamp/package.json index bd2c4922c..675ea221d 100644 --- a/packages/timestamp/package.json +++ b/packages/timestamp/package.json @@ -14,7 +14,7 @@ "builders.json" ], "engines": { - "node": ">=12.14.1" + "node": ">=12.20.0" }, "builders": "builders.json", "scripts": { @@ -29,8 +29,8 @@ "@types/dateformat": "^3.0.1" }, "dependencies": { - "@angular-devkit/architect": ">=0.1200.0 < 0.1300.0", - "@angular-devkit/core": "^12.0.0", + "@angular-devkit/architect": ">=0.1300.0 < 0.1400.0", + "@angular-devkit/core": "^13.0.0", "dateformat": "^4.3.1" } } diff --git a/scripts/update-example.js b/scripts/update-example.js new file mode 100644 index 000000000..330667e92 --- /dev/null +++ b/scripts/update-example.js @@ -0,0 +1,14 @@ +const { execSync } = require('child_process'); +const package = require(`${process.cwd()}/package.json`); +const version = Number.parseInt(process.argv.slice(2)); + +const updateAngularVersion = () => { + console.log(`Updating Angular version for ${package.name}`); + execSync(`ng update @angular/core@${version} @angular/cli@${version}`); + console.log(`Successfully updated ${package.name} to Angular ${version}`); + console.log('Committing the changes'); + execSync(`git commit -am 'chore(deps): update ${package.name} to Angular ${version}'`); + console.log('Successfully committed the changes'); +}; + +updateAngularVersion(); diff --git a/scripts/update-package.js b/scripts/update-package.js new file mode 100644 index 000000000..fd18a9e05 --- /dev/null +++ b/scripts/update-package.js @@ -0,0 +1,49 @@ +const { execSync } = require('child_process'); +const package = require(`${process.cwd()}/package.json`); +const version = Number.parseInt(process.argv.slice(2)); + +const isStable = { + '@angular-devkit/build-angular': true, + '@angular-devkit/core': true, + '@angular-devkit/architect': false, + '@angular/compiler': true, + '@angular/compiler-cli': true, +}; + +const determineVersions = deps => { + let newDeps = []; + for (const [name, stable] of Object.entries(isStable)) { + if (deps[name]) { + let versionRange = stable ? `^${version}.0.0` : `'>=0.${version}00.0 < 0.${version + 1}00.0'`; + console.log(`Found dependency ${name}, new version range is ${versionRange}`); + newDeps.push(`${name}@${versionRange}`); + } + } + + return newDeps; +}; + +const runUpdate = (newDeps, dev) => { + console.log(`Executing 'yarn add ${dev ? '-D' : ''}'`); + const command = `yarn add ${dev ? '-D' : ''} ${newDeps.join(' ')}`; + execSync(command); +}; + +const updatePackage = () => { + console.log(`Updating package ${package.name}`); + let updated = false; + for (const deps of [package.dependencies, package.devDependencies]) { + const newDeps = determineVersions(deps); + if (newDeps.length > 0) { + runUpdate(newDeps, deps === package.devDependencies); + updated = true; + } + } + if (updated) { + console.log(`Successfully updated ${package.name}`); + } else { + console.log(`No dependencies to update`); + } +}; + +updatePackage();