Skip to content

Commit

Permalink
test(ncc): update fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Aug 10, 2022
1 parent c46c5ca commit a1be9eb
Show file tree
Hide file tree
Showing 21 changed files with 258 additions and 399 deletions.
4 changes: 2 additions & 2 deletions test/unit/bundle-subasset/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/******/ "use strict";
/******/ var __webpack_modules__ = ({

/***/ 622:
/***/ 17:
/***/ ((module) => {

module.exports = require("path");
Expand Down Expand Up @@ -91,7 +91,7 @@ var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
__nccwpck_require__.r(__webpack_exports__);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(622);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(17);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);


Expand Down
4 changes: 2 additions & 2 deletions test/unit/bundle-subasset2/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ const external_path_namespaceObject = require("path");


const piscina = new (external_piscina_default())({
filename: __nccwpck_require__.ab + "pi-bridge.js",
filename: __nccwpck_require__.ab + "pi-bridge.js"
});
(async function () {
(async function() {
const result = await piscina.runTask(2);
console.log(result);
})();
Expand Down
4 changes: 2 additions & 2 deletions test/unit/custom-emit/output-coverage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 747:
/***/ 147:
/***/ ((module) => {

"use strict";
Expand Down Expand Up @@ -50,7 +50,7 @@ module.exports = require("fs");
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
const { readFileSync } = __nccwpck_require__(747);
const { readFileSync } = __nccwpck_require__(147);
console.log(readFileSync(__dirname + './test.json'));


Expand Down
4 changes: 2 additions & 2 deletions test/unit/double-nested-builds/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
/***/ ((module) => {

"use strict";
module.exports = __nccwpck_require__(622);
module.exports = __nccwpck_require__(17);

/***/ })

Expand Down Expand Up @@ -182,7 +182,7 @@ module.exports = __nccwpck_require__(622);

/***/ }),

/***/ 622:
/***/ 17:
/***/ ((module) => {

"use strict";
Expand Down
1 change: 0 additions & 1 deletion test/unit/exports-nomodule/output-coverage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/******/ "use strict";
/******/ /* webpack/runtime/compat */
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
Expand Down
1 change: 0 additions & 1 deletion test/unit/exports-wildcard/output-coverage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/******/ "use strict";
/******/ /* webpack/runtime/compat */
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
Expand Down
19 changes: 14 additions & 5 deletions test/unit/externals/output-coverage.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 306:
/***/ 378:
/***/ ((module) => {

"use strict";
module.exports = require("external-replace/replaced/some-file");

/***/ }),

/***/ 830:
/***/ ((module) => {

"use strict";
module.exports = require("externalmapped");

/***/ }),

/***/ 196:
/***/ 958:
/***/ ((module) => {

"use strict";
Expand Down Expand Up @@ -58,12 +66,13 @@ module.exports = require("regexexternal");
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
const external = __nccwpck_require__(306);
const regexpExternal = __nccwpck_require__(196);
const external = __nccwpck_require__(830);
const regexpExternal = __nccwpck_require__(958);
const regexpExternalMatch = __nccwpck_require__(378)

console.log(external);
console.log(regexpExternal);

console.log(regexpExternalMatch);

})();

Expand Down
1 change: 0 additions & 1 deletion test/unit/imports/output-coverage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/******/ "use strict";
/******/ /* webpack/runtime/compat */
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
Expand Down
4 changes: 2 additions & 2 deletions test/unit/minify-err/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = webpackEmptyContext;

/***/ }),

/***/ 747:
/***/ 147:
/***/ ((module) => {

"use strict";
Expand Down Expand Up @@ -71,7 +71,7 @@ var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
if (global.GENTLY) __nccwpck_require__(875) = GENTLY.hijack(eval("require"));
console.log(__nccwpck_require__(747));
console.log(__nccwpck_require__(147));

})();

Expand Down
4 changes: 2 additions & 2 deletions test/unit/nested-builds/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/***/ 622:
/***/ ((module) => {

module.exports = __nccwpck_require__(622);
module.exports = __nccwpck_require__(17);

/***/ })

Expand Down Expand Up @@ -118,7 +118,7 @@

/***/ }),

/***/ 622:
/***/ 17:
/***/ ((module) => {

"use strict";
Expand Down
26 changes: 14 additions & 12 deletions test/unit/ts-exts/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,28 @@
/******/ "use strict";
/******/ var __webpack_modules__ = ({

/***/ 119:
/***/ 124:
/***/ ((__unused_webpack_module, exports) => {


Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.default = {};
Object.defineProperty(exports, "default", ({
enumerable: true,
get: ()=>_default
}));
const _default = {};


/***/ }),

/***/ 43:
/***/ 841:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {


Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.default = void 0;
var dep_dep_js_1 = __nccwpck_require__(119);
Object.defineProperty(exports, "default", ({ enumerable: true, get: function () { return dep_dep_js_1.default; } }));
Object.defineProperty(exports, "default", ({
enumerable: true,
get: ()=>_depDepJs.default
}));
const _depDepJs = __nccwpck_require__(124);


/***/ })
Expand Down Expand Up @@ -65,11 +69,9 @@ Object.defineProperty(exports, "default", ({ enumerable: true, get: function ()
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
var exports = __webpack_exports__;

Object.defineProperty(exports, "__esModule", ({ value: true }));
const dep_js_1 = __nccwpck_require__(43);
console.log(dep_js_1.default);
const _depJs = __nccwpck_require__(841);
console.log(_depJs.default);

})();

Expand Down
85 changes: 63 additions & 22 deletions test/unit/ts-exts/output.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,79 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __nccwpck_require__ = {};
/******/
/******/ var __webpack_modules__ = ({

/***/ 165:
/***/ ((__unused_webpack_module, exports) => {


Object.defineProperty(exports, "default", ({
enumerable: true,
get: ()=>_default
}));
const _default = {};


/***/ }),

/***/ 344:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {


Object.defineProperty(exports, "default", ({
enumerable: true,
get: ()=>_depDepJs.default
}));
const _depDepJs = __nccwpck_require__(165);


/***/ })

/******/ });
/************************************************************************/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __nccwpck_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __nccwpck_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/ })();
/******/
/******/ // Execute the module function
/******/ var threw = true;
/******/ try {
/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
/******/ threw = false;
/******/ } finally {
/******/ if(threw) delete __webpack_module_cache__[moduleId];
/******/ }
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat */
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
/******/
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__nccwpck_require__.r(__webpack_exports__);

;// CONCATENATED MODULE: ./test/unit/ts-exts/dep-dep.ts
/* harmony default export */ const dep_dep = ({});

;// CONCATENATED MODULE: ./test/unit/ts-exts/dep.ts

// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {

;// CONCATENATED MODULE: ./test/unit/ts-exts/input.ts
const _depJs = __nccwpck_require__(344);
console.log(_depJs.default);

console.log(dep_dep);
})();

module.exports = __webpack_exports__;
/******/ })()
Expand Down
12 changes: 8 additions & 4 deletions test/unit/ts-mixed-modules/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
/******/ "use strict";
/******/ var __webpack_modules__ = ({

/***/ 866:
/***/ 976:
/***/ ((module, exports) => {


Object.defineProperty(exports, "__esModule", ({ value: true }));
Object.defineProperty(exports, "__esModule", ({
value: true
}));
const config = {
routes: ['/foo']
routes: [
'/foo'
]
};
module.exports = config;

Expand Down Expand Up @@ -57,7 +61,7 @@ module.exports = config;
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __nccwpck_require__(866);
/******/ var __webpack_exports__ = __nccwpck_require__(976);
/******/ module.exports = __webpack_exports__;
/******/
/******/ })()
Expand Down
Loading

0 comments on commit a1be9eb

Please sign in to comment.