feat: add EntryChunkPlugin to handle shebang and shims #1182
test-ubuntu.yml
on: pull_request
Matrix: changes
Matrix: integration-e2e-ubuntu
Matrix: ut-ubuntu
Matrix: benchmark-ubuntu
Test passed or skipped
0s
Annotations
22 errors and 1 warning
tests/config.test.ts > Should compose create Rsbuild config correctly > Merge Rsbuild config:
packages/core/tests/config.test.ts#L196
Error: Snapshot `Should compose create Rsbuild config correctly > Merge Rsbuild config 1` mismatched
- Expected
+ Received
@@ -199,11 +199,10 @@
},
{
"plugins": [
EntryChunkPlugin {
"enabledImportMetaUrlShim": true,
- "importMetaUrlShims": {},
"reactDirectives": {},
"shebangChmod": 493,
"shebangEntries": {},
"shebangInjectedAssets": Set {},
},
@@ -425,11 +424,10 @@
},
{
"plugins": [
EntryChunkPlugin {
"enabledImportMetaUrlShim": true,
- "importMetaUrlShims": {},
"reactDirectives": {},
"shebangChmod": 493,
"shebangEntries": {},
"shebangInjectedAssets": Set {},
},
@@ -635,11 +633,10 @@
},
{
"plugins": [
EntryChunkPlugin {
"enabledImportMetaUrlShim": true,
- "importMetaUrlShims": {},
"reactDirectives": {},
"shebangChmod": 493,
"shebangEntries": {},
"shebangInjectedAssets": Set {},
},
❯ tests/config.test.ts:196:35
|
ut-ubuntu (20)
Process completed with exit code 1.
|
ut-ubuntu (22)
The job was canceled because "_20" failed.
|
tests/config.test.ts > Should compose create Rsbuild config correctly > Merge Rsbuild config:
packages/core/tests/config.test.ts#L196
Error: Snapshot `Should compose create Rsbuild config correctly > Merge Rsbuild config 1` mismatched
- Expected
+ Received
@@ -199,11 +199,10 @@
},
{
"plugins": [
EntryChunkPlugin {
"enabledImportMetaUrlShim": true,
- "importMetaUrlShims": {},
"reactDirectives": {},
"shebangChmod": 493,
"shebangEntries": {},
"shebangInjectedAssets": Set {},
},
@@ -425,11 +424,10 @@
},
{
"plugins": [
EntryChunkPlugin {
"enabledImportMetaUrlShim": true,
- "importMetaUrlShims": {},
"reactDirectives": {},
"shebangChmod": 493,
"shebangEntries": {},
"shebangInjectedAssets": Set {},
},
@@ -635,11 +633,10 @@
},
{
"plugins": [
EntryChunkPlugin {
"enabledImportMetaUrlShim": true,
- "importMetaUrlShims": {},
"reactDirectives": {},
"shebangChmod": 493,
"shebangEntries": {},
"shebangInjectedAssets": Set {},
},
❯ tests/config.test.ts:196:35
|
ut-ubuntu (22)
The operation was canceled.
|
ut-ubuntu (18)
The job was canceled because "_20" failed.
|
tests/config.test.ts > Should compose create Rsbuild config correctly > Merge Rsbuild config:
packages/core/tests/config.test.ts#L196
Error: Snapshot `Should compose create Rsbuild config correctly > Merge Rsbuild config 1` mismatched
- Expected
+ Received
@@ -199,11 +199,10 @@
},
{
"plugins": [
EntryChunkPlugin {
"enabledImportMetaUrlShim": true,
- "importMetaUrlShims": {},
"reactDirectives": {},
"shebangChmod": 493,
"shebangEntries": {},
"shebangInjectedAssets": Set {},
},
@@ -425,11 +424,10 @@
},
{
"plugins": [
EntryChunkPlugin {
"enabledImportMetaUrlShim": true,
- "importMetaUrlShims": {},
"reactDirectives": {},
"shebangChmod": 493,
"shebangEntries": {},
"shebangInjectedAssets": Set {},
},
@@ -635,11 +633,10 @@
},
{
"plugins": [
EntryChunkPlugin {
"enabledImportMetaUrlShim": true,
- "importMetaUrlShims": {},
"reactDirectives": {},
"shebangChmod": 493,
"shebangEntries": {},
"shebangInjectedAssets": Set {},
},
❯ tests/config.test.ts:196:35
|
ut-ubuntu (18)
The operation was canceled.
|
integration/asset/index.test.ts > set the assets name:
tests/integration/asset/index.test.ts#L35
AssertionError: expected 'import * as __WEBPACK_EXTERNAL_MODULE…' to contain 'const image_namespaceObject = __webpa…'
- Expected
+ Received
- const image_namespaceObject = __webpack_require__.p + "static/image/image.c74653c1.png";
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
+ // The module cache
+ var __webpack_module_cache__ = {};
+ // The require function
+ function __webpack_require__(moduleId) {
+ // Check if module is in cache
+ var cachedModule = __webpack_module_cache__[moduleId];
+ if (void 0 !== cachedModule) return cachedModule.exports;
+ // Create a new module (and put it into the cache)
+ var module = __webpack_module_cache__[moduleId] = {
+ exports: {}
+ };
+ // Execute the module function
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+ // Return the exports of the module
+ return module.exports;
+ }
+ /************************************************************************/ // webpack/runtime/public_path
+ (()=>{
+ __webpack_require__.p = "/";
+ })(); /************************************************************************/
+ const image_namespaceObject = __webpack_require__.p + "static/image/image.ba5ae2a2.png";
+ /* ESM default export */ const src_rslib_entry_ = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("img", {
+ src: image_namespaceObject,
+ alt: ""
+ });
+ export { src_rslib_entry_ as default };
+
❯ integration/asset/index.test.ts:35:44
|
integration/minify/index.test.ts > minify is enabled by default in mf format, bar and baz should be minified:
tests/integration/minify/index.test.ts#L42
Error: Snapshot `minify is enabled by default in mf format, bar and baz should be minified 1` mismatched
Expected: """use strict";(globalThis["default_minify"]=globalThis["default_minify"]||[]).push([["249"],{"../../__fixtures__/src/index.ts":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{foo:function(){return foo}});const foo=()=>{}}}]);""
Received: """use strict";const __rslib_import_meta_url__=/*#__PURE__*/function(){return"undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href}();(globalThis["default_minify"]=globalThis["default_minify"]||[]).push([["249"],{"../../__fixtures__/src/index.ts":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{foo:function(){return foo}});const foo=()=>{}}}]);""
❯ integration/minify/index.test.ts:42:25
|
integration/minify/index.test.ts > minify is disabled by the user, bar and baz should not be minified:
tests/integration/minify/index.test.ts#L48
Error: Snapshot `minify is disabled by the user, bar and baz should not be minified 1` mismatched
- Expected
+ Received
@@ -1,6 +1,13 @@
""use strict";
+ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
+ return typeof document === 'undefined'
+ ? new (require('url'.replace('', '')).URL)('file:' + __filename).href
+ : (document.currentScript && document.currentScript.src) ||
+ new URL('main.js', document.baseURI).href;
+ })();
+ ;
(globalThis['disable_minify'] = globalThis['disable_minify'] || []).push([["249"], {
"../../__fixtures__/src/index.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
foo: function() { return foo; }
❯ integration/minify/index.test.ts:48:25
|
integration-e2e-ubuntu (20)
Process completed with exit code 1.
|
integration-e2e-ubuntu (22)
The job was canceled because "_20" failed.
|
integration/asset/index.test.ts > set the assets name:
tests/integration/asset/index.test.ts#L35
AssertionError: expected 'import * as __WEBPACK_EXTERNAL_MODULE…' to contain 'const image_namespaceObject = __webpa…'
- Expected
+ Received
- const image_namespaceObject = __webpack_require__.p + "static/image/image.c74653c1.png";
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
+ // The module cache
+ var __webpack_module_cache__ = {};
+ // The require function
+ function __webpack_require__(moduleId) {
+ // Check if module is in cache
+ var cachedModule = __webpack_module_cache__[moduleId];
+ if (void 0 !== cachedModule) return cachedModule.exports;
+ // Create a new module (and put it into the cache)
+ var module = __webpack_module_cache__[moduleId] = {
+ exports: {}
+ };
+ // Execute the module function
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+ // Return the exports of the module
+ return module.exports;
+ }
+ /************************************************************************/ // webpack/runtime/public_path
+ (()=>{
+ __webpack_require__.p = "/";
+ })(); /************************************************************************/
+ const image_namespaceObject = __webpack_require__.p + "static/image/image.ba5ae2a2.png";
+ /* ESM default export */ const src_rslib_entry_ = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("img", {
+ src: image_namespaceObject,
+ alt: ""
+ });
+ export { src_rslib_entry_ as default };
+
❯ integration/asset/index.test.ts:35:44
|
integration/minify/index.test.ts > minify is enabled by default in mf format, bar and baz should be minified:
tests/integration/minify/index.test.ts#L42
Error: Snapshot `minify is enabled by default in mf format, bar and baz should be minified 1` mismatched
Expected: """use strict";(globalThis["default_minify"]=globalThis["default_minify"]||[]).push([["249"],{"../../__fixtures__/src/index.ts":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{foo:function(){return foo}});const foo=()=>{}}}]);""
Received: """use strict";const __rslib_import_meta_url__=/*#__PURE__*/function(){return"undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href}();(globalThis["default_minify"]=globalThis["default_minify"]||[]).push([["249"],{"../../__fixtures__/src/index.ts":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{foo:function(){return foo}});const foo=()=>{}}}]);""
❯ integration/minify/index.test.ts:42:25
|
integration/minify/index.test.ts > minify is disabled by the user, bar and baz should not be minified:
tests/integration/minify/index.test.ts#L48
Error: Snapshot `minify is disabled by the user, bar and baz should not be minified 1` mismatched
- Expected
+ Received
@@ -1,6 +1,13 @@
""use strict";
+ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
+ return typeof document === 'undefined'
+ ? new (require('url'.replace('', '')).URL)('file:' + __filename).href
+ : (document.currentScript && document.currentScript.src) ||
+ new URL('main.js', document.baseURI).href;
+ })();
+ ;
(globalThis['disable_minify'] = globalThis['disable_minify'] || []).push([["249"], {
"../../__fixtures__/src/index.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
foo: function() { return foo; }
❯ integration/minify/index.test.ts:48:25
|
integration-e2e-ubuntu (22)
The operation was canceled.
|
integration-e2e-ubuntu (18)
The job was canceled because "_20" failed.
|
integration/asset/index.test.ts > set the assets name:
tests/integration/asset/index.test.ts#L35
AssertionError: expected 'import * as __WEBPACK_EXTERNAL_MODULE…' to contain 'const image_namespaceObject = __webpa…'
- Expected
+ Received
- const image_namespaceObject = __webpack_require__.p + "static/image/image.c74653c1.png";
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
+ // The module cache
+ var __webpack_module_cache__ = {};
+ // The require function
+ function __webpack_require__(moduleId) {
+ // Check if module is in cache
+ var cachedModule = __webpack_module_cache__[moduleId];
+ if (void 0 !== cachedModule) return cachedModule.exports;
+ // Create a new module (and put it into the cache)
+ var module = __webpack_module_cache__[moduleId] = {
+ exports: {}
+ };
+ // Execute the module function
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+ // Return the exports of the module
+ return module.exports;
+ }
+ /************************************************************************/ // webpack/runtime/public_path
+ (()=>{
+ __webpack_require__.p = "/";
+ })(); /************************************************************************/
+ const image_namespaceObject = __webpack_require__.p + "static/image/image.ba5ae2a2.png";
+ /* ESM default export */ const src_rslib_entry_ = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("img", {
+ src: image_namespaceObject,
+ alt: ""
+ });
+ export { src_rslib_entry_ as default };
+
❯ integration/asset/index.test.ts:35:44
|
integration/minify/index.test.ts > minify is enabled by default in mf format, bar and baz should be minified:
tests/integration/minify/index.test.ts#L42
Error: Snapshot `minify is enabled by default in mf format, bar and baz should be minified 1` mismatched
Expected: """use strict";(globalThis["default_minify"]=globalThis["default_minify"]||[]).push([["249"],{"../../__fixtures__/src/index.ts":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{foo:function(){return foo}});const foo=()=>{}}}]);""
Received: """use strict";const __rslib_import_meta_url__=/*#__PURE__*/function(){return"undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href}();(globalThis["default_minify"]=globalThis["default_minify"]||[]).push([["249"],{"../../__fixtures__/src/index.ts":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{foo:function(){return foo}});const foo=()=>{}}}]);""
❯ integration/minify/index.test.ts:42:25
|
integration/minify/index.test.ts > minify is disabled by the user, bar and baz should not be minified:
tests/integration/minify/index.test.ts#L48
Error: Snapshot `minify is disabled by the user, bar and baz should not be minified 1` mismatched
- Expected
+ Received
@@ -1,6 +1,13 @@
""use strict";
+ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
+ return typeof document === 'undefined'
+ ? new (require('url'.replace('', '')).URL)('file:' + __filename).href
+ : (document.currentScript && document.currentScript.src) ||
+ new URL('main.js', document.baseURI).href;
+ })();
+ ;
(globalThis['disable_minify'] = globalThis['disable_minify'] || []).push([["249"], {
"../../__fixtures__/src/index.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
foo: function() { return foo; }
❯ integration/minify/index.test.ts:48:25
|
integration-e2e-ubuntu (18)
The operation was canceled.
|
changes (18)
Unexpected input(s) 'predicate-quantifier', valid inputs are ['token', 'working-directory', 'ref', 'base', 'filters', 'list-files', 'initial-fetch-depth']
|