Skip to content

Commit ff9bf09

Browse files
authored
feat(ngx-env/builder): compat with v18 (#98)
* chore: update packages and schemas * fix webpack typing * chore: playwright as a dep * chore: update versions * chore: install playwright with deps
1 parent cc9672b commit ff9bf09

File tree

34 files changed

+15115
-12892
lines changed

34 files changed

+15115
-12892
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Build and Test Examples
3030
run: |
3131
cd examples
32-
npx playwright install --with-deps
32+
pnpm playwright install --with-deps
3333
cd apps/ng-app-cli
3434
# npx ng add ../../../packages/angular --skip-confirmation
3535
npx tsc --noEmit --project tsconfig.app.json

examples/apps/ng-app-cli/package.json

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,42 @@
1818
},
1919
"private": true,
2020
"dependencies": {
21-
"@angular/animations": "^17.2.0",
22-
"@angular/common": "^17.2.0",
23-
"@angular/localize": "^17.2.0",
24-
"@angular/compiler": "^17.2.0",
25-
"@angular/core": "^17.2.0",
26-
"@angular/forms": "^17.2.0",
27-
"@angular/platform-browser": "^17.2.0",
28-
"@angular/platform-browser-dynamic": "^17.2.0",
29-
"@angular/platform-server": "^17.2.0",
30-
"@angular/router": "^17.2.0",
31-
"@angular/ssr": "^17.2.0",
21+
"@angular/animations": "^18.0.0",
22+
"@angular/common": "^18.0.0",
23+
"@angular/localize": "^18.0.0",
24+
"@angular/compiler": "^18.0.0",
25+
"@angular/core": "^18.0.0",
26+
"@angular/forms": "^18.0.0",
27+
"@angular/platform-browser": "^18.0.0",
28+
"@angular/platform-browser-dynamic": "^18.0.0",
29+
"@angular/platform-server": "^18.0.0",
30+
"@angular/router": "^18.0.0",
31+
"@angular/ssr": "^18.0.0",
3232
"express": "^4.18.2",
3333
"rxjs": "~7.8.0",
3434
"tslib": "^2.3.0",
3535
"zone.js": "~0.14.2"
3636
},
3737
"devDependencies": {
38-
"@angular-devkit/build-angular": "^17.2.0",
39-
"@angular/cli": "^17.2.0",
40-
"@angular/compiler-cli": "^17.2.0",
38+
"@angular-devkit/build-angular": "^18.0.0",
39+
"@angular/cli": "^18.0.0",
40+
"@angular/compiler-cli": "^18.0.0",
4141
"@dotenv-run/core": "*",
4242
"@dotenv-run/jest-angular": "*",
4343
"@jest/transform": "^29.7.0",
44-
"@ngx-env/builder": "*",
44+
"@ngx-env/builder": "../../../packages/angular",
4545
"@types/express": "^4.17.17",
4646
"@types/jasmine": "~5.1.0",
4747
"@types/node": "^18.18.0",
48-
"esbuild": "0.20.0",
48+
"esbuild": "0.21.3",
4949
"jasmine-core": "~5.1.0",
5050
"jest": "^29.7.0",
51-
"jest-preset-angular": "14.0.0",
5251
"karma": "~6.4.0",
5352
"karma-chrome-launcher": "~3.2.0",
5453
"karma-coverage": "~2.2.0",
5554
"karma-jasmine": "~5.1.0",
5655
"karma-jasmine-html-reporter": "~2.1.0",
5756
"ts-jest": "^29.1.2",
58-
"typescript": "~5.2.2"
57+
"typescript": "^5.4.0"
5958
}
6059
}

examples/apps/ng-app-cli/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
</head>
1010
<body>
1111
<h1>%NODE_ENV%</h1>
12-
<app-root />
12+
<app-root></app-root>
1313
</body>
1414
</html>

examples/apps/ng-app-webpack/package.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,23 @@
1111
"static": "npx serve dist/ng-app-webpack/browser"
1212
},
1313
"dependencies": {
14-
"@angular/animations": "^16.0.0",
15-
"@angular/common": "^16.0.0",
16-
"@angular/compiler": "^16.0.0",
17-
"@angular/core": "^16.0.0",
18-
"@angular/platform-browser": "^16.0.0",
19-
"@angular/platform-browser-dynamic": "^16.0.0",
20-
"@angular/platform-server": "^16.0.0",
14+
"@angular/common": "^18.0.0",
15+
"@angular/compiler": "^18.0.0",
16+
"@angular/core": "^18.0.0",
17+
"@angular/platform-browser": "^18.0.0",
18+
"@angular/platform-browser-dynamic": "^18.0.0",
2119
"rxjs": "~7.6.0",
2220
"tslib": "^2.4.0",
23-
"zone.js": "~0.13.0"
21+
"zone.js": "~0.14.0"
2422
},
2523
"devDependencies": {
26-
"@angular-builders/custom-webpack": "^16.0.0",
27-
"@angular-devkit/build-angular": "^16.0.0",
28-
"@angular/cli": "^16.0.0",
29-
"@angular/compiler-cli": "^16.0.0",
30-
"@types/node": "^16.0.0",
24+
"@angular-builders/custom-webpack": "^17.0.0",
25+
"@angular-devkit/build-angular": "^18.0.0",
26+
"@angular/cli": "^18.0.0",
27+
"@angular/compiler-cli": "^18.0.0",
28+
"@types/node": "^18.0.0",
3129
"cross-env": "^7.0.3",
3230
"@dotenv-run/webpack": "^1.3.4",
33-
"typescript": "~4.9.3"
31+
"typescript": "~5.4"
3432
}
35-
}
33+
}
Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
11
interface ImportMeta {
2-
readonly env: ImportMetaEnv;
2+
env: ImportMetaEnv;
33
}
44

55
interface ImportMetaEnv {
6-
/**
7-
* Built-in environment variable.
8-
* @see Docs https://github.com/chihab/dotenv-run/packages/angular#ng_app_env.
9-
*/
106
readonly NG_APP_ENV: string;
117
readonly API_USERS: string;
12-
// Add your environment variables below
13-
// readonly NG_APP_API_URL: string;
14-
[key: string]: any;
8+
readonly NGX_VERSION: string;
159
}
16-
17-
declare var process: {
18-
env: {
19-
NG_APP_ENV: string;
20-
[key: string]: any;
21-
};
22-
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"status": "passed",
3+
"failedTests": []
4+
}

examples/apps/ng-app-webpack/tsconfig.app.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
{
33
"extends": "./tsconfig.json",
44
"compilerOptions": {
5-
"outDir": "./out-tsc/app",
6-
"types": []
5+
"outDir": "./out-tsc/app"
76
},
87
"files": ["src/main.ts", "src/polyfills.ts"],
9-
"include": ["src/**/*.d.ts"]
8+
"include": ["src/env.d.ts"]
109
}

examples/apps/ng-app-webpack/webpack.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { Configuration } from 'webpack';
44
export default (config: Configuration) => {
55
config.plugins?.push(
66
new DotenvRunPlugin({
7-
root: "../..",
7+
root: '../..',
88
cwd: process.cwd(),
99
prefix: /^API|NGX/,
1010
verbose: true,

examples/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@
1111
"@dotenv-run/cli": "^1.3.5",
1212
"@dotenv-run/load": "^1.3.4",
1313
"@dotenv-run/rollup": "^1.3.4",
14-
"@dotenv-run/webpack": "^1.3.4",
14+
"@dotenv-run/webpack": "^1.4.0",
1515
"@nx/js": "^18.2.1",
16-
"@playwright/test": "^1.37.1",
16+
"@playwright/test": "^1.44.1",
17+
"@types/node": "^20.12.12",
1718
"nx": "^16.5.5",
19+
"playwright": "^1.44.1",
1820
"rollup": "^3.0.0",
1921
"serve": "^14.2.1",
2022
"verdaccio": "^5.0.4",
21-
"webpack": "5.90.1",
23+
"webpack": "5.91.0",
2224
"webpack-cli": "^5.0.0"
2325
},
2426
"nx": {
2527
"includedScripts": []
26-
},
27-
"dependencies": {}
28+
}
2829
}

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,18 @@
1111
},
1212
"license": "MIT",
1313
"devDependencies": {
14-
"@changesets/cli": "^2.27.1",
14+
"@changesets/cli": "^2.27.3",
1515
"concurrently": "^8.2.2",
1616
"husky": "^8.0.0",
1717
"turbo": "^1.12.4",
18-
"typescript": "^5.3.3",
18+
"typescript": "^5.4.0",
1919
"vitest": "^0.33.0"
20+
},
21+
"workspaces": {
22+
"packages": [
23+
"examples",
24+
"packages/*",
25+
"docs"
26+
]
2027
}
2128
}

0 commit comments

Comments
 (0)