Skip to content

Commit 384e428

Browse files
wawyedchristopherthielen
authored andcommitted
feat(package): update uirouter angular dependency to support angular 9 and bundle with ng-packagr (#379)
* replace with ng-packager * chore(ng-packagr): add dist to gitignore, change angular peer deps to allow ng8, 9 and 9-next BREAKING CHANGE: This package drops support for Angular versions 7 and below. You must now upgrade to Angular 8 or higher to use this package. UIRouter dependencies have been moved to peerDependencies. You must now install peer dependencies manually using `npx check-peer-dependencies --install`.
1 parent 6d97d49 commit 384e428

File tree

4 files changed

+2041
-326
lines changed

4 files changed

+2041
-326
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ lib
33
**/_bundles
44
_bundles
55
yarn-error.log
6+
dist
67

78
# artifacts
89
*.d.ts

example/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@
1717
"@types/angular": "^1.6.39",
1818
"@types/jquery": "^3.2.16",
1919
"@uirouter/angular-hybrid": "latest",
20+
"@uirouter/core": "^6.0.1",
21+
"@uirouter/angular": "^6.0.0",
22+
"@uirouter/angularjs": "^1.0.23",
23+
"@uirouter/rx": "^0.6.0",
2024
"angular": "1.6.6",
2125
"rxjs": "^6.5.3",
2226
"ts-loader": "3.2.0",
2327
"typescript": "~3.4.0",
2428
"webpack": "3.10.0",
25-
"webpack-dev-server": "2.9.6"
29+
"webpack-dev-server": "2.9.6",
30+
"zone.js": "^0.9.1"
2631
},
2732
"devDependencies": {
2833
"@uirouter/cypress-runner": "^1.0.7"

package.json

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"version": "9.0.0",
44
"scripts": {
55
"example": "cd example && npm i && npm start",
6-
"clean": "shx rm -rf lib _bundles",
6+
"clean": "shx rm -rf lib _bundles dist",
77
"compile": "npm run clean && ngc",
8-
"build": "run-s clean compile bundle fixmaps:*",
8+
"build": "ng-packagr -p package.json",
99
"bundle": "rollup -c && rollup -c --environment MINIFY",
1010
"fixmaps:lib": "tweak_sourcemap_paths -a --include 'lib/**/*.js.map' 'lib-esm/**/*.js.map'",
1111
"fixmaps:bundle": "tweak_sourcemap_paths -p ../src --include '_bundles/**/*.js.map'",
@@ -15,28 +15,30 @@
1515
"prepublishOnly": "npm run build"
1616
},
1717
"license": "MIT",
18-
"dependencies": {
19-
"@uirouter/angular": "5.0.0",
20-
"@uirouter/angularjs": "1.0.23",
21-
"@uirouter/core": "6.0.1"
22-
},
2318
"peerDependencies": {
24-
"@angular/core": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0",
25-
"@angular/upgrade": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0",
19+
"@angular/core": "^8.0.0 || ^9.0.0 || ^9.0.0-next",
20+
"@angular/upgrade": "^8.0.0 || ^9.0.0 || ^9.0.0-next",
21+
"@uirouter/angular": "^6.0.0",
22+
"@uirouter/angularjs": "^1.0.23",
2623
"angular": "^1.5.0"
2724
},
2825
"devDependencies": {
29-
"@angular/common": "^5.2.11",
30-
"@angular/compiler": "^5.2.11",
31-
"@angular/compiler-cli": "^5.2.11",
32-
"@angular/core": "^5.2.11",
33-
"@angular/platform-browser": "^5.2.11",
34-
"@angular/platform-browser-dynamic": "^5.2.11",
35-
"@angular/upgrade": "^5.2.11",
26+
"@angular/common": "^8.2.13",
27+
"@angular/compiler": "^8.2.13",
28+
"@angular/compiler-cli": "^8.2.13",
29+
"@angular/core": "^8.2.13",
30+
"@angular/platform-browser": "^8.2.13",
31+
"@angular/platform-browser-dynamic": "^8.2.13",
32+
"@angular/upgrade": "^8.2.13",
3633
"@types/angular": "^1.6.51",
3734
"@types/jquery": "^3.3.17",
3835
"@uirouter/publish-scripts": "^2.3.40",
36+
"@uirouter/core": "^6.0.1",
37+
"@uirouter/angular": "^6.0.0",
38+
"@uirouter/angularjs": "^1.0.23",
39+
"@uirouter/rx": "^0.6.4",
3940
"angular": "^1.7.9",
41+
"ng-packagr": "^5.3.0",
4042
"husky": "^3.1.0",
4143
"prettier": "^1.19.1",
4244
"pretty-quick": "^2.0.1",
@@ -48,12 +50,15 @@
4850
"rxjs": "^6.5.3",
4951
"rxjs-compat": "^6.5.3",
5052
"shx": "^0.3.2",
51-
"typescript": "^3.7.2",
53+
"typescript": "~3.5.3",
5254
"zone.js": "^0.10.2"
5355
},
54-
"main": "_bundles/ui-router-angular-hybrid.js",
55-
"module": "lib/index.js",
56-
"typings": "lib/index.d.ts",
56+
"distDir": "dist",
57+
"ngPackage": {
58+
"lib": {
59+
"entryFile": "src/index.ts"
60+
}
61+
},
5762
"repository": {
5863
"type": "git",
5964
"url": "https://github.com/ui-router/angular-hybrid.git"

0 commit comments

Comments
 (0)