Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: trusted type with devtool eval #7866

Merged
merged 1 commit into from
Sep 12, 2024
Merged

fix: trusted type with devtool eval #7866

merged 1 commit into from
Sep 12, 2024

Conversation

LingyuCoder
Copy link
Collaborator

@LingyuCoder LingyuCoder commented Sep 11, 2024

Summary

  • While using eval devtool plugin, eval(module) should be eval(__webpack_require__.ts(module)) to make sure that the module script is a trusted script
  • Add CreateScriptUrlDependency to handle worker scripts.
  • Can use runtimeRequirementsInTree instead of runtimeRequirementsInModule to add runtime globals because these plugins only check the compilation.output.trustedTypes without any module level logic

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack. labels Sep 11, 2024
Base automatically changed from test/dev-server-e2e-2 to main September 11, 2024 10:12
Copy link

netlify bot commented Sep 12, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit b7cc89f
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/66e2586aacb2d40008e70bf2

Copy link
Contributor

Test Compatibility Diff

main pr diff
72.680% 72.786% ✅ ⏫ 0.106
Unpassed tests

6 🔴 Stats chunkGroups: TODO
7 🔴 Stats chunkGroups: TODO
8 🔴 Stats chunkGroups: TODO
11 🔴 Compiler: TODO
12 🔴 Compiler: TODO
13 🔴 Compiler: TODO
14 🔴 Compiler: TODO
15 🔴 Compiler: TODO
18 🔴 Compiler methods isChild: TODO
30 🔴 Compiler: TODO
32 🔴 Compiler: TODO
36 🔴 Compiler: TODO
39 🔴 Compiler: TODO
41 🔴 Compiler: TODO
60 🔴 MultiCompiler: TODO
65 ⚪️ Examples aggressive-merging: TODO
66 ⚪️ Examples asset-advanced: TODO
73 ⚪️ Examples cjs-tree-shaking: TODO
80 ⚪️ Examples code-splitting-bundle-loader: TODO
97 ⚪️ Examples common-chunk-grandchildren: TODO
102 ⚪️ Examples custom-json-modules: TODO
103 ⚪️ Examples dll: TODO
104 ⚪️ Examples dll-app-and-vendor/0-vendor: TODO
105 ⚪️ Examples dll-app-and-vendor/1-app: TODO
106 ⚪️ Examples dll-entry-only: TODO
107 ⚪️ Examples dll-user: TODO
108 ⚪️ Examples explicit-vendor-chunk: TODO
123 ⚪️ Examples http2-aggressive-splitting: TODO
126 ⚪️ Examples lazy-compilation: TODO
137 ⚪️ Examples module-federation: TODO
150 ⚪️ Examples persistent-caching: TODO
167 ⚪️ Examples typescript: TODO
175 ⚪️ aggressive-splitting-entry: TODO
176 🔴 aggressive-splitting-on-demand: support webpack.optimize.AggressiveSplittingPlugin
177 🔴 all-stats: support webpack.optimize.AggressiveSplittingPlugin
180 🔴 async-commons-chunk: support require.ensure()
181 🟡 async-commons-chunk-auto: check the consistency with webpack
183 🔴 chunk-module-id-range: support ChunkModuleIdRangePlugin
184 🔴 chunks: support AMD require
185 🔴 chunks-development: support AMD require
189 🔴 color-enabled-custom: support color object
191 🔴 commons-chunk-min-size-0: Method RegExp.prototype.test called on incompatible receiver undefined
193 🟡 commons-plugin-issue-4980: check the consistency with webpack
194 🟡 concat-and-sideeffects: check the consistency with webpack
195 🔴 context-independence: hash changed
197 🔴 define-plugin: webpack.DefinePlugin.runtimeValue is not a function
198 🔴 details-error: custom error details
199 🔴 dll-reference-plugin-issue-7624: webpack.DllReferencePlugin is not a constructor
200 🔴 dll-reference-plugin-issue-7624-error: webpack.DllReferencePlugin is not a constructor
201 🔴 entry-filename: unstable
204 🟡 graph-correctness-entries: check the consistency with webpack
205 🟡 graph-correctness-modules: check the consistency with webpack
206 🟡 graph-roots: check the consistency with webpack
207 🟡 ignore-warnings: check the consistency with webpack
210 🟡 import-weak: check the consistency with webpack
211 🟡 import-weak-parser-option: check the consistency with webpack
213 🟡 issue-7577: check the consistency with webpack
214 🔴 limit-chunk-count-plugin: #4304
215 🔴 logging: unstable
216 🟡 logging-debug: check the consistency with webpack
219 🟡 module-assets: check the consistency with webpack
220 🟡 module-deduplication: check the consistency with webpack
221 🟡 module-deduplication-named: check the consistency with webpack
222 🔴 module-federation-custom-exposed-module-name: build failed
224 🟡 module-reasons: check the consistency with webpack
227 🟡 named-chunk-groups: check the consistency with webpack
229 ⚪️ named-chunks-plugin-async: TODO
230 🔴 no-emit-on-errors-plugin-with-child-error: support NoEmitOnErrorsPlugin
231 🔴 optimize-chunks: support require.ensure()
235 🔴 performance-disabled: support AMD require
236 🔴 performance-error: support AMD require
238 🔴 performance-no-hints: support AMD require
243 🔴 preset-detailed: support AMD require
247 🔴 preset-minimal: support AMD require
253 🔴 preset-normal: support AMD require
254 🔴 preset-normal-performance: support AMD require
255 🔴 preset-normal-performance-ensure-filter-sourcemaps: support AMD require
257 🔴 preset-verbose: suport AMD require
258 🔴 real-content-hash: unstable
259 🟡 related-assets: check the consistency with webpack
260 🔴 resolve-plugin-context: support resolve plugins
263 🔴 runtime-chunk-integration: support MinChunkSizePlugin
266 🟡 runtime-specific-used-exports: check the consistency with webpack
267 🔴 scope-hoisting-bailouts: unstable
268 🟡 scope-hoisting-multi: check the consistency with webpack
269 🟡 side-effects-issue-7428: check the consistency with webpack
270 🔴 side-effects-optimization: unstable
271 🟡 side-effects-simple-unused: check the consistency with webpack
272 🔴 simple: unstable
273 🔴 simple-more-info: unstable
275 🟡 split-chunks-automatic-name: check the consistency with webpack
276 🟡 split-chunks-chunk-name: check the consistency with webpack
277 🟡 split-chunks-combinations: check the consistency with webpack
278 🟡 split-chunks-issue-6413: check the consistency with webpack
279 🟡 split-chunks-issue-6696: check the consistency with webpack
280 🟡 split-chunks-issue-7401: check the consistency with webpack
281 🟡 split-chunks-keep-remaining-size: check the consistency with webpack
282 🔴 split-chunks-max-size: unstable
283 🟡 split-chunks-min-size-reduction: check the consistency with webpack
284 🟡 split-chunks-prefer-bigger-splits: check the consistency with webpack
285 🟡 split-chunks-runtime-specific: check the consistency with webpack
286 🔴 tree-shaking: support require.include
287 ⚪️ wasm-explorer-examples-sync: TODO
378 ⚪️ HotTestCases async-node chunks split-chunks: TODO
379 ⚪️ HotTestCases async-node chunks split-chunks-webpackhot: TODO
408 ⚪️ HotTestCases async-node define issue-6962: TODO
421 ⚪️ HotTestCases async-node disposing runtime-independent-filename: TODO
479 ⚪️ HotTestCases async-node hashing full-hash-syntax-error: TODO
497 ⚪️ HotTestCases async-node lazy-compilation https: TODO
506 ⚪️ HotTestCases async-node lazy-compilation simple: TODO
511 ⚪️ HotTestCases async-node loader-import-module css: TODO
512 ⚪️ HotTestCases async-node numeric-ids add-remove-chunks: TODO
577 ⚪️ HotTestCases async-node runtime root-error: TODO
610 🔴 HotTestCases async-node worker move-between-runtime: #5597
611 ⚪️ HotTestCases async-node worker remove-add-worker: TODO
633 ⚪️ HotTestCases node chunks split-chunks: TODO
634 ⚪️ HotTestCases node chunks split-chunks-webpackhot: TODO
663 ⚪️ HotTestCases node define issue-6962: TODO
676 ⚪️ HotTestCases node disposing runtime-independent-filename: TODO
734 ⚪️ HotTestCases node hashing full-hash-syntax-error: TODO
752 ⚪️ HotTestCases node lazy-compilation https: TODO
761 ⚪️ HotTestCases node lazy-compilation simple: TODO
766 ⚪️ HotTestCases node loader-import-module css: TODO
767 ⚪️ HotTestCases node numeric-ids add-remove-chunks: TODO
832 ⚪️ HotTestCases node runtime root-error: TODO
865 🔴 HotTestCases node worker move-between-runtime: #5597
891 ⚪️ HotTestCases web chunks split-chunks: TODO
892 ⚪️ HotTestCases web chunks split-chunks-webpackhot: TODO
921 ⚪️ HotTestCases web define issue-6962: TODO
934 ⚪️ HotTestCases web disposing runtime-independent-filename: TODO
992 ⚪️ HotTestCases web hashing full-hash-syntax-error: TODO
1010 ⚪️ HotTestCases web lazy-compilation https: TODO
1019 ⚪️ HotTestCases web lazy-compilation simple: TODO
1024 ⚪️ HotTestCases web loader-import-module css: TODO
1025 ⚪️ HotTestCases web numeric-ids add-remove-chunks: TODO
1090 ⚪️ HotTestCases web runtime root-error: TODO
1123 🔴 HotTestCases web worker move-between-runtime: #5597
1149 ⚪️ HotTestCases webworker chunks split-chunks: TODO
1150 ⚪️ HotTestCases webworker chunks split-chunks-webpackhot: TODO
1179 ⚪️ HotTestCases webworker define issue-6962: TODO
1192 ⚪️ HotTestCases webworker disposing runtime-independent-filename: TODO
1250 ⚪️ HotTestCases webworker hashing full-hash-syntax-error: TODO
1268 ⚪️ HotTestCases webworker lazy-compilation https: TODO
1277 ⚪️ HotTestCases webworker lazy-compilation simple: TODO
1282 ⚪️ HotTestCases webworker loader-import-module css: TODO
1283 ⚪️ HotTestCases webworker numeric-ids add-remove-chunks: TODO
1348 ⚪️ HotTestCases webworker runtime root-error: TODO
1381 🔴 HotTestCases webworker worker move-between-runtime: #5597
1391 🔴 TestCases normal amd define-needs-module: #4313
1392 🔴 TestCases normal amd namedModules: #4313
1393 🔴 TestCases normal amd namedModulesConstArrayDep: #4313
1439 🔴 TestCases normal chunks context: #4304
1448 🔴 TestCases normal chunks named-chunks: #4304
1449 🔴 TestCases normal chunks nested-in-empty: #4304
1450 🔴 TestCases normal chunks parsing: #4304
1451 🔴 TestCases normal chunks runtime: #4304
1452 🔴 TestCases normal chunks var-inject-error-handler: #4304
1453 🟡 TestCases normal chunks weak-dependencies: #2787
1523 🟡 TestCases normal cjs-tree-shaking bailouts: #4313
1648 🔴 TestCases normal compile deduplication-bundle-loader: #4304
1669 🔴 TestCases normal context import-meta-webpack-context: #4305
1738 🔴 TestCases normal errors load-module-cycle: #3738
1739 🔴 TestCases normal errors load-module-cycle-multiple: #3738
1740 🔴 TestCases normal errors load-module-error: #3738
1868 🔴 TestCases normal json import-assertions-type-json: Rspack don't support import assertions since it's deprecated
1930 🔴 TestCases normal large big-assets: #3180
1931 ⚪️ TestCases normal large many-replacements: TODO
1939 🔴 TestCases normal loaders issue-10725: blocked by this.loadModule #3738
1940 🔴 TestCases normal loaders issue-2299: blocked by this.loadModule #3738
1941 🔴 TestCases normal loaders issue-4959: blocked by this.loadModule #3738
1945 🔴 TestCases normal loaders no-string: blocked by #3459
1950 🔴 TestCases normal loaders utils: #4397
2024 🔴 TestCases normal mjs type-module: compile time evaluation typeof and amd
2104 🔴 TestCases normal nonce set-nonce: #4401
2112 🔴 TestCases normal optimize side-effects-reexport-start-unknown: new tree-shaking re-implementation
2179 🔴 TestCases normal parsing amd-rename: #4313
2185 🔴 TestCases normal parsing chunks: #4304
2189 🟡 TestCases normal parsing complex-require: #4304, #4313
2190 🔴 TestCases normal parsing context: #3346
2191 🔴 TestCases normal parsing declared-api: #4313
2194 🔴 TestCases normal parsing es6.nominimize: #4304
2195 🟡 TestCases normal parsing evaluate: should not evaluate new RegExp for redefined RegExp
2197 🔴 TestCases normal parsing extract-amd: #4313
2198 🔴 TestCases normal parsing extract-amd.nominimize: #4313
2199 🟡 TestCases normal parsing extract-require: should not parse require in function arguments
2216 🔴 TestCases normal parsing harmony-injecting-order: #4313
2238 🔴 TestCases normal parsing issue-2084: #4313
2248 🔴 TestCases normal parsing issue-2641: #4313
2252 ⚪️ TestCases normal parsing issue-3252: TODO
2253 ⚪️ TestCases normal parsing issue-3273: TODO
2254 🔴 TestCases normal parsing issue-345: #4313
2256 🔴 TestCases normal parsing issue-387: #4313
2267 🔴 TestCases normal parsing issue-4940: #4313
2276 🔴 TestCases normal parsing issue-758: #4313, #4304
2282 🔴 TestCases normal parsing local-modules: #4313
2286 🔴 TestCases normal parsing nullish-coalescing: #4300
2290 🔴 TestCases normal parsing precreated-ast: #4442
2291 🔴 TestCases normal parsing renaming: #4313, #3346
2295 🔴 TestCases normal parsing strict-mode: #4313
2297 🟡 TestCases normal parsing typeof: require.include
2299 🔴 TestCases normal parsing unsupported-amd: #4313
2828 🔴 TestCases normal resolving commomjs-local-module: #4313
2832 🔴 TestCases normal resolving issue-2986: #4348
2876 🔴 TestCases normal runtime chunk-callback-order: #4313
2884 🔴 TestCases normal runtime module-caching: #4304
2955 ⚪️ TestCases normal scope-hoisting renaming-shorthand-5027: TODO
3145 ⚪️ TestCases normal side-effects dynamic-reexports: TODO
3209 ⚪️ TestCases normal wasm v128: TODO
3308 🔴 TestCases hot amd define-needs-module: #4313
3309 🔴 TestCases hot amd namedModules: #4313
3310 🔴 TestCases hot amd namedModulesConstArrayDep: #4313
3356 🔴 TestCases hot chunks context: #4304
3365 🔴 TestCases hot chunks named-chunks: #4304
3366 🔴 TestCases hot chunks nested-in-empty: #4304
3367 🔴 TestCases hot chunks parsing: #4304
3368 🔴 TestCases hot chunks runtime: #4304
3369 🔴 TestCases hot chunks var-inject-error-handler: #4304
3370 🟡 TestCases hot chunks weak-dependencies: #2787
3440 🟡 TestCases hot cjs-tree-shaking bailouts: #4313
3565 🔴 TestCases hot compile deduplication-bundle-loader: #4304
3586 🔴 TestCases hot context import-meta-webpack-context: #4305
3655 🔴 TestCases hot errors load-module-cycle: #3738
3656 🔴 TestCases hot errors load-module-cycle-multiple: #3738
3657 🔴 TestCases hot errors load-module-error: #3738
3785 🔴 TestCases hot json import-assertions-type-json: Rspack don't support import assertions since it's deprecated
3847 🔴 TestCases hot large big-assets: #3180
3848 ⚪️ TestCases hot large many-replacements: TODO
3856 🔴 TestCases hot loaders issue-10725: blocked by this.loadModule #3738
3857 🔴 TestCases hot loaders issue-2299: blocked by this.loadModule #3738
3858 🔴 TestCases hot loaders issue-4959: blocked by this.loadModule #3738
3862 🔴 TestCases hot loaders no-string: blocked by #3459
3867 🔴 TestCases hot loaders utils: #4397
3941 🔴 TestCases hot mjs type-module: compile time evaluation typeof and amd
4021 🔴 TestCases hot nonce set-nonce: #4401
4029 🔴 TestCases hot optimize side-effects-reexport-start-unknown: new tree-shaking re-implementation
4096 🔴 TestCases hot parsing amd-rename: #4313
4102 🔴 TestCases hot parsing chunks: #4304
4106 🟡 TestCases hot parsing complex-require: #4304, #4313
4107 🔴 TestCases hot parsing context: #3346
4108 🔴 TestCases hot parsing declared-api: #4313
4111 🔴 TestCases hot parsing es6.nominimize: #4304
4112 🟡 TestCases hot parsing evaluate: should not evaluate new RegExp for redefined RegExp
4114 🔴 TestCases hot parsing extract-amd: #4313
4115 🔴 TestCases hot parsing extract-amd.nominimize: #4313
4116 🟡 TestCases hot parsing extract-require: should not parse require in function arguments
4133 🔴 TestCases hot parsing harmony-injecting-order: #4313
4155 🔴 TestCases hot parsing issue-2084: #4313
4165 🔴 TestCases hot parsing issue-2641: #4313
4169 ⚪️ TestCases hot parsing issue-3252: TODO
4170 ⚪️ TestCases hot parsing issue-3273: TODO
4171 🔴 TestCases hot parsing issue-345: #4313
4173 🔴 TestCases hot parsing issue-387: #4313
4184 🔴 TestCases hot parsing issue-4940: #4313
4193 🔴 TestCases hot parsing issue-758: #4313, #4304
4199 🔴 TestCases hot parsing local-modules: #4313
4203 🔴 TestCases hot parsing nullish-coalescing: #4300
4207 🔴 TestCases hot parsing precreated-ast: #4442
4208 🔴 TestCases hot parsing renaming: #4313, #3346
4212 🔴 TestCases hot parsing strict-mode: #4313
4214 🟡 TestCases hot parsing typeof: require.include
4216 🔴 TestCases hot parsing unsupported-amd: #4313
4747 🔴 TestCases hot resolving commomjs-local-module: #4313
4751 🔴 TestCases hot resolving issue-2986: #4348
4795 🔴 TestCases hot runtime chunk-callback-order: #4313
4803 🔴 TestCases hot runtime module-caching: #4304
4874 ⚪️ TestCases hot scope-hoisting renaming-shorthand-5027: TODO
5064 ⚪️ TestCases hot side-effects dynamic-reexports: TODO
5128 ⚪️ TestCases hot wasm v128: TODO
5227 ⚪️ ConfigTestCases additional-pass simple simple: TODO
5228 ⚪️ ConfigTestCases amd disabled disabled: TODO
5229 ⚪️ ConfigTestCases asset-emitted normal normal: TODO
5238 ⚪️ ConfigTestCases asset-modules custom-condition custom-condition: TODO
5243 ⚪️ ConfigTestCases asset-modules data-url data-url: TODO
5256 ⚪️ ConfigTestCases asset-modules file-url file-url: TODO
5265 ⚪️ ConfigTestCases asset-modules global-options global-options: TODO
5266 ⚪️ ConfigTestCases asset-modules http-url http-url: TODO
5267 ⚪️ ConfigTestCases asset-modules ignore ignore: TODO
5275 ⚪️ ConfigTestCases asset-modules input-data-url-encoding input-data-url-encoding: TODO
5276 ⚪️ ConfigTestCases asset-modules opus opus: TODO
5277 ⚪️ ConfigTestCases asset-modules overridePath overridePath: TODO
5278 ⚪️ ConfigTestCases asset-modules path path: TODO
5287 ⚪️ ConfigTestCases asset-modules query-and-custom-condition query-and-custom-condition: TODO
5288 ⚪️ ConfigTestCases asset-modules query-and-custom-encoder query-and-custom-encoder: TODO
5289 ⚪️ ConfigTestCases asset-modules real-content-hash real-content-hash: TODO
5294 ⚪️ ConfigTestCases asset-modules rule-generator-outputPath rule-generator-outputPath: TODO
5295 ⚪️ ConfigTestCases asset-modules rule-generator-publicPath rule-generator-publicPath: TODO
5296 ⚪️ ConfigTestCases asset-modules rule-generator-publicPath-override rule-generator-publicPath-override: TODO
5305 ⚪️ ConfigTestCases asset-modules unsafe-cache-13827 unsafe-cache-13827: TODO
5318 ⚪️ ConfigTestCases asset-url target-node3 target-node3: TODO
5319 ⚪️ ConfigTestCases asset-url target-web1 target-web1: TODO
5333 ⚪️ ConfigTestCases assets delete-asset delete-asset: TODO
5334 ⚪️ ConfigTestCases async-commons-chunk all-selected all-selected: TODO
5335 ⚪️ ConfigTestCases async-commons-chunk duplicate duplicate: TODO
5336 ⚪️ ConfigTestCases async-commons-chunk existing-name existing-name: TODO
5337 ⚪️ ConfigTestCases async-commons-chunk nested nested: TODO
5342 ⚪️ ConfigTestCases async-commons-chunk simple simple: TODO
5346 ⚪️ ConfigTestCases async-library 1-use-library 1-use-library: TODO
5347 ⚫️ ConfigTestCases cache-dependencies managed-items managed-items: No plan
5348 ⚫️ ConfigTestCases cache-dependencies managed-items-unsafe-cache managed-items-unsafe-cache: No plan
5364 ⚪️ ConfigTestCases chunk-index order-multiple-entries order-multiple-entries: TODO
5365 ⚪️ ConfigTestCases clean dry dry: TODO
5370 ⚪️ ConfigTestCases clean ignore-fn ignore-fn: TODO
5371 ⚪️ ConfigTestCases clean ignore-hook ignore-hook: TODO
5372 ⚪️ ConfigTestCases clean ignore-rx ignore-rx: TODO
5373 ⚪️ ConfigTestCases clean link link: TODO
5378 ⚪️ ConfigTestCases code-generation require-context-id require-context-id: TODO
5379 ⚪️ ConfigTestCases code-generation use-strict use-strict: TODO
5398 ⚪️ ConfigTestCases concatenate-modules import-module import-module: TODO
5417 ⚪️ ConfigTestCases concatenate-modules split-chunk-entry-module split-chunk-entry-module: TODO
5509 ⚪️ ConfigTestCases contenthash assets assets: TODO
5510 ⚪️ ConfigTestCases contenthash include-chunk-id include-chunk-id: TODO
5511 ⚪️ ConfigTestCases context-exclusion simple simple: TODO
5512 ⚪️ ConfigTestCases context-replacement System.import System.import: TODO
5513 ⚪️ ConfigTestCases context-replacement a a: TODO
5514 ⚪️ ConfigTestCases context-replacement b b: TODO
5515 ⚪️ ConfigTestCases context-replacement c c: TODO
5516 ⚪️ ConfigTestCases context-replacement d d: TODO
5517 ⚪️ ConfigTestCases context-replacement e e: TODO
5543 ⚪️ ConfigTestCases css css-modules css-modules: TODO
5544 ⚪️ ConfigTestCases css css-modules-in-node css-modules-in-node: TODO
5556 ⚪️ ConfigTestCases css exports-in-node exports-in-node: TODO
5573 ⚪️ ConfigTestCases css urls urls: TODO
5574 ⚫️ ConfigTestCases custom-hash-function xxhash xxhash: No plan
5575 ⚪️ ConfigTestCases custom-modules json-custom json-custom: TODO
5576 ⚪️ ConfigTestCases custom-source-type localization localization: TODO
5577 ⚪️ ConfigTestCases deep-scope-analysis remove-export remove-export: TODO
5578 ⚪️ ConfigTestCases deep-scope-analysis remove-export-scope-hoisting remove-export-scope-hoisting: TODO
5583 ⚪️ ConfigTestCases delegated simple simple: TODO
5584 ⚪️ ConfigTestCases delegated-hash simple simple: TODO
5589 ⚪️ ConfigTestCases deprecations chunk-and-module chunk-and-module: TODO
5590 ⚪️ ConfigTestCases deprecations chunk-files chunk-files: TODO
5591 ⚪️ ConfigTestCases deprecations config config: TODO
5592 ⚪️ ConfigTestCases deprecations invalid-dependencies invalid-dependencies: TODO
5593 ⚪️ ConfigTestCases deprecations non-unique-hash non-unique-hash: TODO
5602 ⚪️ ConfigTestCases dll-plugin 0-create-dll 0-create-dll: TODO
5603 ⚪️ ConfigTestCases dll-plugin 0-issue-10475 0-issue-10475: TODO
5604 ⚪️ ConfigTestCases dll-plugin 1-issue-10475 1-issue-10475: TODO
5605 ⚪️ ConfigTestCases dll-plugin 1-use-dll 1-use-dll: TODO
5606 ⚪️ ConfigTestCases dll-plugin 2-use-dll-without-scope 2-use-dll-without-scope: TODO
5607 ⚪️ ConfigTestCases dll-plugin 3-use-dll-with-hashid 3-use-dll-with-hashid: TODO
5608 ⚪️ ConfigTestCases dll-plugin-entry 0-create-dll 0-create-dll: TODO
5609 ⚪️ ConfigTestCases dll-plugin-entry 1-use-dll 1-use-dll: TODO
5610 ⚪️ ConfigTestCases dll-plugin-entry 2-error-non-entry 2-error-non-entry: TODO
5611 ⚪️ ConfigTestCases dll-plugin-format 0-create-dll 0-create-dll: TODO
5612 ⚪️ ConfigTestCases dll-plugin-side-effects 0-create-dll 0-create-dll: TODO
5613 ⚪️ ConfigTestCases dll-plugin-side-effects 1-use-dll 1-use-dll: TODO
5660 🔴 ConfigTestCases entry depend-on-advanced depend-on-advanced: afterSeal hook blocks
5661 🔴 ConfigTestCases entry depend-on-bug depend-on-bug: DynamicEntryPlugin blocks
5662 🔴 ConfigTestCases entry depend-on-non-js depend-on-non-js: mini-extract-css-plugin blocks
5723 ⚪️ ConfigTestCases entry weird-names weird-names: TODO
5724 ⚪️ ConfigTestCases entry weird-names2 weird-names2: TODO
5725 ⚪️ ConfigTestCases errors asset-options-validation asset-options-validation: TODO
5726 ⚪️ ConfigTestCases errors case-emit case-emit: TODO
5733 ⚪️ ConfigTestCases errors entry-not-found entry-not-found: TODO
5734 ⚪️ ConfigTestCases errors exception-in-chunk-renderer exception-in-chunk-renderer: TODO
5747 ⚪️ ConfigTestCases externals async-externals async-externals: TODO
5759 ⚪️ ConfigTestCases externals externals-array externals-array: TODO
5764 ⚪️ ConfigTestCases externals externals-in-commons-chunk externals-in-commons-chunk: TODO
5769 ⚪️ ConfigTestCases externals externals-system-custom externals-system-custom: TODO
5778 ⚪️ ConfigTestCases externals import-attributes import-attributes: TODO
5801 ⚪️ ConfigTestCases externals optional-externals-root optional-externals-root: TODO
5802 ⚪️ ConfigTestCases externals optional-externals-umd optional-externals-umd: TODO
5803 ⚪️ ConfigTestCases externals optional-externals-umd2 optional-externals-umd2: TODO
5804 ⚪️ ConfigTestCases externals optional-externals-umd2-mixed optional-externals-umd2-mixed: TODO
5809 ⚪️ ConfigTestCases externals resolve resolve: TODO
5814 ⚪️ ConfigTestCases filename-template filename-function filename-function: TODO
5823 ⚪️ ConfigTestCases filename-template split-chunks-filename split-chunks-filename: TODO
5875 ⚪️ ConfigTestCases hash-length deterministic-module-ids deterministic-module-ids: TODO
5876 ⚪️ ConfigTestCases hash-length hashed-module-ids hashed-module-ids: TODO
5877 ⚪️ ConfigTestCases hash-length output-filename output-filename: TODO
5929 ⚪️ ConfigTestCases inner-graph altaskitButton altaskitButton: TODO
5937 ⚪️ ConfigTestCases inner-graph blockScopes blockScopes: TODO
5938 ⚪️ ConfigTestCases inner-graph class class: TODO
5939 ⚪️ ConfigTestCases inner-graph const const: TODO
5940 ⚪️ ConfigTestCases inner-graph defaultArrow defaultArrow: TODO
5941 ⚪️ ConfigTestCases inner-graph defaultClass defaultClass: TODO
5942 ⚪️ ConfigTestCases inner-graph defaultExpression defaultExpression: TODO
5943 ⚪️ ConfigTestCases inner-graph defaultFunction defaultFunction: TODO
5944 ⚪️ ConfigTestCases inner-graph defaultFunctionExpression defaultFunctionExpression: TODO
5945 ⚪️ ConfigTestCases inner-graph defaultId defaultId: TODO
5946 ⚪️ ConfigTestCases inner-graph defaultNamedFunction defaultNamedFunction: TODO
5947 ⚪️ ConfigTestCases inner-graph defaultNamedFunctionExpression defaultNamedFunctionExpression: TODO
5948 ⚪️ ConfigTestCases inner-graph eval-bailout eval-bailout: TODO
5949 ⚪️ ConfigTestCases inner-graph export export: TODO
5950 ⚪️ ConfigTestCases inner-graph importAll importAll: TODO
5951 ⚪️ ConfigTestCases inner-graph issue-11678 issue-11678: TODO
5952 ⚪️ ConfigTestCases inner-graph issue-12669 issue-12669: TODO
5953 ⚪️ ConfigTestCases inner-graph issue-12669-mini issue-12669-mini: TODO
5954 ⚪️ ConfigTestCases inner-graph localReference localReference: TODO
5955 ⚪️ ConfigTestCases inner-graph nested nested: TODO
5956 ⚪️ ConfigTestCases inner-graph pure pure: TODO
5957 ⚪️ ConfigTestCases inner-graph ramdaIdentical ramdaIdentical: TODO
5958 ⚪️ ConfigTestCases inner-graph specifier specifier: TODO
5959 ⚪️ ConfigTestCases inner-graph varNotWritten varNotWritten: TODO
5960 ⚪️ ConfigTestCases inner-graph varWritten varWritten: TODO
5996 ⚪️ ConfigTestCases json tree-shaking-default tree-shaking-default: TODO
6007 ⚪️ ConfigTestCases layer rules rules: TODO
6088 ⚪️ ConfigTestCases loaders #-issue-14755-# #-issue-14755-#: TODO
6131 ⚪️ ConfigTestCases loaders options options: TODO
6132 🔴 ConfigTestCases loaders pr-14384 pr-14384: Rspack does not export NormalModule and support beforeLoaders from JS side and whether to implemented is tracked here: https://github.com/orgs/web-infra-dev/projects/9
6143 ⚪️ ConfigTestCases managedPaths futureDefaults futureDefaults: TODO
6144 ⚪️ ConfigTestCases mangle mangle-with-object-prop mangle-with-object-prop: TODO
6175 ⚪️ ConfigTestCases optimization chunk chunk: TODO
6186 ⚪️ ConfigTestCases optimization hashed-module-ids hashed-module-ids: TODO
6204 ⚪️ ConfigTestCases optimization runtime-specific-used-exports2 runtime-specific-used-exports2: TODO
6269 ⚪️ ConfigTestCases parsing context context: TODO
6287 ⚪️ ConfigTestCases parsing harmony-this-concat harmony-this-concat: TODO
6296 ⚪️ ConfigTestCases parsing issue-14545 issue-14545: TODO
6297 ⚪️ ConfigTestCases parsing issue-14720 issue-14720: TODO
6298 ⚪️ ConfigTestCases parsing issue-2942 issue-2942: TODO
6315 ⚪️ ConfigTestCases parsing issue-8293 issue-8293: TODO
6316 ⚪️ ConfigTestCases parsing issue-9042 issue-9042: TODO
6330 ⚪️ ConfigTestCases parsing optional optional: TODO
6331 ⚪️ ConfigTestCases parsing optional-chaining optional-chaining: TODO
6336 ⚪️ ConfigTestCases parsing require-ignore require-ignore: TODO
6341 ⚪️ ConfigTestCases parsing requirejs requirejs: TODO
6342 ⚪️ ConfigTestCases parsing system.import system.import: TODO
6356 🔴 ConfigTestCases plugins banner-plugin-hashing banner-plugin-hashing: Lacking support of chunkhash
6357 ⚪️ ConfigTestCases plugins define-plugin define-plugin: TODO
6358 ⚪️ ConfigTestCases plugins define-plugin-bigint define-plugin-bigint: TODO
6362 ⚪️ ConfigTestCases plugins lib-manifest-plugin lib-manifest-plugin: TODO
6368 ⚪️ ConfigTestCases plugins min-chunk-size min-chunk-size: TODO
6369 ⚪️ ConfigTestCases plugins mini-css-extract-plugin mini-css-extract-plugin: TODO
6370 ⚪️ ConfigTestCases plugins profiling-plugin profiling-plugin: TODO
6371 ⚪️ ConfigTestCases plugins progress-plugin progress-plugin: TODO
6386 ⚪️ ConfigTestCases plugins source-map-dev-tool-plugin source-map-dev-tool-plugin: TODO
6404 ⚪️ ConfigTestCases process-assets html-plugin html-plugin: TODO
6405 ⚪️ ConfigTestCases race-conditions load-module load-module: TODO
6415 ⚪️ ConfigTestCases records issue-295 issue-295: TODO
6416 ⚪️ ConfigTestCases records issue-2991 issue-2991: TODO
6417 ⚪️ ConfigTestCases records issue-7339 issue-7339: TODO
6418 ⚪️ ConfigTestCases records issue-7492 issue-7492: TODO
6419 ⚪️ ConfigTestCases records stable-sort stable-sort: TODO
6420 ⚪️ ConfigTestCases require module-require module-require: TODO
6421 ⚪️ ConfigTestCases resolve context-resolve-with-ignore context-resolve-with-ignore: TODO
6422 ⚪️ ConfigTestCases resolve empty-context-module empty-context-module: TODO
6429 ⚪️ ConfigTestCases resolve issue-11335-context-module issue-11335-context-module: TODO
6430 ⚪️ ConfigTestCases resolve issue-15580 issue-15580: TODO
6435 ⚪️ ConfigTestCases resolve only-module only-module: TODO
6440 ⚪️ ConfigTestCases resolve-merging override override: TODO
6445 ⚪️ ConfigTestCases resolving prefer-absolute prefer-absolute: TODO
6450 ⚪️ ConfigTestCases rule-set chaining chaining: TODO
6451 ⚪️ ConfigTestCases rule-set compiler compiler: TODO
6452 ⚪️ ConfigTestCases rule-set custom custom: TODO
6457 ⚪️ ConfigTestCases rule-set resolve-options resolve-options: TODO
6458 ⚪️ ConfigTestCases rule-set simple simple: TODO
6459 ⚪️ ConfigTestCases rule-set simple-use-array-fn simple-use-array-fn: TODO
6460 ⚪️ ConfigTestCases rule-set simple-use-fn-array simple-use-fn-array: TODO
6485 ⚪️ ConfigTestCases scope-hoisting create-dll-plugin create-dll-plugin: TODO
6486 ⚪️ ConfigTestCases scope-hoisting dll-plugin dll-plugin: TODO
6513 ⚪️ ConfigTestCases sharing consume-module-ignore-warnings consume-module-ignore-warnings: TODO
6518 ⚪️ ConfigTestCases sharing consume-multiple-versions-ignore-warnings consume-multiple-versions-ignore-warnings: TODO
6559 ⚪️ ConfigTestCases side-effects issue-13063 issue-13063: TODO
6578 ⚪️ ConfigTestCases side-effects url url: TODO
6603 ⚪️ ConfigTestCases source-map context-module-source-path context-module-source-path: TODO
6621 ⚪️ ConfigTestCases source-map exclude-modules-source-map exclude-modules-source-map: TODO
6622 ⚪️ ConfigTestCases source-map module-names module-names: TODO
6652 🔴 ConfigTestCases source-map relative-source-map-path relative-source-map-path: #4304
6653 🔴 ConfigTestCases source-map relative-source-maps-by-loader relative-source-maps-by-loader: #5393
6662 ⚪️ ConfigTestCases source-map source-map-with-profiling-plugin source-map-with-profiling-plugin: TODO
6684 🔴 ConfigTestCases split-chunks custom-filename-function custom-filename-function: not support function type of splitChunks #4333
6690 🔴 ConfigTestCases split-chunks entry-point-error entry-point-error: should emit error if entry point and splitted chunk have the same name #4332
6699 🔴 ConfigTestCases split-chunks issue-11513 issue-11513: should support object type minSize #4331
6724 🔴 ConfigTestCases split-chunks no-options no-options: no js splitChunks plugin
6729 🔴 ConfigTestCases split-chunks runtime-chunk runtime-chunk: not have the same name for splitted chunk with webpack #4334
6763 🔴 ConfigTestCases split-chunks-common hot hot: block: require.main #3562
6779 🔴 ConfigTestCases split-chunks-common library library: block: require.ensure #4304
6801 ⚪️ ConfigTestCases target amd-container-named amd-container-named: TODO
6807 ⚪️ ConfigTestCases target amd-container-unnamed amd-container-unnamed: TODO
6808 ⚪️ ConfigTestCases target amd-named amd-named: TODO
6814 ⚪️ ConfigTestCases target amd-unnamed amd-unnamed: TODO
6848 ⚪️ ConfigTestCases target system-named-assets-path system-named-assets-path: TODO
6853 ⚪️ ConfigTestCases target umd-auxiliary-comments-object umd-auxiliary-comments-object: TODO
6854 ⚪️ ConfigTestCases target umd-auxiliary-comments-string umd-auxiliary-comments-string: TODO
6886 ⚪️ ConfigTestCases types filesystems filesystems: TODO
6891 ⚪️ ConfigTestCases utils lazy-set lazy-set: TODO
6892 ⚪️ ConfigTestCases wasm export-imported-global export-imported-global: TODO
6893 ⚪️ ConfigTestCases wasm identical identical: TODO
6894 ⚪️ ConfigTestCases wasm import-wasm-wasm import-wasm-wasm: TODO
6895 ⚪️ ConfigTestCases wasm missing-wasm-experiment missing-wasm-experiment: TODO
6896 ⚪️ ConfigTestCases wasm wasm-in-initial-chunk-error wasm-in-initial-chunk-error: TODO
6897 ⚪️ ConfigTestCases web attach-existing attach-existing: TODO
6902 ⚪️ ConfigTestCases web node-source-future-defaults node-source-future-defaults: TODO
6903 ⚪️ ConfigTestCases web node-source-global node-source-global: TODO
6904 ⚪️ ConfigTestCases web non-js-chunks-entrypoint non-js-chunks-entrypoint: TODO
6905 ⚪️ ConfigTestCases web non-js-chunks-entrypoint-runtime-chunk non-js-chunks-entrypoint-runtime-chunk: TODO
6926 ⚪️ ConfigTestCases web unique-jsonp unique-jsonp: TODO
6991 ⚪️ WatchTestCases add-defines: TODO
6992 ⚪️ WatchTestCases asset-concat: TODO
6996 ⚪️ WatchTestCases child-compilation-cache: TODO
6998 ⚪️ WatchTestCases emit-without-clean: TODO
7000 ⚪️ WatchTestCases loader-import-module: TODO
7001 ⚪️ WatchTestCases managedPath: TODO
7002 ⚪️ WatchTestCases new-split-chunk-entry-node: TODO
7003 ⚪️ WatchTestCases new-split-chunk-entry-web: TODO
7004 ⚪️ WatchTestCases reexport-mangle: TODO
7005 ⚪️ WatchTestCases unsafe-cache: TODO
7006 ⚪️ WatchTestCases unsafe-cache-duplicates: TODO
7007 ⚪️ WatchTestCases unsafe-cache-managed-paths: TODO
7014 ⚪️ WatchTestCases switching-harmony: TODO
7015 ⚪️ WatchTestCases automatic-prefetch-plugin: TODO
7016 ⚪️ WatchTestCases automatic-prefetch-plugin-9485: TODO
7017 ⚪️ WatchTestCases define-plugin: TODO
7018 ⚪️ WatchTestCases dll-reference-plugin: TODO
7019 ⚪️ WatchTestCases mini-css-extract-plugin: TODO
7021 ⚪️ WatchTestCases profiling-plugin: TODO
7022 ⚪️ WatchTestCases watch-ignore-plugin: TODO
7024 ⚪️ WatchTestCases parse-failed-esm: TODO
7025 ⚪️ WatchTestCases in-loader: TODO
7027 ⚪️ WatchTestCases static-import: TODO
7034 ⚪️ WatchTestCases unable-to-snapshot: TODO

@LingyuCoder LingyuCoder marked this pull request as ready for review September 12, 2024 03:30
@LingyuCoder LingyuCoder merged commit f6f1798 into main Sep 12, 2024
33 checks passed
@LingyuCoder LingyuCoder deleted the fix/trusted-type branch September 12, 2024 03:33
@pushkargupta9807
Copy link

@LingyuCoder @SyMind I just upgraded from 1.04 to 1.0.5 and started running into the below error when initializing the worker script.

image

it is a simple worker init code as below which was working fine in the previous version and I suspect this change could have broken it.

image

Can you please advise? Thanks.

@LingyuCoder
Copy link
Collaborator Author

LingyuCoder commented Oct 11, 2024

@LingyuCoder @SyMind I just upgraded from 1.04 to 1.0.5 and started running into the below error when initializing the worker script.

image

it is a simple worker init code as below which was working fine in the previous version and I suspect this change could have broken it.

image

Can you please advise? Thanks.

Can you print the import.meta.url and the compiled code here? And try to run the same new URL in console, not sure whether this is caused by wrong import.meta.url or trusted type.

@LingyuCoder
Copy link
Collaborator Author

LingyuCoder commented Oct 11, 2024

Seems there is a bug in CreateScriptUrlRuntimeModule here. I will try to fix it.

This is wired. This runtime module should only be added when output.trustedTypes is set. But this code only run when the output.trustedTypes is not set. Seems that only adding RuntimeGlobals.createScriptUrl manually will encounter this error.

@pushkargupta9807
Copy link

Thank you @LingyuCoder for the super fast turn around fix.
However I wanted to let you know that I checked and nowhere in my code I use the RuntimeGlobals.createScriptUrl .
(we do have a MF related plugin which uses it, but I have never included that plugin in our rspack builds).

I do have output.trustedTypes set . I disabled it , still ran into the same error.

Is there a temporary hack/ workaround you can suggest to get it working ? i.e to avoid hitting that problematic code.

@LingyuCoder
Copy link
Collaborator Author

Thank you @LingyuCoder for the super fast turn around fix. However I wanted to let you know that I checked and nowhere in my code I use the RuntimeGlobals.createScriptUrl . (we do have a MF related plugin which uses it, but I have never included that plugin in our rspack builds).

I do have output.trustedTypes set . I disabled it , still ran into the same error.

Is there a temporary hack/ workaround you can suggest to get it working ? i.e to avoid hitting that problematic code.

You can try using compilation.hooks.runtimeModule to override the code of CreateScriptUrlRuntimeModule with __webpack_require__.tu = function(url) { return url; }.

Not sure whether there are other bugs. Maybe the compiled code and the parameters of new URL need to be provided to locate the error.

@pushkargupta9807
Copy link

@LingyuCoder I just tried the 1.0.11 v with the above fix , but I am still running into that same issue. I filed the following bug to track the same.
#8134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants