Bump Angular to v12 (#2215)
This commit is contained in:
parent
e835a53b80
commit
559be594d6
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit a6b95b15e36737ccf2e7664ed3c881bc19366b84
|
Subproject commit 6a179ab2dfacbc1dbd5dd4c185bc57cbac168994
|
|
@ -7,7 +7,7 @@ module.exports = function(config) {
|
||||||
|
|
||||||
// frameworks to use
|
// frameworks to use
|
||||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||||
frameworks: ['jasmine'],
|
frameworks: ['jasmine', 'webpack'],
|
||||||
|
|
||||||
// list of files / patterns to load in the browser
|
// list of files / patterns to load in the browser
|
||||||
files: [
|
files: [
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
46
package.json
46
package.json
|
@ -27,27 +27,27 @@
|
||||||
"test:watch": "karma start"
|
"test:watch": "karma start"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular/compiler-cli": "^11.2.11",
|
"@angular/compiler-cli": "^12.2.13",
|
||||||
"@ngtools/webpack": "^11.2.10",
|
"@ngtools/webpack": "^12.2.13",
|
||||||
"@types/chrome": "^0.0.139",
|
"@types/chrome": "^0.0.139",
|
||||||
"@types/firefox-webext-browser": "^82.0.0",
|
"@types/firefox-webext-browser": "^82.0.0",
|
||||||
"@types/jasmine": "^3.7.6",
|
"@types/jasmine": "^3.7.6",
|
||||||
"@types/mousetrap": "^1.6.8",
|
"@types/mousetrap": "^1.6.8",
|
||||||
"@types/node": "^14.17.2",
|
"@types/node": "^14.17.2",
|
||||||
"clean-webpack-plugin": "^3.0.0",
|
"buffer": "^6.0.3",
|
||||||
"copy-webpack-plugin": "^6.4.0",
|
"clean-webpack-plugin": "^4.0.0",
|
||||||
|
"copy-webpack-plugin": "^10.0.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"css-loader": "^5.2.4",
|
"css-loader": "^6.5.1",
|
||||||
"del": "^6.0.0",
|
"del": "^6.0.0",
|
||||||
"file-loader": "^6.2.0",
|
|
||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
"gulp-filter": "^7.0.0",
|
"gulp-filter": "^7.0.0",
|
||||||
"gulp-if": "^3.0.0",
|
"gulp-if": "^3.0.0",
|
||||||
"gulp-json-editor": "^2.5.5",
|
"gulp-json-editor": "^2.5.5",
|
||||||
"gulp-replace": "^1.1.0",
|
"gulp-replace": "^1.1.0",
|
||||||
"gulp-zip": "^5.1.0",
|
"gulp-zip": "^5.1.0",
|
||||||
"html-loader": "^1.3.2",
|
"html-loader": "^3.0.1",
|
||||||
"html-webpack-plugin": "^4.5.1",
|
"html-webpack-plugin": "^5.5.0",
|
||||||
"jasmine-core": "^3.7.1",
|
"jasmine-core": "^3.7.1",
|
||||||
"jasmine-spec-reporter": "^7.0.0",
|
"jasmine-spec-reporter": "^7.0.0",
|
||||||
"karma": "^6.3.2",
|
"karma": "^6.3.2",
|
||||||
|
@ -55,27 +55,39 @@
|
||||||
"karma-cli": "^2.0.0",
|
"karma-cli": "^2.0.0",
|
||||||
"karma-jasmine": "^4.0.0",
|
"karma-jasmine": "^4.0.0",
|
||||||
"karma-jasmine-html-reporter": "^1.5.0",
|
"karma-jasmine-html-reporter": "^1.5.0",
|
||||||
"karma-webpack": "^4.0.2",
|
"karma-webpack": "^5.0.0",
|
||||||
"mini-css-extract-plugin": "^1.5.0",
|
"mini-css-extract-plugin": "^2.4.5",
|
||||||
|
"process": "^0.11.10",
|
||||||
"sass": "^1.34.1",
|
"sass": "^1.34.1",
|
||||||
"sass-loader": "^10.1.1",
|
"sass-loader": "^12.4.0",
|
||||||
"style-loader": "^2.0.0",
|
"style-loader": "^3.3.1",
|
||||||
"tapable": "^1.1.3",
|
"tapable": "^1.1.3",
|
||||||
"ts-loader": "^8.1.0",
|
"ts-loader": "^9.2.5",
|
||||||
"tslint": "^6.1.0",
|
"tslint": "^6.1.0",
|
||||||
"tslint-loader": "^3.5.4",
|
"tslint-loader": "^3.5.4",
|
||||||
"typescript": "4.1.5",
|
"typescript": "4.3.5",
|
||||||
"webpack": "^4.46.0",
|
"url": "^0.11.0",
|
||||||
"webpack-cli": "^4.6.0"
|
"util": "^0.12.4",
|
||||||
|
"webpack": "^5.64.4",
|
||||||
|
"webpack-cli": "^4.9.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@angular/animations": "^12.2.13",
|
||||||
|
"@angular/cdk": "^12.2.13",
|
||||||
|
"@angular/common": "^12.2.13",
|
||||||
|
"@angular/compiler": "^12.2.13",
|
||||||
|
"@angular/core": "^12.2.13",
|
||||||
|
"@angular/forms": "^12.2.13",
|
||||||
|
"@angular/platform-browser": "^12.2.13",
|
||||||
|
"@angular/platform-browser-dynamic": "^12.2.13",
|
||||||
|
"@angular/router": "^12.2.13",
|
||||||
"@bitwarden/jslib-angular": "file:jslib/angular",
|
"@bitwarden/jslib-angular": "file:jslib/angular",
|
||||||
"@bitwarden/jslib-common": "file:jslib/common",
|
"@bitwarden/jslib-common": "file:jslib/common",
|
||||||
"core-js": "^3.11.0",
|
"core-js": "^3.11.0",
|
||||||
"date-input-polyfill": "^2.14.0",
|
"date-input-polyfill": "^2.14.0",
|
||||||
"font-awesome": "4.7.0",
|
"font-awesome": "4.7.0",
|
||||||
"mousetrap": "^1.6.5",
|
"mousetrap": "^1.6.5",
|
||||||
"ngx-toastr": "^13.2.1",
|
"ngx-toastr": "14.1.4",
|
||||||
"nord": "^0.2.1",
|
"nord": "^0.2.1",
|
||||||
"sweetalert2": "^10.16.6",
|
"sweetalert2": "^10.16.6",
|
||||||
"web-animations-js": "^2.3.2"
|
"web-animations-js": "^2.3.2"
|
||||||
|
|
|
@ -4,7 +4,7 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
|
const { AngularWebpackPlugin } = require('@ngtools/webpack');
|
||||||
|
|
||||||
if (process.env.NODE_ENV == null) {
|
if (process.env.NODE_ENV == null) {
|
||||||
process.env.NODE_ENV = 'development';
|
process.env.NODE_ENV = 'development';
|
||||||
|
@ -24,35 +24,24 @@ const moduleRules = [
|
||||||
{
|
{
|
||||||
test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
||||||
exclude: /loading.svg/,
|
exclude: /loading.svg/,
|
||||||
use: [{
|
generator: {
|
||||||
loader: 'file-loader',
|
filename: 'popup/fonts/[name].[ext]',
|
||||||
options: {
|
},
|
||||||
name: '[name].[ext]',
|
type: 'asset/resource',
|
||||||
outputPath: 'popup/fonts/',
|
|
||||||
publicPath: './fonts/',
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(jpe?g|png|gif|svg)$/i,
|
test: /\.(jpe?g|png|gif|svg)$/i,
|
||||||
exclude: /.*(fontawesome-webfont|glyphicons-halflings-regular)\.svg/,
|
exclude: /.*(fontawesome-webfont|glyphicons-halflings-regular)\.svg/,
|
||||||
use: [{
|
generator: {
|
||||||
loader: 'file-loader',
|
filename: 'popup/images/[name].[ext]',
|
||||||
options: {
|
},
|
||||||
name: '[name].[ext]',
|
type: 'asset/resource',
|
||||||
outputPath: 'popup/images/',
|
|
||||||
publicPath: './images/',
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: MiniCssExtractPlugin.loader,
|
loader: MiniCssExtractPlugin.loader,
|
||||||
options: {
|
|
||||||
publicPath: '../',
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
'css-loader',
|
'css-loader',
|
||||||
'sass-loader',
|
'sass-loader',
|
||||||
|
@ -74,19 +63,16 @@ const plugins = [
|
||||||
template: './src/popup/index.html',
|
template: './src/popup/index.html',
|
||||||
filename: 'popup/index.html',
|
filename: 'popup/index.html',
|
||||||
chunks: ['popup/polyfills', 'popup/vendor-angular', 'popup/vendor', 'popup/main'],
|
chunks: ['popup/polyfills', 'popup/vendor-angular', 'popup/vendor', 'popup/main'],
|
||||||
cache: false, // Remove after upgrading to Webpack 5
|
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: './src/background.html',
|
template: './src/background.html',
|
||||||
filename: 'background.html',
|
filename: 'background.html',
|
||||||
chunks: ['vendor', 'background'],
|
chunks: ['vendor', 'background'],
|
||||||
cache: false, // Remove after upgrading to Webpack 5
|
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: './src/notification/bar.html',
|
template: './src/notification/bar.html',
|
||||||
filename: 'notification/bar.html',
|
filename: 'notification/bar.html',
|
||||||
chunks: ['notification/bar'],
|
chunks: ['notification/bar'],
|
||||||
cache: false, // Remove after upgrading to Webpack 5
|
|
||||||
}),
|
}),
|
||||||
new CopyWebpackPlugin({
|
new CopyWebpackPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
|
@ -109,7 +95,7 @@ const plugins = [
|
||||||
'ENV': JSON.stringify(ENV)
|
'ENV': JSON.stringify(ENV)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
new AngularCompilerPlugin({
|
new AngularWebpackPlugin({
|
||||||
tsConfigPath: 'tsconfig.json',
|
tsConfigPath: 'tsconfig.json',
|
||||||
entryModule: 'src/popup/app.module#AppModule',
|
entryModule: 'src/popup/app.module#AppModule',
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
|
@ -117,6 +103,9 @@ const plugins = [
|
||||||
new CleanWebpackPlugin({
|
new CleanWebpackPlugin({
|
||||||
cleanAfterEveryBuildPatterns: ['!popup/fonts/**/*'],
|
cleanAfterEveryBuildPatterns: ['!popup/fonts/**/*'],
|
||||||
}),
|
}),
|
||||||
|
new webpack.ProvidePlugin({
|
||||||
|
process: 'process/browser',
|
||||||
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -174,6 +163,12 @@ const config = {
|
||||||
extensions: ['.ts', '.js'],
|
extensions: ['.ts', '.js'],
|
||||||
symlinks: false,
|
symlinks: false,
|
||||||
modules: [path.resolve('node_modules')],
|
modules: [path.resolve('node_modules')],
|
||||||
|
fallback: {
|
||||||
|
'assert': false,
|
||||||
|
'buffer': require.resolve('buffer/'),
|
||||||
|
'util': require.resolve('util/'),
|
||||||
|
'url': require.resolve('url/'),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
|
|
Loading…
Reference in New Issue