-
-
Notifications
You must be signed in to change notification settings - Fork 623
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable lightning css minimizer error recovery (#6995)
- Loading branch information
Showing
40 changed files
with
544 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/rspack-test-tools/tests/diagnosticsCases/factorize/cannot-resolve-context/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// should not panic at crates/rspack_plugin_javascript/src/dependency/context/require_context_dependency.rs | ||
// should not panic | ||
|
||
require.context("./test", false, /\.test\.js$/); | ||
|
7 changes: 6 additions & 1 deletion
7
packages/rspack-test-tools/tests/diagnosticsCases/factorize/cannot-resolve-context/stats.err
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
ERROR in ./index.js | ||
× Resolve error: Can't resolve './test' in '<PROJECT_ROOT>/tests/diagnosticsCases/factorize/cannot-resolve-context' | ||
╭─[1:1] | ||
1 │ // should not panic | ||
1 │ // should not panic | ||
2 │ | ||
3 │ require.context("./test", false, //.test/.js$/); | ||
· ─────────────────────────────────────────────── | ||
4 │ | ||
╰──── |
15 changes: 14 additions & 1 deletion
15
...tools/tests/diagnosticsCases/factorize/cannot-resolve-with-concatenate-conflict/stats.err
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
ERROR in ./node_modules/some-module/a.ts | ||
× Resolve error: Can't resolve './b.js' in '<PROJECT_ROOT>/tests/diagnosticsCases/factorize/cannot-resolve-with-conc | ||
× Resolve error: Can't resolve './b.js' in '<PROJECT_ROOT>/tests/diagnosticsCases/factorize/cannot-resolve-with-concatenate-conflict/node_modules/some-module' | ||
╭─[1:1] | ||
1 │ export * from "./b.js"; | ||
· ──────── | ||
2 │ export * from "./c.js"; | ||
╰──── | ||
|
||
ERROR in ./node_modules/some-module/a.ts | ||
× Resolve error: Can't resolve './c.js' in '<PROJECT_ROOT>/tests/diagnosticsCases/factorize/cannot-resolve-with-concatenate-conflict/node_modules/some-module' | ||
╭─[1:1] | ||
1 │ export * from "./b.js"; | ||
2 │ export * from "./c.js"; | ||
· ──────── | ||
╰──── |
6 changes: 5 additions & 1 deletion
6
...t-tools/tests/diagnosticsCases/factorize/cannot-resolve-with-concatenate-import/stats.err
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
ERROR in ./node_modules/some-module/a.ts | ||
× Resolve error: Can't resolve './b.js' in '<PROJECT_ROOT>/tests/diagnosticsCases/factorize/cannot-resolve-with-conc | ||
× Resolve error: Can't resolve './b.js' in '<PROJECT_ROOT>/tests/diagnosticsCases/factorize/cannot-resolve-with-concatenate-import/node_modules/some-module' | ||
╭──── | ||
1 │ export * from "./b.js"; | ||
· ──────── | ||
╰──── |
21 changes: 20 additions & 1 deletion
21
...es/rspack-test-tools/tests/diagnosticsCases/factorize/css-module-request-prefix/stats.err
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
WARNING in ./index.css | ||
⚠ Module parse warning: | ||
╰─▶ ⚠ CSS parsing warning: '@import' or 'url()' with a request starts with '~' is deprec | ||
╰─▶ ⚠ CSS parsing warning: '@import' or 'url()' with a request starts with '~' is deprecated. | ||
╭─[1:1] | ||
1 │ @import "~pkg"; | ||
· ─────────────── | ||
2 │ | ||
3 │ .class { | ||
╰──── | ||
help: Remove '~' from the request. | ||
|
||
WARNING in ./index.css | ||
⚠ Module parse warning: | ||
╰─▶ ⚠ CSS parsing warning: '@import' or 'url()' with a request starts with '~' is deprecated. | ||
╭─[2:1] | ||
2 │ | ||
3 │ .class { | ||
4 │ background-image: url(~pkg/img.png); | ||
· ───────────────── | ||
5 │ } | ||
╰──── | ||
help: Remove '~' from the request. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 92 additions & 1 deletion
93
packages/rspack-test-tools/tests/diagnosticsCases/factorize/mismatched-module-type/stats.err
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,94 @@ | ||
ERROR in ./app.js | ||
× Module parse failed: | ||
╰─▶ × JavaScript parsing error: Untermin | ||
╰─▶ × JavaScript parsing error: Unterminated regexp literal | ||
╭─[2:1] | ||
2 │ createElement() {} | ||
3 │ }; | ||
4 │ export const App = () => <div></div>; | ||
· ────── | ||
╰──── | ||
|
||
help: | ||
You may need an appropriate loader to handle this file type. | ||
|
||
ERROR in ./app.js | ||
× Module parse failed: | ||
╰─▶ × JavaScript parsing error: Expression expected | ||
╭─[2:1] | ||
2 │ createElement() {} | ||
3 │ }; | ||
4 │ export const App = () => <div></div>; | ||
· ─ | ||
╰──── | ||
|
||
help: | ||
You may need an appropriate loader to handle this file type. | ||
|
||
ERROR in ./app.js | ||
× Module parse failed: | ||
╰─▶ × JavaScript parsing error: Expression expected | ||
╭─[2:1] | ||
2 │ createElement() {} | ||
3 │ }; | ||
4 │ export const App = () => <div></div>; | ||
· ─ | ||
╰──── | ||
|
||
help: | ||
You may need an appropriate loader to handle this file type. | ||
|
||
ERROR in ./app.jsx | ||
× Module parse failed: | ||
╰─▶ × JavaScript parsing error: Unterminated regexp literal | ||
╭─[2:1] | ||
2 │ createElement() {} | ||
3 │ }; | ||
4 │ export const App = () => <div></div>; | ||
· ────── | ||
╰──── | ||
|
||
help: | ||
You may need an appropriate loader to handle this file type. | ||
|
||
ERROR in ./app.jsx | ||
× Module parse failed: | ||
╰─▶ × JavaScript parsing error: Expression expected | ||
╭─[2:1] | ||
2 │ createElement() {} | ||
3 │ }; | ||
4 │ export const App = () => <div></div>; | ||
· ─ | ||
╰──── | ||
|
||
help: | ||
You may need an appropriate loader to handle this file type. | ||
|
||
ERROR in ./app.jsx | ||
× Module parse failed: | ||
╰─▶ × JavaScript parsing error: Expression expected | ||
╭─[2:1] | ||
2 │ createElement() {} | ||
3 │ }; | ||
4 │ export const App = () => <div></div>; | ||
· ─ | ||
╰──── | ||
|
||
help: | ||
You may need an appropriate loader to handle this file type. | ||
|
||
ERROR in ./app.ts | ||
× Module parse failed: | ||
╰─▶ × JavaScript parsing error: Expected ',', got ':' | ||
╭─[1:1] | ||
1 │ const React = { | ||
2 │ createElement(elm: any) {} | ||
· ─ | ||
3 │ }; | ||
4 │ function Component<T>() { | ||
╰──── | ||
|
||
help: | ||
You may need an appropriate loader to handle this file type. | ||
|
||
ERROR in ./index.js | ||
× No parser registered for 'ts' |
Binary file modified
BIN
+36 Bytes
(110%)
.../rspack-test-tools/tests/diagnosticsCases/factorize/missing-config-build-failed/stats.err
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 12 additions & 1 deletion
13
...test-tools/tests/diagnosticsCases/factorize/prefer-relative-resolve-suggestions/stats.err
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
ERROR in ./index.js | ||
× Resolve error: Can't resolve 'foo.js' in '<PROJECT_ROOT>/tests/diagnosticsCases/factorize/prefer-rel | ||
× Resolve error: Can't resolve 'foo.js' in '<PROJECT_ROOT>/tests/diagnosticsCases/factorize/prefer-relative-resolve-suggestions' | ||
╭──── | ||
1 │ import "foo.js" | ||
· ──────── | ||
╰──── | ||
help: Did you mean './foo.js'? | ||
|
||
Requests that should resolve in the current directory need to start with './'. | ||
Requests that start with a name are treated as module requests and resolve within module directories (node_modules). | ||
|
||
If changing the source code is not an option, there is also a resolve options called 'preferRelative' | ||
which tries to resolve these kind of requests in the current directory too. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,12 @@ | |
|
||
.a { | ||
color: red; | ||
} | ||
} | ||
|
||
.b { | ||
color; blue; | ||
} | ||
|
||
.c<>c { | ||
color: green; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
12d6df7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Ran ecosystem CI: Open
12d6df7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Benchmark detail: Open