Update to Angular 14
This commit is contained in:
parent
6d65f9cc00
commit
c33f197ad9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -4,4 +4,4 @@ plugins:
|
|||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
||||
spec: "@yarnpkg/plugin-interactive-tools"
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.2.0.cjs
|
||||
yarnPath: .yarn/releases/yarn-3.2.1.cjs
|
||||
|
|
|
@ -159,7 +159,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "angular-fontawesome",
|
||||
"cli": {
|
||||
"analytics": false
|
||||
}
|
||||
|
|
72
package.json
72
package.json
|
@ -25,51 +25,51 @@
|
|||
},
|
||||
"homepage": "https://github.com/FortAwesome/angular-fontawesome",
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~13.3.0",
|
||||
"@angular-devkit/core": "~13.3.0",
|
||||
"@angular-devkit/schematics": "~13.3.0",
|
||||
"@angular-eslint/builder": "^13.1.0",
|
||||
"@angular-eslint/eslint-plugin": "^13.1.0",
|
||||
"@angular-eslint/eslint-plugin-template": "^13.1.0",
|
||||
"@angular-eslint/schematics": "13.1.0",
|
||||
"@angular-eslint/template-parser": "^13.1.0",
|
||||
"@angular/cli": "~13.3.0",
|
||||
"@angular/common": "~13.3.0",
|
||||
"@angular/compiler": "~13.3.0",
|
||||
"@angular/compiler-cli": "~13.3.0",
|
||||
"@angular/core": "~13.3.0",
|
||||
"@angular/language-service": "~13.3.0",
|
||||
"@angular/platform-browser": "~13.3.0",
|
||||
"@angular/platform-browser-dynamic": "~13.3.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.1.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.1.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.1.0",
|
||||
"@types/jasmine": "~4.0.0",
|
||||
"@types/node": "~16.11.26",
|
||||
"@typescript-eslint/eslint-plugin": "5.15.0",
|
||||
"@typescript-eslint/parser": "5.15.0",
|
||||
"eslint": "^8.11.0",
|
||||
"@angular-devkit/build-angular": "^14.0.0",
|
||||
"@angular-devkit/core": "^14.0.0",
|
||||
"@angular-devkit/schematics": "^14.0.0",
|
||||
"@angular-eslint/builder": "^14.0.0-alpha.0",
|
||||
"@angular-eslint/eslint-plugin": "^14.0.0-alpha.0",
|
||||
"@angular-eslint/eslint-plugin-template": "^14.0.0-alpha.0",
|
||||
"@angular-eslint/schematics": "14.0.0-alpha.0",
|
||||
"@angular-eslint/template-parser": "^14.0.0-alpha.0",
|
||||
"@angular/cli": "^14.0.0",
|
||||
"@angular/common": "^14.0.0",
|
||||
"@angular/compiler": "^14.0.0",
|
||||
"@angular/compiler-cli": "^14.0.0",
|
||||
"@angular/core": "^14.0.0",
|
||||
"@angular/language-service": "^14.0.0",
|
||||
"@angular/platform-browser": "^14.0.0",
|
||||
"@angular/platform-browser-dynamic": "^14.0.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.1.1",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.1.1",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.1.1",
|
||||
"@types/jasmine": "~4.0.3",
|
||||
"@types/node": "~16.11.38",
|
||||
"@typescript-eslint/eslint-plugin": "5.27.0",
|
||||
"@typescript-eslint/parser": "5.27.0",
|
||||
"eslint": "^8.16.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "2.25.4",
|
||||
"eslint-plugin-jsdoc": "^38.0.4",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-jsdoc": "^39.3.2",
|
||||
"eslint-plugin-prefer-arrow": "1.2.3",
|
||||
"jasmine-core": "~4.0.1",
|
||||
"jasmine-spec-reporter": "~7.0.0",
|
||||
"karma": "~6.3.17",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma": "~6.3.20",
|
||||
"karma-chrome-launcher": "~3.1.1",
|
||||
"karma-coverage": "~2.2.0",
|
||||
"karma-jasmine": "~4.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.7.0",
|
||||
"ng-packagr": "^13.3.0",
|
||||
"prettier": "2.6.0",
|
||||
"karma-jasmine": "~5.0.1",
|
||||
"karma-jasmine-html-reporter": "^2.0.0",
|
||||
"ng-packagr": "^14.0.0",
|
||||
"prettier": "2.6.2",
|
||||
"protractor": "~7.0.0",
|
||||
"rxjs": "^7.5.5",
|
||||
"ts-node": "~10.7.0",
|
||||
"typescript": "~4.6.2",
|
||||
"ts-node": "~10.8.0",
|
||||
"typescript": "~4.7.2",
|
||||
"zone.js": "~0.11.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.1"
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
"keywords": [
|
||||
"angular",
|
||||
|
@ -83,5 +83,5 @@
|
|||
"@fortawesome/fontawesome-svg-core": "~1.2.27 || ~1.3.0-beta2 || ^6.1.0"
|
||||
},
|
||||
"schematics": "./schematics/collection.json",
|
||||
"packageManager": "yarn@3.2.0"
|
||||
"packageManager": "yarn@3.2.1"
|
||||
}
|
||||
|
|
|
@ -8,7 +8,10 @@ import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@ang
|
|||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
|
||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
||||
errorOnUnknownElements: true,
|
||||
errorOnUnknownProperties: true,
|
||||
});
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
|
|
|
@ -10,7 +10,7 @@ describe('ng-add', () => {
|
|||
it('adds v6 dependencies to package.json', async () => {
|
||||
const { runner, appTree } = await setup();
|
||||
|
||||
const tree = await runner.runSchematicAsync<Schema>('ng-add', {}, appTree).toPromise();
|
||||
const tree = await runner.runSchematicAsync<Schema>('ng-add', { project: 'test-app' }, appTree).toPromise();
|
||||
|
||||
const packageJson = JSON.parse(tree.readContent('package.json'));
|
||||
expect(packageJson.dependencies).toBeDefined();
|
||||
|
@ -25,7 +25,9 @@ describe('ng-add', () => {
|
|||
it('adds v5 dependencies to package.json', async () => {
|
||||
const { runner, appTree } = await setup();
|
||||
|
||||
const tree = await runner.runSchematicAsync<Schema>('ng-add', { version: '5' }, appTree).toPromise();
|
||||
const tree = await runner
|
||||
.runSchematicAsync<Schema>('ng-add', { project: 'test-app', version: '5' }, appTree)
|
||||
.toPromise();
|
||||
|
||||
const packageJson = JSON.parse(tree.readContent('package.json'));
|
||||
expect(packageJson.dependencies).toBeDefined();
|
||||
|
@ -40,7 +42,7 @@ describe('ng-add', () => {
|
|||
it('adds FontAwesomeModule import to the AppModule', async () => {
|
||||
const { runner, appTree } = await setup();
|
||||
|
||||
const tree = await runner.runSchematicAsync<Schema>('ng-add', {}, appTree).toPromise();
|
||||
const tree = await runner.runSchematicAsync<Schema>('ng-add', { project: 'test-app' }, appTree).toPromise();
|
||||
|
||||
const contents = tree.readContent('src/app/app.module.ts');
|
||||
|
||||
|
@ -50,7 +52,7 @@ describe('ng-add', () => {
|
|||
it('installs @fortawesome/free-solid-svg-icons package by default', async () => {
|
||||
const { runner, appTree } = await setup();
|
||||
|
||||
const tree = await runner.runSchematicAsync<Schema>('ng-add', {}, appTree).toPromise();
|
||||
const tree = await runner.runSchematicAsync<Schema>('ng-add', { project: 'test-app' }, appTree).toPromise();
|
||||
|
||||
const packageJson = JSON.parse(tree.readContent('package.json'));
|
||||
expect(packageJson.dependencies).toBeDefined();
|
||||
|
|
|
@ -48,7 +48,7 @@ export default function (options: Schema): Rule {
|
|||
function addModule(options: Schema): Rule {
|
||||
return async (host: Tree) => {
|
||||
const workspace = await getWorkspace(host);
|
||||
const projectName = options.project ?? (workspace.extensions.defaultProject as string);
|
||||
const projectName = options.project as string;
|
||||
const project = workspace.projects.get(projectName);
|
||||
if (project == null) {
|
||||
throw new SchematicsException(`Project with name ${projectName} does not exist.`);
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"name": "@fortawesome/angular-fontawesome/testing"
|
||||
}
|
|
@ -9,7 +9,7 @@
|
|||
"moduleResolution": "node",
|
||||
"experimentalDecorators": true,
|
||||
"importHelpers": true,
|
||||
"target": "es2015",
|
||||
"target": "es2020",
|
||||
"strict": true,
|
||||
"strictPropertyInitialization": false,
|
||||
"strictNullChecks": false,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/lib",
|
||||
"declarationMap": true,
|
||||
"target": "es2015",
|
||||
"target": "es2020",
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"types": [],
|
||||
|
|
Loading…
Reference in New Issue