@nx/angular-rspack 22.7.0-pr.35019.f500fd7 → 22.7.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/config/config-utils/common-config.d.ts.map +1 -1
- package/dist/lib/config/config-utils/common-config.js +9 -3
- package/dist/lib/plugins/angular-rspack-plugin.d.ts.map +1 -1
- package/dist/lib/plugins/angular-rspack-plugin.js +4 -3
- package/dist/lib/plugins/i18n-inline-plugin.d.ts.map +1 -1
- package/dist/lib/plugins/i18n-inline-plugin.js +1 -3
- package/dist/lib/utils/find-project-for-path.js +1 -1
- package/dist/lib/utils/postcss-cli-resources.d.ts.map +1 -1
- package/dist/lib/utils/postcss-cli-resources.js +0 -1
- package/dist/lib/utils/stats.d.ts.map +1 -1
- package/dist/lib/utils/stats.js +0 -1
- package/eslint.config.mjs +67 -0
- package/package.json +4 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-config.d.ts","sourceRoot":"","sources":["../../../../src/lib/config/config-utils/common-config.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,UAAU,EACV,WAAW,EACX,oCAAoC,EACrC,MAAM,cAAc,CAAC;AAQtB,wBAAsB,eAAe,CACnC,iBAAiB,EAAE,oCAAoC,EACvD,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,EAC/B,UAAU,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"common-config.d.ts","sourceRoot":"","sources":["../../../../src/lib/config/config-utils/common-config.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,UAAU,EACV,WAAW,EACX,oCAAoC,EACrC,MAAM,cAAc,CAAC;AAQtB,wBAAsB,eAAe,CACnC,iBAAiB,EAAE,oCAAoC,EACvD,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,EAC/B,UAAU,EAAE,UAAU,iDA6KvB"}
|
|
@@ -61,9 +61,15 @@ async function getCommonConfig(normalizedOptions, i18n, i18nHash, hashFormat) {
|
|
|
61
61
|
tsConfig: {
|
|
62
62
|
configFile: normalizedOptions.tsConfig,
|
|
63
63
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
alias: {
|
|
65
|
+
...(i18n.shouldInline && normalizedOptions.aot
|
|
66
|
+
? { '@angular/localize/init': false }
|
|
67
|
+
: {}),
|
|
68
|
+
...(normalizedOptions.fileReplacements?.reduce((aliases, replacement) => ({
|
|
69
|
+
...aliases,
|
|
70
|
+
[replacement.replace]: replacement.with,
|
|
71
|
+
}), {}) ?? {}),
|
|
72
|
+
},
|
|
67
73
|
},
|
|
68
74
|
resolveLoader: {
|
|
69
75
|
symlinks: !normalizedOptions.preserveSymlinks,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-rspack-plugin.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/angular-rspack-plugin.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,WAAW,EAGhB,KAAK,oCAAoC,EAC1C,MAAM,WAAW,CAAC;AAUnB,qBAAa,mBAAoB,YAAW,oBAAoB;;gBAU5D,OAAO,EAAE,oCAAoC,EAC7C,WAAW,CAAC,EAAE,WAAW;IAuB3B,KAAK,CAAC,QAAQ,EAAE,QAAQ;
|
|
1
|
+
{"version":3,"file":"angular-rspack-plugin.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/angular-rspack-plugin.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,WAAW,EAGhB,KAAK,oCAAoC,EAC1C,MAAM,WAAW,CAAC;AAUnB,qBAAa,mBAAoB,YAAW,oBAAoB;;gBAU5D,OAAO,EAAE,oCAAoC,EAC7C,WAAW,CAAC,EAAE,WAAW;IAuB3B,KAAK,CAAC,QAAQ,EAAE,QAAQ;YAiVV,gBAAgB;CAkC/B"}
|
|
@@ -82,9 +82,9 @@ class AngularRspackPlugin {
|
|
|
82
82
|
callback();
|
|
83
83
|
});
|
|
84
84
|
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
|
|
85
|
-
// Handle errors thrown by loaders that prevent sealing
|
|
85
|
+
// Handle errors thrown by loaders that prevent sealing (but ignore for watch mode)
|
|
86
86
|
compilation.hooks.afterSeal.tapAsync(PLUGIN_NAME, (callback) => {
|
|
87
|
-
if (compilation.errors.length > 0) {
|
|
87
|
+
if (!watchRunInitialized && compilation.errors.length > 0) {
|
|
88
88
|
const stats = compilation.getStats();
|
|
89
89
|
const compilationError = (0, stats_1.statsErrorsToString)(stats.toJson(), (0, get_stats_options_1.getStatsOptions)(tslib_1.__classPrivateFieldGet(this, _AngularRspackPlugin__options, "f").verbose));
|
|
90
90
|
callback(new Error(compilationError));
|
|
@@ -228,7 +228,8 @@ class AngularRspackPlugin {
|
|
|
228
228
|
? { ...defaultStatsOptions, ...configStats }
|
|
229
229
|
: defaultStatsOptions;
|
|
230
230
|
(0, stats_1.rspackStatsLogger)(stats, statsOptions);
|
|
231
|
-
|
|
231
|
+
// Don't forcibly exit the process with errors when in watch mode
|
|
232
|
+
if (!watchRunInitialized && stats.hasErrors()) {
|
|
232
233
|
process.exit(1);
|
|
233
234
|
}
|
|
234
235
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-inline-plugin.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/i18n-inline-plugin.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EACV,WAAW,EACX,oCAAoC,EACrC,MAAM,WAAW,CAAC;AAWnB,qBAAa,gBAAiB,YAAW,oBAAoB;;gBAWzD,aAAa,EAAE,oCAAoC,EACnD,WAAW,EAAE,WAAW;IAO1B,KAAK,CAAC,QAAQ,EAAE,QAAQ;
|
|
1
|
+
{"version":3,"file":"i18n-inline-plugin.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/i18n-inline-plugin.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EACV,WAAW,EACX,oCAAoC,EACrC,MAAM,WAAW,CAAC;AAWnB,qBAAa,gBAAiB,YAAW,oBAAoB;;gBAWzD,aAAa,EAAE,oCAAoC,EACnD,WAAW,EAAE,WAAW;IAO1B,KAAK,CAAC,QAAQ,EAAE,QAAQ;CA2OzB"}
|
|
@@ -112,9 +112,7 @@ async function _I18nInlinePlugin_loadLocalizeTools() {
|
|
|
112
112
|
*/
|
|
113
113
|
async function _I18nInlinePlugin_createI18nPlugins(locale, translation) {
|
|
114
114
|
await tslib_1.__classPrivateFieldGet(this, _I18nInlinePlugin_instances, "m", _I18nInlinePlugin_loadLocalizeTools).call(this);
|
|
115
|
-
const { Diagnostics, makeEs2015TranslatePlugin } =
|
|
116
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
117
|
-
tslib_1.__classPrivateFieldGet(this, _I18nInlinePlugin_localizeToolsModule, "f");
|
|
115
|
+
const { Diagnostics, makeEs2015TranslatePlugin } = tslib_1.__classPrivateFieldGet(this, _I18nInlinePlugin_localizeToolsModule, "f");
|
|
118
116
|
const plugins = [];
|
|
119
117
|
const diagnostics = new Diagnostics();
|
|
120
118
|
plugins.push(makeEs2015TranslatePlugin(diagnostics, (translation || {}), {
|
|
@@ -27,7 +27,7 @@ function findProjectForPath(filePath, projectRootMap) {
|
|
|
27
27
|
* Windows may pass Win-style file paths
|
|
28
28
|
* Ensure filePath is in UNIX-style
|
|
29
29
|
*/
|
|
30
|
-
let currentPath = node_path_1.posix.normalize(filePath);
|
|
30
|
+
let currentPath = node_path_1.posix.normalize(filePath.replaceAll('\\', '/'));
|
|
31
31
|
for (; currentPath != node_path_1.posix.dirname(currentPath); currentPath = node_path_1.posix.dirname(currentPath)) {
|
|
32
32
|
const p = projectRootMap.get(currentPath);
|
|
33
33
|
if (p) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postcss-cli-resources.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/postcss-cli-resources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAe,MAAM,EAAE,MAAM,SAAS,CAAC;AA0BnD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,MAAM,EAAE,OAAO,cAAc,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACtD,QAAQ,EAAE,OAAO,CAAC;CACnB;AAcD,eAAO,MAAM,OAAO,OAAO,CAAC;AAE5B,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC,EAAE,0BAA0B,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"postcss-cli-resources.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/postcss-cli-resources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAe,MAAM,EAAE,MAAM,SAAS,CAAC;AA0BnD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,MAAM,EAAE,OAAO,cAAc,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACtD,QAAQ,EAAE,OAAO,CAAC;CACnB;AAcD,eAAO,MAAM,OAAO,OAAO,CAAC;AAE5B,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC,EAAE,0BAA0B,GAAG,MAAM,CA8KrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/stats.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,sBAAsB,EAGvB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,KAAK,EACL,YAAY,EACb,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,oCAAoC,EACpC,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,yCAAyC,CAAC;AAMjD,MAAM,WAAW,qBAAqB;IACpC,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;CAC7C;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACtC,aAAa,CAAC,OAAO,CAAC,EACtB,MAAM,GAAG,OAAO,GAAG,SAAS,CAC7B,CAAC;AAEF,wBAAgB,yBAAyB,CACvC,gBAAgB,EAAE,kBAAkB,EAAE,EACtC,iBAAiB,EAAE,MAAM,GACxB,oBAAoB,EAAE,CAmBxB;
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/stats.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,sBAAsB,EAGvB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,aAAa,EACb,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B,uBAAuB,CACrC,WAAW,EAAE,gBAAgB,EAC7B,OAAO,EAAE,oCAAoC,GAC5C,eAAe,CA2DjB;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,YAAY,EACzB,cAAc,CAAC,EAAE,sBAAsB,EAAE,GACxC,IAAI,CAgBN"}
|
package/dist/lib/utils/stats.js
CHANGED
|
@@ -73,7 +73,6 @@ function statsToString(stats, json, statsConfig, budgetFailures) {
|
|
|
73
73
|
if (!json.chunks?.length) {
|
|
74
74
|
return '';
|
|
75
75
|
}
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
77
76
|
const colors = typeof statsConfig.colors === 'boolean'
|
|
78
77
|
? statsConfig.colors
|
|
79
78
|
: !!statsConfig.colors;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { baseConfig } from '../../eslint.config.mjs';
|
|
2
|
+
import * as jsoncEslintParser from 'jsonc-eslint-parser';
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
...baseConfig,
|
|
6
|
+
{
|
|
7
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
8
|
+
rules: {
|
|
9
|
+
'no-restricted-imports': [
|
|
10
|
+
'error',
|
|
11
|
+
{
|
|
12
|
+
name: 'chalk',
|
|
13
|
+
message:
|
|
14
|
+
'Please use `picocolors` in place of `chalk` for rendering terminal colors',
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
files: ['./package.json'],
|
|
21
|
+
rules: {
|
|
22
|
+
'@nx/nx-plugin-checks': 'error',
|
|
23
|
+
'@nx/dependency-checks': [
|
|
24
|
+
'error',
|
|
25
|
+
{
|
|
26
|
+
buildTargets: ['build-base'],
|
|
27
|
+
ignoredFiles: [
|
|
28
|
+
'{projectRoot}/eslint.config.mjs',
|
|
29
|
+
'{projectRoot}/vite.config.{js,ts,mjs,mts}',
|
|
30
|
+
],
|
|
31
|
+
ignoredDependencies: [
|
|
32
|
+
'@rspack/core',
|
|
33
|
+
'@angular/core',
|
|
34
|
+
'jsonc-eslint-parser',
|
|
35
|
+
'vitest',
|
|
36
|
+
'memfs',
|
|
37
|
+
'sass',
|
|
38
|
+
'tailwindcss',
|
|
39
|
+
'@babel/core',
|
|
40
|
+
'autoprefixer',
|
|
41
|
+
'css-loader',
|
|
42
|
+
'jsonc-parser',
|
|
43
|
+
'less-loader',
|
|
44
|
+
'loader-utils',
|
|
45
|
+
'open',
|
|
46
|
+
'ora',
|
|
47
|
+
'parse5-html-rewriting-stream',
|
|
48
|
+
'piscina',
|
|
49
|
+
'postcss',
|
|
50
|
+
'postcss-loader',
|
|
51
|
+
'rxjs',
|
|
52
|
+
'sass-loader',
|
|
53
|
+
'sass-embedded',
|
|
54
|
+
'webpack-merge',
|
|
55
|
+
'ws',
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
languageOptions: {
|
|
61
|
+
parser: jsoncEslintParser,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
ignores: ['dist'],
|
|
66
|
+
},
|
|
67
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular-rspack",
|
|
3
|
-
"version": "22.7.0-
|
|
3
|
+
"version": "22.7.0-rc.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@ampproject/remapping": "2.3.0",
|
|
49
49
|
"@babel/core": "7.28.3",
|
|
50
50
|
"@discoveryjs/json-ext": "0.6.3",
|
|
51
|
-
"@nx/angular-rspack-compiler": "22.7.0-
|
|
52
|
-
"@nx/devkit": "22.7.0-
|
|
51
|
+
"@nx/angular-rspack-compiler": "22.7.0-rc.0",
|
|
52
|
+
"@nx/devkit": "22.7.0-rc.0",
|
|
53
53
|
"ansi-colors": "4.1.3",
|
|
54
54
|
"autoprefixer": "10.4.21",
|
|
55
55
|
"deepmerge": "^4.3.1",
|
|
@@ -115,9 +115,7 @@
|
|
|
115
115
|
"build": {
|
|
116
116
|
"command": "node ./scripts/copy-readme.js angular-rspack packages/angular-rspack/readme-template.md packages/angular-rspack/README.md",
|
|
117
117
|
"inputs": [
|
|
118
|
-
"
|
|
119
|
-
"{workspaceRoot}/scripts/copy-readme.js",
|
|
120
|
-
"{workspaceRoot}/scripts/readme-fragments"
|
|
118
|
+
"copyReadme"
|
|
121
119
|
],
|
|
122
120
|
"outputs": [
|
|
123
121
|
"{projectRoot}/README.md"
|
|
@@ -129,11 +127,6 @@
|
|
|
129
127
|
"^build-native",
|
|
130
128
|
"angular-rspack-compiler:build"
|
|
131
129
|
],
|
|
132
|
-
"inputs": [
|
|
133
|
-
"default",
|
|
134
|
-
"^production",
|
|
135
|
-
"{projectRoot}/vitest.config.mts"
|
|
136
|
-
],
|
|
137
130
|
"options": {
|
|
138
131
|
"args": [
|
|
139
132
|
"--passWithNoTests"
|