Skip to content

Commit

Permalink
test: update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
j4k0xb committed Jan 15, 2024
1 parent 4a28006 commit 3140dd0
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 75 deletions.
34 changes: 17 additions & 17 deletions packages/webcrack/src/unpack/test/samples/webpack-0.11.x.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import * as template from "./4.js";
document.write(template({
hello: "World!"
}));,
"exports": Set {},
"externalModule": undefined,
"id": "0",
"imports": Set {
"dependencies": Set {
"1",
"4",
},
"exports": Set {},
"externalModule": undefined,
"id": "0",
"isEntry": true,
"path": "index.js",
},
Expand All @@ -26,13 +26,13 @@ if (false) {
module.hot.accept();
module.hot.dispose(dispose);
},
"exports": Set {},
"externalModule": undefined,
"id": "1",
"imports": Set {
"dependencies": Set {
"2",
"3",
},
"exports": Set {},
"externalModule": undefined,
"id": "1",
"isEntry": false,
"path": "1.js",
},
Expand All @@ -55,19 +55,19 @@ module.exports = function (cssCode) {
head.removeChild(styleElement);
};
};,
"dependencies": Set {},
"exports": Set {},
"externalModule": undefined,
"id": "2",
"imports": Set {},
"isEntry": false,
"path": "2.js",
},
"3" => WebpackModule {
"ast": module.exports = "body {\n\tbackground: #333;\n\tcolor: #EEE;\n}";,
"dependencies": Set {},
"exports": Set {},
"externalModule": undefined,
"id": "3",
"imports": Set {},
"isEntry": false,
"path": "3.js",
},
Expand All @@ -85,12 +85,12 @@ module.exports = function anonymous(locals, attrs, escape, rethrow, merge) {
}
return buf.join("");
};,
"dependencies": Set {
"5",
},
"exports": Set {},
"externalModule": undefined,
"id": "4",
"imports": Set {
"5",
},
"isEntry": false,
"path": "4.js",
},
Expand Down Expand Up @@ -258,12 +258,12 @@ exports.rethrow = function rethrow(err, filename, lineno) {
err.message = (filename || "Jade") + ":" + lineno + "\n" + context + "\n\n" + err.message;
throw err;
};,
"dependencies": Set {
"6",
},
"exports": Set {},
"externalModule": undefined,
"id": "5",
"imports": Set {
"6",
},
"isEntry": false,
"path": "5.js",
},
Expand All @@ -275,10 +275,10 @@ exports.setFile = function (filename, content) {
exports.readFileSync = function (filename) {
return files[filename] || "";
};,
"dependencies": Set {},
"exports": Set {},
"externalModule": undefined,
"id": "6",
"imports": Set {},
"isEntry": false,
"path": "6.js",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ WebpackBundle {
"0" => WebpackModule {
"ast": import * as path from "path";
console.log(path);,
"dependencies": Set {
"1",
},
"exports": Set {},
"externalModule": undefined,
"id": "0",
"imports": Set {
"1",
},
"isEntry": false,
"path": "0.js",
},
"1" => WebpackModule {
"ast": module.exports = require("path");,
"dependencies": Set {},
"exports": Set {},
"externalModule": "path",
"id": "1",
"imports": Set {},
"isEntry": false,
"path": "1.js",
},
Expand All @@ -33,21 +33,21 @@ console.log(path);,
"0" => WebpackModule {
"ast": import * as path from "path";
console.log(path);,
"dependencies": Set {
"1",
},
"exports": Set {},
"externalModule": undefined,
"id": "0",
"imports": Set {
"1",
},
"isEntry": false,
"path": "0.js",
},
"1" => WebpackModule {
"ast": module.exports = require("path");,
"dependencies": Set {},
"exports": Set {},
"externalModule": "path",
"id": "1",
"imports": Set {},
"isEntry": false,
"path": "1.js",
},
Expand Down
16 changes: 8 additions & 8 deletions packages/webcrack/src/unpack/test/samples/webpack-4-json.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ WebpackBundle {
"0" => WebpackModule {
"ast": import * as json from "./1.json";
console.log(json);,
"dependencies": Set {
"1",
},
"exports": Set {},
"externalModule": undefined,
"id": "0",
"imports": Set {
"1",
},
"isEntry": false,
"path": "0.js",
},
"1" => WebpackModule {
"ast": module.exports = {
foo: "bar"
};,
"dependencies": Set {},
"exports": Set {},
"externalModule": undefined,
"id": "1",
"imports": Set {},
"isEntry": false,
"path": "1.json",
},
Expand All @@ -35,23 +35,23 @@ console.log(json);,
"0" => WebpackModule {
"ast": import * as json from "./1.json";
console.log(json);,
"dependencies": Set {
"1",
},
"exports": Set {},
"externalModule": undefined,
"id": "0",
"imports": Set {
"1",
},
"isEntry": false,
"path": "0.js",
},
"1" => WebpackModule {
"ast": module.exports = {
foo: "bar"
};,
"dependencies": Set {},
"exports": Set {},
"externalModule": undefined,
"id": "1",
"imports": Set {},
"isEntry": false,
"path": "1.json",
},
Expand Down
14 changes: 7 additions & 7 deletions packages/webcrack/src/unpack/test/samples/webpack-4.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ WebpackBundle {
"modules": Map {
"1" => WebpackModule {
"ast": import "./3.js";,
"dependencies": Set {
"3",
},
"exports": Set {},
"externalModule": undefined,
"id": "1",
"imports": Set {
"3",
},
"isEntry": false,
"path": "1.js",
},
Expand All @@ -23,21 +23,21 @@ module.exports.color = "#FBC02D";
console.log(module);
}
exports.a = 3;,
"dependencies": Set {
"1",
},
"exports": Set {},
"externalModule": undefined,
"id": "2",
"imports": Set {
"1",
},
"isEntry": true,
"path": "index.js",
},
"3" => WebpackModule {
"ast": module.exports = 4;,
"dependencies": Set {},
"exports": Set {},
"externalModule": undefined,
"id": "3",
"imports": Set {},
"isEntry": false,
"path": "3.js",
},
Expand Down
16 changes: 8 additions & 8 deletions packages/webcrack/src/unpack/test/samples/webpack-5-json.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ WebpackBundle {
"0" => WebpackModule {
"ast": import * as json from "./1.json";
console.log(json);,
"dependencies": Set {
"1",
},
"exports": Set {},
"externalModule": undefined,
"id": "0",
"imports": Set {
"1",
},
"isEntry": false,
"path": "0.js",
},
"1" => WebpackModule {
"ast": module.exports = {
foo: "bar"
};,
"dependencies": Set {},
"exports": Set {},
"externalModule": undefined,
"id": "1",
"imports": Set {},
"isEntry": false,
"path": "1.json",
},
Expand All @@ -35,23 +35,23 @@ console.log(json);,
"0" => WebpackModule {
"ast": import * as json from "./1.json";
console.log(json);,
"dependencies": Set {
"1",
},
"exports": Set {},
"externalModule": undefined,
"id": "0",
"imports": Set {
"1",
},
"isEntry": false,
"path": "0.js",
},
"1" => WebpackModule {
"ast": module.exports = {
foo: "bar"
};,
"dependencies": Set {},
"exports": Set {},
"externalModule": undefined,
"id": "1",
"imports": Set {},
"isEntry": false,
"path": "1.json",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ WebpackBundle {
"modules": Map {
"97418" => WebpackModule {
"ast": module.exports = "foo";,
"dependencies": Set {},
"exports": Set {},
"externalModule": undefined,
"id": "97418",
"imports": Set {},
"isEntry": false,
"path": "97418.js",
},
Expand Down
14 changes: 7 additions & 7 deletions packages/webcrack/src/unpack/test/samples/webpack-5.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ WebpackBundle {
"2" => WebpackModule {
"ast": import * as lib from "./3.js";
console.log(lib);,
"dependencies": Set {
"3",
},
"exports": Set {},
"externalModule": undefined,
"id": "2",
"imports": Set {
"3",
},
"isEntry": true,
"path": "index.js",
},
Expand All @@ -19,15 +19,15 @@ console.log(lib);,
const obj = {
version: "2.0.0"
};,
"dependencies": Set {
"4",
},
"exports": Set {
"default",
"version",
},
"externalModule": undefined,
"id": "3",
"imports": Set {
"4",
},
"isEntry": false,
"path": "3.js",
},
Expand All @@ -41,13 +41,13 @@ Object.defineProperty(obj, "Console", {
get: () => bar
});
function bar() {},
"dependencies": Set {},
"exports": Set {
"foo",
"obj",
},
"externalModule": undefined,
"id": "4",
"imports": Set {},
"isEntry": false,
"path": "4.js",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ WebpackBundle {
"modules": Map {
"0" => WebpackModule {
"ast": ,
"dependencies": Set {},
"exports": Set {},
"externalModule": undefined,
"id": "0",
"imports": Set {},
"isEntry": false,
"path": "0.js",
},
Expand All @@ -22,10 +22,10 @@ WebpackBundle {
"modules": Map {
"0" => WebpackModule {
"ast": ,
"dependencies": Set {},
"exports": Set {},
"externalModule": undefined,
"id": "0",
"imports": Set {},
"isEntry": false,
"path": "0.js",
},
Expand Down
Loading

0 comments on commit 3140dd0

Please sign in to comment.