Skip to content

Commit

Permalink
build: update angular packages to version 17 (#462)
Browse files Browse the repository at this point in the history
* build: update angular packages to version 17

BREAKING CHANGE: Drop support for Angular versions prior to 17.0

* build(app): update build script
  • Loading branch information
kukhariev authored Nov 19, 2024
1 parent d2ba193 commit 50526bc
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 47 deletions.
4 changes: 2 additions & 2 deletions integrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"description": "Some script examples",
"scripts": {
"build:latest": "npm run build:ng latest -prefix ../",
"build:ng16": "npm run build:ng 16 -prefix ../",
"build:ng18": "npm run build:ng 18 -prefix ../",
"build:next": "npm run build:ng next -prefix ../",
"test:latest": "npm run test -prefix latest",
"clean": "npx rimraf ./*/",
"serve:latest": "npx angular-http-server --path latest/dist/latest/browser",
"serve:next": "npx angular-http-server --path next/dist/next/browser",
"serve:ng16": "npx angular-http-server --path ng16/dist/ng16"
"serve:ng18": "npx angular-http-server --path ng18/dist/ng18"
}
}
52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,55 +47,55 @@
"prettier": "prettier --write \"**/*.{js,json,scss,md,ts,html}\""
},
"devDependencies": {
"@angular-devkit/build-angular": "~14.2.11",
"@angular-eslint/builder": "^14.4.0",
"@angular-eslint/eslint-plugin": "^14.4.0",
"@angular-eslint/eslint-plugin-template": "^14.4.0",
"@angular-eslint/schematics": "^14.4.0",
"@angular-eslint/template-parser": "^14.4.0",
"@angular/cli": "~14.2.11",
"@angular/common": "~14.2.0",
"@angular/compiler": "~14.2.0",
"@angular/compiler-cli": "~14.2.0",
"@angular/core": "~14.2.0",
"@angular/platform-browser": "~14.2.0",
"@angular/platform-browser-dynamic": "~14.2.0",
"@angular/router": "~14.2.0",
"@angular-devkit/build-angular": "^17.3.11",
"@angular-eslint/builder": "^17.5.3",
"@angular-eslint/eslint-plugin": "^17.5.3",
"@angular-eslint/eslint-plugin-template": "^17.5.3",
"@angular-eslint/schematics": "^17.5.3",
"@angular-eslint/template-parser": "^17.5.3",
"@angular/cli": "^17.3.11",
"@angular/common": "^17.3.0",
"@angular/compiler": "^17.3.0",
"@angular/compiler-cli": "^17.3.0",
"@angular/core": "^17.3.0",
"@angular/platform-browser": "^17.3.0",
"@angular/platform-browser-dynamic": "^17.3.0",
"@angular/router": "^17.3.0",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@playwright/test": "^1.36.1",
"@types/jasmine": "~4.0.0",
"@types/jasmine": "~5.1.0",
"@types/node": "^18.19.33",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@uploadx/core": "^6.1.4",
"angular-http-server": "^1.11.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.0.11",
"jasmine-core": "~4.3.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"karma-jasmine-html-reporter": "~2.1.0",
"lint-staged": "^15.2.4",
"ng-packagr": "^14.2.2",
"ng-packagr": "^17.3.0",
"npm-run-all": "^4.1.5",
"prettier": "3.2.5",
"recursive-copy": "^2.0.14",
"rimraf": "^3.0.2",
"rxjs": "~7.5.0",
"rxjs": "~7.8.0",
"semver": "^7.5.4",
"ts-node": "^10.9.1",
"tslib": "^2.3.0",
"typescript": "~4.7.2",
"zone.js": "~0.11.4"
"typescript": "~5.4.2",
"zone.js": "~0.14.3"
},
"peerDependencies": {
"@angular/core": ">=14.0.0 <19.0.0",
"rxjs": "^6.4.0 || ^7.0.0"
"@angular/core": ">=17.0.0 <19.0.0",
"rxjs": "^6.5.3 || ^7.4.0"
},
"lint-staged": {
"*.{js,json,scss,md,ts,html}": [
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async function build(cliTag = 'latest') {

console.info('- Migrate project...');
process.chdir(projectPath);
const ngUpdateCmd = `npx ng update @angular/core --allow-dirty --migrate-only=true --from=14 --to=${angularVersion}`;
const ngUpdateCmd = `npx ng update @angular/core --allow-dirty --migrate-only=true --from=17 --to=${angularVersion}`;
execSync(ngUpdateCmd, { cwd: projectPath, stdio: [0, 1, 2] });

console.info(`- Running "${buildCmd}" for "${projectPath}"`);
Expand Down
15 changes: 0 additions & 15 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,7 @@ 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);
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"moduleResolution": "node",
"importHelpers": true,
"skipLibCheck": true,
"target": "es2020",
"module": "es2020",
"lib": ["es2020", "dom"],
"target": "es2022",
"module": "es2022",
"lib": ["es2022", "dom"],
"paths": {
"ngx-uploadx": ["src/uploadx/"]
}
Expand Down

0 comments on commit 50526bc

Please sign in to comment.