Skip to content

Commit

Permalink
build: update angular packages to version 14
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Drop support for Angular versions prior to 14.0
  • Loading branch information
kukhariev committed Feb 24, 2023
1 parent 4489747 commit 89632fa
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 31 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ src/uploadx/package.json
/test-results/
/playwright-report/
/playwright/.cache/
.angular
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@
"prettier": "prettier --write \"**/*.{js,json,scss,md,ts,html}\""
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.18",
"@angular-eslint/builder": "^12.7.0",
"@angular-eslint/eslint-plugin": "^12.7.0",
"@angular-eslint/eslint-plugin-template": "^12.7.0",
"@angular-eslint/schematics": "^12.7.0",
"@angular-eslint/template-parser": "^12.7.0",
"@angular/cli": "~12.2.18",
"@angular/common": "~12.2.17",
"@angular/compiler": "~12.2.17",
"@angular/compiler-cli": "~12.2.17",
"@angular/core": "~12.2.17",
"@angular/platform-browser": "~12.2.17",
"@angular/platform-browser-dynamic": "~12.2.17",
"@angular/router": "~12.2.17",
"@angular-devkit/build-angular": "~14.2.10",
"@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.10",
"@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",
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2",
"@playwright/test": "^1.25.0",
Expand All @@ -73,27 +73,27 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.1",
"jasmine-core": "~4.1.0",
"karma": "~6.3.0",
"jasmine-core": "~4.3.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"lint-staged": "^13.0.0",
"ng-packagr": "^12.2.7",
"ng-packagr": "^14.2.2",
"npm-run-all": "^4.1.5",
"prettier": "2.8.0",
"recursive-copy": "^2.0.14",
"rimraf": "^3.0.2",
"rxjs": "~6.6.7",
"rxjs": "~7.5.0",
"semver": "^7.3.8",
"ts-node": "^10.2.1",
"tslib": "^2.0.0",
"typescript": "~4.3.5",
"tslib": "^2.3.0",
"typescript": "~4.7.2",
"zone.js": "~0.11.4"
},
"peerDependencies": {
"@angular/core": ">=12.0.0 <16.0.0",
"@angular/core": ">=14.0.0 <16.0.0",
"rxjs": "^6.4.0 || ^7.0.0"
},
"lint-staged": {
Expand Down
10 changes: 2 additions & 8 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const packagr = require('ng-packagr');
async function buildPkg() {
try {
const libPackagePath = 'src/uploadx/package.json';
const ngPackagePath = 'src/uploadx/ng-package.json';
const rootPackage = JSON.parse(await fsp.readFile('package.json', 'utf8'));
const libPackage = {};
libPackage.name = rootPackage.name;
Expand All @@ -15,17 +16,10 @@ async function buildPkg() {
libPackage.homepage = rootPackage.homepage;
libPackage.license = rootPackage.license;
libPackage.peerDependencies = rootPackage.peerDependencies;
libPackage.ngPackage = {
lib: {
entryFile: 'public-api.ts'
},
dest: '../../dist/uploadx',
deleteDestPath: true
};
await fsp.writeFile(libPackagePath, JSON.stringify(libPackage));
await packagr
.ngPackagr()
.forProject(libPackagePath)
.forProject(ngPackagePath)
.withTsConfig('src/uploadx/tsconfig.lib.json')
.build();
await fsp.copyFile('LICENSE', 'dist/uploadx/LICENSE');
Expand Down
7 changes: 7 additions & 0 deletions src/uploadx/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"lib": {
"entryFile": "public-api.ts"
},
"dest": "../../dist/uploadx",
"deleteDestPath": true
}

0 comments on commit 89632fa

Please sign in to comment.