Nx
Enterprise
Nx
Sign in / Sign up
Open main menu
Nx
GitHub
Overview
Runs
Analytics
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Failed
master
73655159 fix(angular-rspack): exclude .json files from JS/TS regex patterns (#34195) ## Current Behavior When importing a `package.json` file in an Angular application built with `@nx/angular-rspack`, the build fails with a Babel syntax error if the `package.json` contains `@angular/*` dependencies: ``` SyntaxError: /path/to/package.json: Missing semicolon. (2:10) 1 | { > 2 | "name": "@org/app", | ^ 3 | "version": "4.0.2", 4 | "dependencies": { 5 | "@angular/platform-browser": "20.3.7", ``` This happens because the `JS_ALL_EXT_REGEX` pattern `/\.[cm]?(js)[^x]?\??/` incorrectly matches `.json` files. When the JSON file content contains `@angular` strings, the `angular-partial-transform-loader` attempts to process it through Babel, which fails because JSON is not valid JavaScript. **Root cause:** The regex `[^x]?` (optional character that is NOT 'x') allows `.json` to match because 'o' is not 'x'. ## Expected Behavior - `.json` files should NOT match `JS_ALL_EXT_REGEX` or `TS_ALL_EXT_REGEX` - Importing `package.json` in Angular applications should work correctly - All existing matches for `.js`, `.jsx`, `.mjs`, `.cjs` (and TypeScript equivalents) should continue to work ## Related Issue(s) https://github.com/nrwl/nx/issues/32649
by faileon
f
Succeeded
master
73655159 fix(angular-rspack): exclude .json files from JS/TS regex patterns (#34195) ## Current Behavior When importing a `package.json` file in an Angular application built with `@nx/angular-rspack`, the build fails with a Babel syntax error if the `package.json` contains `@angular/*` dependencies: ``` SyntaxError: /path/to/package.json: Missing semicolon. (2:10) 1 | { > 2 | "name": "@org/app", | ^ 3 | "version": "4.0.2", 4 | "dependencies": { 5 | "@angular/platform-browser": "20.3.7", ``` This happens because the `JS_ALL_EXT_REGEX` pattern `/\.[cm]?(js)[^x]?\??/` incorrectly matches `.json` files. When the JSON file content contains `@angular` strings, the `angular-partial-transform-loader` attempts to process it through Babel, which fails because JSON is not valid JavaScript. **Root cause:** The regex `[^x]?` (optional character that is NOT 'x') allows `.json` to match because 'o' is not 'x'. ## Expected Behavior - `.json` files should NOT match `JS_ALL_EXT_REGEX` or `TS_ALL_EXT_REGEX` - Importing `package.json` in Angular applications should work correctly - All existing matches for `.js`, `.jsx`, `.mjs`, `.cjs` (and TypeScript equivalents) should continue to work ## Related Issue(s) https://github.com/nrwl/nx/issues/32649
by faileon
f
Succeeded
master
73655159 fix(angular-rspack): exclude .json files from JS/TS regex patterns (#34195) ## Current Behavior When importing a `package.json` file in an Angular application built with `@nx/angular-rspack`, the build fails with a Babel syntax error if the `package.json` contains `@angular/*` dependencies: ``` SyntaxError: /path/to/package.json: Missing semicolon. (2:10) 1 | { > 2 | "name": "@org/app", | ^ 3 | "version": "4.0.2", 4 | "dependencies": { 5 | "@angular/platform-browser": "20.3.7", ``` This happens because the `JS_ALL_EXT_REGEX` pattern `/\.[cm]?(js)[^x]?\??/` incorrectly matches `.json` files. When the JSON file content contains `@angular` strings, the `angular-partial-transform-loader` attempts to process it through Babel, which fails because JSON is not valid JavaScript. **Root cause:** The regex `[^x]?` (optional character that is NOT 'x') allows `.json` to match because 'o' is not 'x'. ## Expected Behavior - `.json` files should NOT match `JS_ALL_EXT_REGEX` or `TS_ALL_EXT_REGEX` - Importing `package.json` in Angular applications should work correctly - All existing matches for `.js`, `.jsx`, `.mjs`, `.cjs` (and TypeScript equivalents) should continue to work ## Related Issue(s) https://github.com/nrwl/nx/issues/32649
by faileon
f
Succeeded
master
73655159 fix(angular-rspack): exclude .json files from JS/TS regex patterns (#34195) ## Current Behavior When importing a `package.json` file in an Angular application built with `@nx/angular-rspack`, the build fails with a Babel syntax error if the `package.json` contains `@angular/*` dependencies: ``` SyntaxError: /path/to/package.json: Missing semicolon. (2:10) 1 | { > 2 | "name": "@org/app", | ^ 3 | "version": "4.0.2", 4 | "dependencies": { 5 | "@angular/platform-browser": "20.3.7", ``` This happens because the `JS_ALL_EXT_REGEX` pattern `/\.[cm]?(js)[^x]?\??/` incorrectly matches `.json` files. When the JSON file content contains `@angular` strings, the `angular-partial-transform-loader` attempts to process it through Babel, which fails because JSON is not valid JavaScript. **Root cause:** The regex `[^x]?` (optional character that is NOT 'x') allows `.json` to match because 'o' is not 'x'. ## Expected Behavior - `.json` files should NOT match `JS_ALL_EXT_REGEX` or `TS_ALL_EXT_REGEX` - Importing `package.json` in Angular applications should work correctly - All existing matches for `.js`, `.jsx`, `.mjs`, `.cjs` (and TypeScript equivalents) should continue to work ## Related Issue(s) https://github.com/nrwl/nx/issues/32649
by faileon
f
Succeeded
master
73655159 fix(angular-rspack): exclude .json files from JS/TS regex patterns (#34195) ## Current Behavior When importing a `package.json` file in an Angular application built with `@nx/angular-rspack`, the build fails with a Babel syntax error if the `package.json` contains `@angular/*` dependencies: ``` SyntaxError: /path/to/package.json: Missing semicolon. (2:10) 1 | { > 2 | "name": "@org/app", | ^ 3 | "version": "4.0.2", 4 | "dependencies": { 5 | "@angular/platform-browser": "20.3.7", ``` This happens because the `JS_ALL_EXT_REGEX` pattern `/\.[cm]?(js)[^x]?\??/` incorrectly matches `.json` files. When the JSON file content contains `@angular` strings, the `angular-partial-transform-loader` attempts to process it through Babel, which fails because JSON is not valid JavaScript. **Root cause:** The regex `[^x]?` (optional character that is NOT 'x') allows `.json` to match because 'o' is not 'x'. ## Expected Behavior - `.json` files should NOT match `JS_ALL_EXT_REGEX` or `TS_ALL_EXT_REGEX` - Importing `package.json` in Angular applications should work correctly - All existing matches for `.js`, `.jsx`, `.mjs`, `.cjs` (and TypeScript equivalents) should continue to work ## Related Issue(s) https://github.com/nrwl/nx/issues/32649
by faileon
f
Succeeded
34195
c51d2c61 fix(angular-rspack): exclude .json files from JS/TS regex patterns in angular-rspack-compiler
by faileon
f
Previous page
Previous
Next
Next page