Update to Angular 15

This commit is contained in:
2026-03-24 20:30:01 +01:00
parent 5e578a292a
commit e009dd4dd0
4 changed files with 2361 additions and 5393 deletions
+2306 -5352
View File
File diff suppressed because it is too large Load Diff
+21 -21
View File
@@ -18,8 +18,8 @@
"ts-watch": "npm run ts -- --watch",
"ts-cov": "npm run ts -- --target es5",
"ts-cov-watch": "npm run ts -- --target es5 --watch",
"webpack-prod": "node --max_old_space_size=8192 node_modules/webpack-cli/bin/cli --config webpack.prod.js --progress --color",
"webpack-prod-parallel": "node --max_old_space_size=8192 node_modules/parallel-webpack/bin/run --config webpack.prod.js --progress --color",
"webpack-prod": "node --max_old_space_size=8192 node_modules/webpack-cli/bin/cli --config webpack.prod.mjs --progress --color",
"webpack-prod-parallel": "node --max_old_space_size=8192 node_modules/parallel-webpack/bin/run --config webpack.prod.mjs --progress --color",
"webpack-main": "npm run webpack-prod -- --env.main",
"webpack-analyze": "npm run webpack-prod -- --env.analyze",
"webpack-debug": "npm run webpack-prod -- --env.debug",
@@ -50,24 +50,24 @@
"webpack-cli": "^7.0.2"
},
"dependencies": {
"@angular-devkit/build-angular": "^14.2.13",
"@angular/animations": "^14.3.0",
"@angular/cdk": "^14.2.7",
"@angular/common": "^14.3.0",
"@angular/compiler": "^14.3.0",
"@angular/compiler-cli": "^14.3.0",
"@angular/core": "^14.3.0",
"@angular/forms": "^14.3.0",
"@angular/platform-browser": "^14.3.0",
"@angular/platform-browser-dynamic": "^14.3.0",
"@angular/platform-server": "^14.3.0",
"@angular/router": "^14.3.0",
"@angular-devkit/build-angular": "^15.2.11",
"@angular/animations": "^15.2.10",
"@angular/cdk": "^15.2.9",
"@angular/common": "^15.2.10",
"@angular/compiler": "^15.2.10",
"@angular/compiler-cli": "^15.2.10",
"@angular/core": "^15.2.10",
"@angular/forms": "^15.2.10",
"@angular/platform-browser": "^15.2.10",
"@angular/platform-browser-dynamic": "^15.2.10",
"@angular/platform-server": "^15.2.10",
"@angular/router": "^15.2.10",
"@encharm/cws": "^4.5.3",
"@fortawesome/angular-fontawesome": "^0.11.1",
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@ngtools/webpack": "^14.2.13",
"@ngtools/webpack": "^15.2.11",
"@passport-next/passport-facebook": "^3.1.2",
"@passport-next/passport-google-oauth2": "^1.0.0",
"@types/base64-js": "^1.2.5",
@@ -167,7 +167,7 @@
"moment": "^2.24.0",
"mongoose": "^5.6.11",
"morgan": "^1.9.1",
"ngx-bootstrap": "^9.0.0",
"ngx-bootstrap": "^11.0.2",
"node-ipc": "^9.1.1",
"parallel-webpack": "^2.4.0",
"passport": "^0.4.0",
@@ -181,9 +181,9 @@
"passport-vkontakte": "^0.3.2",
"postcss": "^8.5.8",
"postcss-loader": "^8.2.1",
"pug": "^2.0.4",
"pug-html-loader": "^1.1.5",
"pug-plugin-ng": "0.0.2",
"pug": "^3.0.4",
"pug-html-loader": "^1.1.7",
"pug-plugin-ng": "^0.0.3",
"raw-loader": "^4.0.2",
"reflect-metadata": "^0.1.13",
"remap-istanbul": "^0.13.0",
@@ -206,7 +206,7 @@
"tslib": "^2.8.1",
"tslint": "^5.19.0",
"tsutils": "^3.17.1",
"typescript": "^4.7.4",
"typescript": "~4.9",
"ua-parser-js": "^0.7.20",
"webgl-debug": "^2.0.1",
"webpack-bundle-analyzer": "^5.2.0",
@@ -215,6 +215,6 @@
"workbox-cli": "^4.3.1",
"wrapper-webpack-plugin": "^2.2.2",
"yargs": "^14.0.0",
"zone.js": "^0.11.8"
"zone.js": "^0.12.0"
}
}
+17 -5
View File
@@ -5,7 +5,7 @@ const common = require('./webpack.common.js');
const compilerOptions = {
...require('./tsconfig.json').compilerOptions,
target: 'es6',
module: 'es2015',
module: 'es2016',
};
module.exports = merge(common, {
@@ -18,15 +18,26 @@ module.exports = merge(common, {
devtool: 'eval-cheap-source-map',
devServer: {
host: '0.0.0.0',
port: 8090,
port: 8091,
hot: true,
historyApiFallback: true,
compress: false,
allowedHosts: ['all'],
client: {
progress: true,
overlay: {
errors: true,
warnings: false
}
},
static: {
publicPath: '/assets/scripts/',
},
allowedHosts: 'all',
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET',
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
}
}
},
stats: {
preset: 'normal',
@@ -34,7 +45,7 @@ module.exports = merge(common, {
modules: true,
errorDetails: true,
moduleTrace: true
},
},
output: {
pathinfo: false
},
@@ -72,6 +83,7 @@ module.exports = merge(common, {
},
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
DEVELOPMENT: true, TOOLS: true, SERVER: false,
BETA: true, TIMING: true, TESTS: false
+17 -15
View File
@@ -1,13 +1,15 @@
const path = require('path');
const webpack = require('webpack');
const { merge } = require('webpack-merge');
const TerserPlugin = require('terser-webpack-plugin');
const WrapperPlugin = require('wrapper-webpack-plugin');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const { AngularWebpackPlugin } = require('@ngtools/webpack');
const linkerPlugin = require('@angular/compiler-cli/linker/babel');
const common = require('./webpack.common.js');
const fs = require('fs');
import path from 'path';
import webpack from 'webpack';
import { merge } from 'webpack-merge';
import TerserPlugin from 'terser-webpack-plugin';
import WrapperPlugin from 'wrapper-webpack-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import { AngularWebpackPlugin } from '@ngtools/webpack';
import linkerPlugin from '@angular/compiler-cli/linker/babel';
import common from './webpack.common.js';
import fs from 'fs';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const r = p => JSON.parse(fs.readFileSync(p, 'utf8'));
@@ -32,8 +34,8 @@ const scripts = [
['bootstrap-tools', 'tools/tools.module#ToolsAppModule', 'assets', compilerOptions, 'tsconfig-aot-tools.json', 5, true],
];
const toolsScrips = ['bootstrap-tools', 'tools/tools.module#ToolsAppModule', 'assets', compilerOptions, 'tsconfig-aot-tools.json', 5, true];
const max = Math.max(...([...scripts, toolsScrips].map(e => e[0].length)));
const max = Math.max(...([...scripts].map(e => e[0].length)));
function getScripts(args) {
const { analyze, main, admin, tools, beta } = args;
if (tools || beta) {
@@ -49,7 +51,7 @@ function getScripts(args) {
}
}
module.exports = (args = {}) =>
export default (args = {}) =>
getScripts(args)
.map(([script, entry, outDir, compilerOptions, tsconfig, _ecma, TOOLS]) => merge(common, {
mode: 'production',
@@ -62,7 +64,7 @@ module.exports = (args = {}) =>
},
output: Object.assign({}, common.output, {
filename: '[name]-[chunkhash:10].js',
path: path.resolve(__dirname, 'build', outDir, 'scripts'),
path: path.resolve(__dirname, 'dist', 'browser' , outDir, 'scripts'),
}),
devtool: script === 'bootstrap' ? 'source-map' : false,
module: {
@@ -95,7 +97,7 @@ module.exports = (args = {}) =>
modules: true,
errorDetails: true,
moduleTrace: true
},
},
optimization: {
minimizer: [
new TerserPlugin({