feat: use relative paths for virtual module ids #40
Annotations
10 errors and 1 warning
tests/cases/circular.test.ts#L71
AssertionError: the given combination of arguments (undefined and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string
❯ tests/cases/circular.test.ts:71:5
|
tests/cases/circular.test.ts#L240
AssertionError: the given combination of arguments (undefined and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string
❯ tests/cases/circular.test.ts:240:9
|
tests/cases/deep.test.ts#L40
Error: Snapshot `digs into all dependencies (inline) 1` mismatched
- Expected
+ Received
@@ -1,104 +1,83 @@
{
- "[intermediate] tailwindcss.global.layer0.css?inline": "export default ".test-b-1 {\n --test-b: 1px\n}\n.test-b-2 {\n --test-b: 2px\n}\n.test-b-3 {\n --test-b: 3px\n}\n/* TailwindCSS Base */\n/* TailwindCSS Base Backdrop */\n"",
- "[intermediate] tailwindcss:test/a.js::module.layer2.css?inline": "export default ".test-u-2 {\n --test-u: 2px\n}\n"",
- "[intermediate] tailwindcss:test/a.js::module.layer2.js": "import m0 from "\u0000tailwindcss:\u0000test/b.js::module.layer2.js";
- import s from "\u0000tailwindcss:\u0000test/a.js::module.layer2.css?inline";
- export default m0 + s;
- ",
- "[intermediate] tailwindcss:test/b.js::module.layer2.css?inline": "export default ".test-u-3 {\n --test-u: 3px\n}\n"",
- "[intermediate] tailwindcss:test/b.js::module.layer2.js": "import s from "\u0000tailwindcss:\u0000test/b.js::module.layer2.css?inline";
- export default s;
+ "[output] _virtual/a.js": "import "./b.js";
+ const a = "test-u-2 test-c-2 test-b-2";
+ export {
+ a as default
+ };
",
- "[intermediate] tailwindcss:test/entry.js::hoisted.layer1.css?inline": "export default ".test-c-1 {\n --test-c: 1px\n}\n.test-c-2 {\n --test-c: 2px\n}\n.test-c-3 {\n --test-c: 3px\n}\n"",
- "[intermediate] tailwindcss:test/entry.js::index.inline.js": "import l0g from "\u0000tailwindcss.global.layer0.css?inline";
- import l1h from "\u0000tailwindcss:\u0000test/entry.js::hoisted.layer1.css?inline";
- import l2m from "\u0000tailwindcss:\u0000test/entry.js::module.layer2.js";
- export default l0g + l1h + l2m;
+ "[output] _virtual/b.js": "console.log("test-u-3 test-c-3 test-b-3");
",
- "[intermediate] tailwindcss:test/entry.js::module.layer2.css?inline": "export default ".test-u-1 {\n --test-u: 1px\n}\n"",
- "[intermediate] tailwindcss:test/entry.js::module.layer2.js": "import m0 from "\u0000tailwindcss:\u0000test/a.js::module.layer2.js";
- import s from "\u0000tailwindcss:\u0000test/entry.js::module.layer2.css?inline";
- export default m0 + s;
+ "[output] _virtual/entry.js": "import css from "./top.dl.js";
+ import a from "./a.js";
+ const X = "test-u-1 test-c-1 test-b-1";
+ console.log(X, a, css);
",
- "[output] _virtual/_tailwindcss.global.layer0.css.js": "const l0g = ".test-b-1 {\n --test-b: 1px\n}\n.test-b-2 {\n --test-b: 2px\n}\n.test-b-3 {\n --test-b: 3px\n}\n/* TailwindCSS Base */\n/* TailwindCSS Base Backdrop */\n";
+ "[output] _virtual/global.layer0.l.css.js": "const l0g = ".test-b-1 {\n --test-b: 1px\n}\n.test-b-2 {\n --test-b: 2px\n}\n.test-b-3 {\n --test-b: 3px\n}\n/* TailwindCSS Base */\n/* TailwindCSS Base Backdrop */\n";
export {
l0g as default
};
",
- "[output] _virtual/a.js": "import "./b.js";
- const a = "test-u-2 test-c-2 test-b-2";
+ "[output] _virtual/hoisted.layer1.dl.css.js": "const l1h = ".test-c-1 {\n --test-c: 1px\n}\n.test-c-2 {\n --test-c: 2px\n}\n.test-c-3 {\n --test-c: 3px\n}\n";
export {
- a as default
+ l1h as default
};
",
- "[output] _virtual/a.js__module.layer2.css.js": "const s = ".test-u-2 {\n --test-u: 2px\n}\n";
+ "[output] _virtual/module.layer2.dl.js": "import m0 from "./module.layer2.dl2.js";
+ import s from "./module.layer2.l.css.js";
+ const l2m = m0 + s;
export {
- s as default
+ l2m as default
};
",
- "[output] _virtual/a.js__module.layer2.js": "import s from "./b.js__module.layer2.css.js";
- import s$1 from "./a.js__module.layer2.css.js";
+ "[output] _virtual/module.layer2.dl2.js": "import s from "./module.layer2.l.css2.js";
+ import s$1 from "./module.layer2.l.css3.js";
const m0 = s + s$1;
export {
m0 as default
};
- ",
- "[output] _virtual/b.js": "console.log("test-u-3 test-c-3 test-b-3");
",
- "[output] _virtual/b.js__module.layer2.css.js": "const s = ".test-u-3 {\n --test-u: 3px\n}\n";
+ "[output] _virtual/module.layer2.dl3.js": "import s from "./module.layer2.l.css2.js";
export {
s as default
};
",
- "[output] _virtual/b.
|
tests/cases/deep.test.ts#L188
Error: Snapshot `digs into all dependencies (inject) 1` mismatched
- Expected
+ Received
@@ -1,24 +1,24 @@
{
- "[intermediate] tailwindcss.global.layer0.css": "",
- "[intermediate] tailwindcss:test/a.js::module.layer2.css": "",
- "[intermediate] tailwindcss:test/a.js::module.layer2.inject.js": "import "\u0000tailwindcss:\u0000test/b.js::module.layer2.inject.js";
- import "\u0000tailwindcss:\u0000test/a.js::module.layer2.css";
+ "[output] _virtual/a.js": "import "./b.js";
+ const a = "test-u-2 test-c-2 test-b-2";
+ export {
+ a as default
+ };
",
- "[intermediate] tailwindcss:test/b.js::module.layer2.css": "",
- "[intermediate] tailwindcss:test/b.js::module.layer2.inject.js": "import "\u0000tailwindcss:\u0000test/b.js::module.layer2.css";
+ "[output] _virtual/b.js": "console.log("test-u-3 test-c-3 test-b-3");
",
- "[intermediate] tailwindcss:test/entry.js::hoisted.layer1.css": "",
- "[intermediate] tailwindcss:test/entry.js::index.inject.js": "import "\u0000tailwindcss.global.layer0.css";
- import "\u0000tailwindcss:\u0000test/entry.js::hoisted.layer1.css";
- import "\u0000tailwindcss:\u0000test/entry.js::module.layer2.inject.js";
- ",
- "[intermediate] tailwindcss:test/entry.js::module.layer2.css": "",
- "[intermediate] tailwindcss:test/entry.js::module.layer2.inject.js": "import "\u0000tailwindcss:\u0000test/a.js::module.layer2.inject.js";
- import "\u0000tailwindcss:\u0000test/entry.js::module.layer2.css";
+ "[output] _virtual/entry.js": "/* empty css */
+ /* empty css */
+ /* empty css */
+ /* empty css */
+ /* empty css */
+ import a from "./a.js";
+ const X = "test-u-1 test-c-1 test-b-1 test-b-9";
+ console.log(X, a, css);
",
- "[output] _virtual/_tailwindcss.global.layer0.css": ".test-b-1 {
+ "[output] _virtual/global.layer0.j.css": ".test-b-1 {
--test-b: 1px
}
.test-b-2 {
--test-b: 2px
}
@@ -29,61 +29,44 @@
--test-b: 9px
}
/* TailwindCSS Base */
/* TailwindCSS Base Backdrop */
",
- "[output] _virtual/a.js": "import "./b.js";
- const a = "test-u-2 test-c-2 test-b-2";
- export {
- a as default
- };
- ",
- "[output] _virtual/a.js__module.layer2.css": ".test-u-2 {
- --test-u: 2px
- }
- ",
- "[output] _virtual/b.js": "console.log("test-u-3 test-c-3 test-b-3");
- ",
- "[output] _virtual/b.js__module.layer2.css": ".test-u-3 {
- --test-u: 3px
- }
- ",
- "[output] _virtual/entry.js": "/* empty css */
- /* empty css */
- /* empty css */
- /* empty css */
- /* empty css */
- import a from "./a.js";
- const X = "test-u-1 test-c-1 test-b-1 test-b-9";
- console.log(X, a, css);
- ",
- "[output] _virtual/entry.js__hoisted.layer1.css": ".test-c-1 {
+ "[output] _virtual/hoisted.layer1.dj.css": ".test-c-1 {
--test-c: 1px
}
.test-c-2 {
--test-c: 2px
}
.test-c-3 {
--test-c: 3px
}
",
- "[output] _virtual/entry.js__module.layer2.css": ".test-u-1 {
+ "[output] _virtual/module.layer2.j.css": ".test-u-1 {
--test-u: 1px
}
",
+ "[output] _virtual/module.layer2.j2.css": ".test-u-2 {
+ --test-u: 2px
+ }
+ ",
+ "[output] _virtual/module.layer2.j3.css": ".test-u-3 {
+ --test-u: 3px
+ }
+ ",
"[output] tests/entry.html": "<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Test Entry File</title> <script type="module" crossorigin src="/_virtual/b.js"></script>
<script type="module" crossorigin src="/_virtual/a.js"></script>
<script type="module" crossorigin src="/_virtual/entry.js"></script>
- <link rel="stylesheet" crossorigin href="/_virtual/_tailwindcss.global.layer0.css">
- <link rel="stylesheet" crossorigin href="/_virtual/entry.js__hoisted.layer1.css">
- <link rel="stylesheet" crossorigin href="/_virtual/b.js__module.layer2.css">
- <link rel="stylesheet" crossorigin href="/_virtual/a.js__module.layer2.css">
-
|
tests/cases/global-fs.test.ts#L27
Error: Snapshot `supports filesystem content 1` mismatched
- Expected
+ Received
@@ -1,10 +1,9 @@
{
- "[intermediate] tailwindcss.global.layer0.css": "",
- "[intermediate] tailwindcss:test/entry.js::index.inject.js": "import "\u0000tailwindcss.global.layer0.css";
+ "[output] _virtual/entry.js": "/* empty css */
",
- "[output] _virtual/_tailwindcss.global.layer0.css": ".test-b-2 {
+ "[output] _virtual/global.layer0.j.css": ".test-b-2 {
--test-b: 2px
}
.test-b-3 {
--test-b: 3px
}
@@ -12,18 +11,16 @@
--test-b: 4px
}
/* TailwindCSS Base */
/* TailwindCSS Base Backdrop */
",
- "[output] _virtual/entry.js": "/* empty css */
- ",
"[output] tests/entry.html": "<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Test Entry File</title> <script type="module" crossorigin src="/_virtual/entry.js"></script>
- <link rel="stylesheet" crossorigin href="/_virtual/_tailwindcss.global.layer0.css">
+ <link rel="stylesheet" crossorigin href="/_virtual/global.layer0.j.css">
</head>
<body>
Only for testing purposes.
</body>
</html>
❯ tests/cases/global-fs.test.ts:27:17
|
tests/cases/global.test.ts#L33
AssertionError: the given combination of arguments (undefined and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string
❯ tests/cases/global.test.ts:33:16
|
tests/cases/global.test.ts#L192
Error: Snapshot `creates css for loaded modules without entry js 1` mismatched
- Expected
+ Received
@@ -1,37 +1,28 @@
{
- "[intermediate] tailwindcss.global.layer0.css": "",
- "[intermediate] tailwindcss:<projectRoot>/tests/entry.html::hoisted.layer1.css": "",
- "[intermediate] tailwindcss:<projectRoot>/tests/entry.html::index.inject.js": "import "\u0000tailwindcss.global.layer0.css";
- import "\u0000tailwindcss:<projectRoot>/tests/entry.html::hoisted.layer1.css";
- import "\u0000tailwindcss:<projectRoot>/tests/entry.html::module.layer2.inject.js";
- ",
- "[intermediate] tailwindcss:<projectRoot>/tests/entry.html::module.layer2.css": "",
- "[intermediate] tailwindcss:<projectRoot>/tests/entry.html::module.layer2.inject.js": "import "\u0000tailwindcss:<projectRoot>/tests/entry.html::module.layer2.css";
- ",
- "[output] _virtual/_tailwindcss.global.layer0.css": ".test-b-5 {
+ "[output] _virtual/global.layer0.j.css": ".test-b-5 {
--test-b: 5px
}
/* TailwindCSS Base */
/* TailwindCSS Base Backdrop */
",
- "[output] _virtual/entry.html__hoisted.layer1.css.js": "
+ "[output] _virtual/hoisted.layer1.dj.css.js": "
",
- "[output] _virtual/entry.html__index.inject.js": "/* empty css */
- import "./entry.html__hoisted.layer1.css.js";
- import "./entry.html__module.layer2.css.js";
+ "[output] _virtual/module.layer2.j.css.js": "
",
- "[output] _virtual/entry.html__module.layer2.css.js": "
+ "[output] _virtual/top.dj.js": "/* empty css */
+ import "./hoisted.layer1.dj.css.js";
+ import "./module.layer2.j.css.js";
",
"[output] tests/entry.html": "<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
- <title>Test Entry File</title> <script type="module" crossorigin src="/_virtual/entry.html__hoisted.layer1.css.js"></script>
- <script type="module" crossorigin src="/_virtual/entry.html__module.layer2.css.js"></script>
- <script type="module" crossorigin src="/_virtual/entry.html__index.inject.js"></script>
- <link rel="stylesheet" crossorigin href="/_virtual/_tailwindcss.global.layer0.css">
+ <title>Test Entry File</title> <script type="module" crossorigin src="/_virtual/hoisted.layer1.dj.css.js"></script>
+ <script type="module" crossorigin src="/_virtual/module.layer2.j.css.js"></script>
+ <script type="module" crossorigin src="/_virtual/top.dj.js"></script>
+ <link rel="stylesheet" crossorigin href="/_virtual/global.layer0.j.css">
</head>
<body>
Only for testing purposes.
<div class="test-b-5"></div></body>
</html>
❯ tests/cases/global.test.ts:192:17
|
tests/cases/global.test.ts#L272
AssertionError: the given combination of arguments (undefined and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string
❯ tests/cases/global.test.ts:272:16
|
tests/cases/hoisted.test.ts#L31
AssertionError: the given combination of arguments (undefined and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string
❯ tests/cases/hoisted.test.ts:31:5
|
tests/cases/html.test.ts#L31
Error: Snapshot `generates css which only contains rules for HTML except global layer 1` mismatched
- Expected
+ Received
@@ -1,92 +1,72 @@
{
- "[intermediate] tailwindcss.global.layer0.css": "",
- "[intermediate] tailwindcss.global.layer0.css?inline": "export default ".test-b-1 {\n --test-b: 1px\n}\n.test-b-9 {\n --test-b: 9px\n}\n/* TailwindCSS Base */\n/* TailwindCSS Base Backdrop */\n"",
- "[intermediate] tailwindcss:<projectRoot>/tests/entry.html::hoisted.layer1.shallow.css": "",
- "[intermediate] tailwindcss:<projectRoot>/tests/entry.html::index.shallow.inject.js": "import "\u0000tailwindcss.global.layer0.css";
- import "\u0000tailwindcss:<projectRoot>/tests/entry.html::hoisted.layer1.shallow.css";
- import "\u0000tailwindcss:<projectRoot>/tests/entry.html::module.layer2.shallow.inject.js";
- ",
- "[intermediate] tailwindcss:<projectRoot>/tests/entry.html::module.layer2.css": "",
- "[intermediate] tailwindcss:<projectRoot>/tests/entry.html::module.layer2.shallow.inject.js": "import "\u0000tailwindcss:<projectRoot>/tests/entry.html::module.layer2.css";
- ",
- "[intermediate] tailwindcss:test/entry.js::hoisted.layer1.css?inline": "export default ".test-c-9 {\n --test-c: 9px\n}\n"",
- "[intermediate] tailwindcss:test/entry.js::index.inline.js": "import l0g from "\u0000tailwindcss.global.layer0.css?inline";
- import l1h from "\u0000tailwindcss:\u0000test/entry.js::hoisted.layer1.css?inline";
- import l2m from "\u0000tailwindcss:\u0000test/entry.js::module.layer2.js";
- export default l0g + l1h + l2m;
+ "[output] _virtual/entry.js": "import css from "./top.dl.js";
+ const X = "test-u-9 test-c-9 test-b-9";
+ console.log(X, css);
",
- "[intermediate] tailwindcss:test/entry.js::module.layer2.css?inline": "export default ".test-u-9 {\n --test-u: 9px\n}\n"",
- "[intermediate] tailwindcss:test/entry.js::module.layer2.js": "import s from "\u0000tailwindcss:\u0000test/entry.js::module.layer2.css?inline";
- export default s;
- ",
- "[output] _virtual/_tailwindcss.global.layer0.css": ".test-b-1 {
+ "[output] _virtual/global.layer0.j.css": ".test-b-1 {
--test-b: 1px
}
.test-b-9 {
--test-b: 9px
}
/* TailwindCSS Base */
/* TailwindCSS Base Backdrop */
",
- "[output] _virtual/_tailwindcss.global.layer0.css2.js": "const l0g = ".test-b-1 {\n --test-b: 1px\n}\n.test-b-9 {\n --test-b: 9px\n}\n/* TailwindCSS Base */\n/* TailwindCSS Base Backdrop */\n";
+ "[output] _virtual/global.layer0.l.css.js": "const l0g = ".test-b-1 {\n --test-b: 1px\n}\n.test-b-9 {\n --test-b: 9px\n}\n/* TailwindCSS Base */\n/* TailwindCSS Base Backdrop */\n";
export {
l0g as default
};
",
- "[output] _virtual/entry.html__hoisted.layer1.shallow.css": ".test-c-1 {
+ "[output] _virtual/hoisted.layer1.dl.css.js": "const l1h = ".test-c-9 {\n --test-c: 9px\n}\n";
+ export {
+ l1h as default
+ };
+ ",
+ "[output] _virtual/hoisted.layer1.sj.css": ".test-c-1 {
--test-c: 1px
}
",
- "[output] _virtual/entry.html__index.shallow.inject.js": "/* empty css */
- /* empty css */
- /* empty css */
+ "[output] _virtual/module.layer2.dl.js": "import s from "./module.layer2.l.css.js";
+ export {
+ s as default
+ };
",
- "[output] _virtual/entry.html__module.layer2.css": ".test-u-1 {
+ "[output] _virtual/module.layer2.j.css": ".test-u-1 {
--test-u: 1px
}
- ",
- "[output] _virtual/entry.js": "import css from "./entry.js__index.inline.js";
- const X = "test-u-9 test-c-9 test-b-9";
- console.log(X, css);
",
- "[output] _virtual/entry.js__hoisted.layer1.css.js": "const l1h = ".test-c-9 {\n --test-c: 9px\n}\n";
+ "[output] _virtual/module.layer2.l.css.js": "const s = ".test-u-9 {\n --test-u: 9px\n}\n";
export {
- l1h as default
+ s as default
};
",
- "[output] _virtual/entry.js__index.inline.js": "import l0g from "./_tailwindcss.global.layer0.css2.js";
- import l1h from "./entry.js__hoisted.layer1.css.js";
- import s from "./entry.js__mod
|
|
This job failed
Loading