Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/beta-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
chmod 600 ~/.ssh/deploy_key
rsync -avz --delete \
-e "ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no -p ${{ secrets.BETA_PORT }}" \
./dist/ \
./dist/browser/ \
${{ secrets.BETA_UID }}@${{ secrets.BETA_HOST }}:/home/${{ secrets.BETA_UID }}/d2checklist-beta/
rm -f ~/.ssh/deploy_key
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ jobs:
chmod 600 ~/.ssh/deploy_key
rsync -avz --delete \
-e "ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no -p ${{ secrets.PORT }}" \
./dist/ \
./dist/browser/ \
${{ secrets.UID }}@${{ secrets.HOST }}:/home/${{ secrets.UID }}/d2checklist/
rm -f ~/.ssh/deploy_key
31 changes: 11 additions & 20 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"aot": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"browser": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"stylePreprocessorOptions": {
"includePaths": [
"src",
Expand Down Expand Up @@ -62,31 +63,19 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
"serviceWorker": "ngsw-config.json"
},
"development": {
"buildOptimizer": false,
"optimization": {
"scripts": false,
"styles": false,
"fonts": false
},
"vendorChunk": true,
"optimization": false,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
"sourceMap": true
}
},
"defaultConfiguration": "development"
Expand Down Expand Up @@ -117,7 +106,9 @@
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [
Expand Down
8 changes: 7 additions & 1 deletion docs/modernization-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,13 @@ Angular migrations must go one major version at a time:
- Removed `unsubscribe$` from 7 root services (singletons never destroy)
- Deleted unused `StreamingChildComponent`
- [ ] Adopt Angular signals where beneficial
- [ ] Evaluate esbuild-based builder (`@angular-devkit/build-angular:application`)
- [x] Evaluate esbuild-based builder (`@angular-devkit/build-angular:application`)
- Switched from webpack `browser` builder to esbuild `application` builder
- Replaced `require()` with ESM `import` for package.json in environment files
- Removed polyfills.ts (zone.js now specified in angular.json polyfills array)
- Removed webpack-only options: `vendorChunk`, `buildOptimizer`, `namedChunks`, `aot`
- Updated deploy workflows for new `dist/browser/` output path
- Updated tsconfig: `module: "ES2022"`, `moduleResolution: "bundler"`, `resolveJsonModule: true`

**Done (7a+7b).** Running on Angular 18.2.14. Post-migration modernization (7c) is optional follow-up work.

Expand Down
47 changes: 10 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d2-checklist",
"version": "29.2.0",
"version": "29.3.0",
"manifest": "242999.26.03.25.2000-1-bnet.64463",
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -71,13 +71,14 @@
"bungie-api-ts": "4.21.0",
"eslint": "^8.57.0",
"jasmine-core": "~4.5.0",
"jsonc-parser": "^3.3.1",
"jszip": "3.10.1",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"karma-spec-reporter": "^0.0.36",
"jszip": "3.10.1",
"sql.js": "^1.14.1",
"ts-node": "10.9.1",
"typescript": "5.4.5"
Expand Down
5 changes: 1 addition & 4 deletions src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { bungieProd } from './keys-prod';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const packageJson = require('../../package.json');
import packageJson from '../../package.json';
export const environment = {
bungie: bungieProd,
production: true,
Expand All @@ -10,7 +8,6 @@ export const environment = {
manifest: packageJson.manifest,
angular: packageJson.dependencies['@angular/core'],
material: packageJson.dependencies['@angular/material'],
bootstrap: packageJson.dependencies.bootstrap,
rxjs: packageJson.dependencies.rxjs,
angularCli: packageJson.devDependencies['@angular/cli']
}
Expand Down
5 changes: 1 addition & 4 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { bungieDev } from './keys';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const packageJson = require('../../package.json');
import packageJson from '../../package.json';

export const environment = {
bungie: bungieDev,
Expand All @@ -11,7 +9,6 @@ export const environment = {
manifest: packageJson.manifest,
angular: packageJson.dependencies['@angular/core'],
material: packageJson.dependencies['@angular/material'],
bootstrap: packageJson.dependencies.bootstrap,
rxjs: packageJson.dependencies.rxjs,
angularCli: packageJson.devDependencies['@angular/cli']
}
Expand Down
53 changes: 0 additions & 53 deletions src/polyfills.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
]
},
"files": [
"main.ts",
"polyfills.ts"
"main.ts"
],
"include": [
"**/*.d.ts"
Expand Down
3 changes: 1 addition & 2 deletions src/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
]
},
"files": [
"test.ts",
"polyfills.ts"
"test.ts"
],
"include": [
"**/*.spec.ts",
Expand Down
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"importHelpers": true,
"target": "ES2022",
"module": "es2020",
"module": "ES2022",
"resolveJsonModule": true,
"lib": [
"es2020",
"ES2022",
"dom"
],
"paths": {
Expand Down
Loading