Skip to content

Commit

Permalink
Merge pull request #632 from chimurai/ng15
Browse files Browse the repository at this point in the history
chore: update to angular 15
  • Loading branch information
salemdar authored Mar 15, 2023
2 parents be9a6f0 + 3212768 commit e0445b5
Show file tree
Hide file tree
Showing 14 changed files with 2,391 additions and 2,497 deletions.
11 changes: 10 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,15 @@
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
]
],
"analytics": false
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}
52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,41 +45,41 @@
"url": "https://github.com/salemdar/ngx-cookie/issues"
},
"dependencies": {
"@angular/animations": "^14.0.4",
"@angular/common": "^14.0.4",
"@angular/compiler": "^14.0.4",
"@angular/core": "^14.0.4",
"@angular/forms": "^14.0.4",
"@angular/platform-browser": "^14.0.4",
"@angular/platform-browser-dynamic": "^14.0.4",
"@angular/platform-server": "^14.0.4",
"@angular/router": "^14.0.4",
"@nguniversal/express-engine": "^14.0.2",
"@angular/animations": "^15.1.4",
"@angular/common": "^15.1.4",
"@angular/compiler": "^15.1.4",
"@angular/core": "^15.1.4",
"@angular/forms": "^15.1.4",
"@angular/platform-browser": "^15.1.4",
"@angular/platform-browser-dynamic": "^15.1.4",
"@angular/platform-server": "^15.1.4",
"@angular/router": "^15.1.4",
"@nguniversal/express-engine": "^15.1.0",
"express": "^4.15.2",
"rxjs": "~7.5.5",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.0.4",
"@angular-eslint/builder": "14.0.0",
"@angular-eslint/eslint-plugin": "14.0.0",
"@angular-eslint/eslint-plugin-template": "14.0.0",
"@angular-eslint/schematics": "14.0.0",
"@angular-eslint/template-parser": "14.0.0",
"@angular/cli": "^14.0.4",
"@angular/compiler-cli": "^14.0.4",
"@angular/language-service": "^14.0.4",
"@angular-devkit/build-angular": "^15.1.5",
"@angular-eslint/builder": "15.2.1",
"@angular-eslint/eslint-plugin": "15.2.1",
"@angular-eslint/eslint-plugin-template": "15.2.1",
"@angular-eslint/schematics": "15.2.1",
"@angular-eslint/template-parser": "15.2.1",
"@angular/cli": "^15.1.5",
"@angular/compiler-cli": "^15.1.4",
"@angular/language-service": "^15.1.4",
"@cypress/schematic": "2.0.0",
"@nguniversal/builders": "^14.0.2",
"@nguniversal/builders": "^15.1.0",
"@types/express": "^4.17.8",
"@types/jasmine": "~4.0.3",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"@types/node": "^18.13.0",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"cypress": "^10.3.0",
"eslint": "^8.18.0",
"eslint": "^8.28.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "39.3.3",
"eslint-plugin-prefer-arrow": "^1.2.3",
Expand All @@ -89,8 +89,8 @@
"karma-coverage": "^2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"ng-packagr": "^14.0.2",
"ng-packagr": "^15.1.2",
"ts-node": "~10.8.1",
"typescript": "~4.7.4"
"typescript": "~4.9.5"
}
}
5 changes: 2 additions & 3 deletions projects/backend-test-app/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ const routes: Routes = [];
@NgModule({
imports: [
RouterModule.forRoot(routes, {
initialNavigation: 'enabledBlocking',
relativeLinkResolution: 'legacy'
})
initialNavigation: 'enabledBlocking'
})
],
exports: [RouterModule]
})
Expand Down
2 changes: 1 addition & 1 deletion projects/backend-test-app/src/main.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ if (environment.production) {
}

export { AppServerModule } from './app/app.server.module';
export { renderModule, renderModuleFactory } from '@angular/platform-server';
export { renderModuleFactory } from '@angular/platform-server';
11 changes: 0 additions & 11 deletions projects/backend-test-app/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,10 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
1 change: 0 additions & 1 deletion projects/backend-test-app/tsconfig.server.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"types": [
"node"
]
, "target": "es2016"
},
"files": [
"src/main.server.ts",
Expand Down
11 changes: 0 additions & 11 deletions projects/ngx-cookie-backend/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,10 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
1 change: 0 additions & 1 deletion projects/ngx-cookie-backend/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2020",
"declaration": true,
"inlineSources": true,
"types": [],
Expand Down
3 changes: 2 additions & 1 deletion projects/ngx-cookie/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export function isEmpty(value: unknown): value is undefined | null | '' | EmptyA
if (isNil(value)) {
return true;
}
if (value === {}) {
// FIXME: This condition will always return 'false' since JavaScript compares objects by reference, not value.ts(2839)
if (value === {} as unknown) {
return true;
}
if (isString(value) && value.length === 0) {
Expand Down
11 changes: 0 additions & 11 deletions projects/ngx-cookie/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,10 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
1 change: 0 additions & 1 deletion projects/ngx-cookie/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2020",
"declaration": true,
"inlineSources": true,
"types": [],
Expand Down
11 changes: 0 additions & 11 deletions projects/test-app/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,10 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2020",
"target": "ES2022",
"module": "es2020",
"lib": [
"es2018",
Expand All @@ -29,7 +29,8 @@
"dist/ngx-cookie-backend/ngx-cookie-backend",
"dist/ngx-cookie-backend"
]
}
},
"useDefineForClassFields": false
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
Loading

0 comments on commit e0445b5

Please sign in to comment.