diff --git a/packages/structured-clone/build.js b/packages/structured-clone/build.js index b6709d9b..9de2a35c 100644 --- a/packages/structured-clone/build.js +++ b/packages/structured-clone/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/structured-clone/package.json b/packages/structured-clone/package.json index 0d84597e..5e83cab5 100644 --- a/packages/structured-clone/package.json +++ b/packages/structured-clone/package.json @@ -12,14 +12,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/support-tables/build.js b/packages/support-tables/build.js index 64a3746b..242eb96d 100644 --- a/packages/support-tables/build.js +++ b/packages/support-tables/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-builder/build.js b/packages/unified-latex-builder/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-builder/build.js +++ b/packages/unified-latex-builder/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-builder/package.json b/packages/unified-latex-builder/package.json index 56d3207a..f9cb1edd 100644 --- a/packages/unified-latex-builder/package.json +++ b/packages/unified-latex-builder/package.json @@ -15,14 +15,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-cli/package.json b/packages/unified-latex-cli/package.json index 8f4a56a2..15a83553 100644 --- a/packages/unified-latex-cli/package.json +++ b/packages/unified-latex-cli/package.json @@ -41,14 +41,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-cli/tests/cli.test.ts b/packages/unified-latex-cli/tests/cli.test.ts index 61011117..71ac10d8 100644 --- a/packages/unified-latex-cli/tests/cli.test.ts +++ b/packages/unified-latex-cli/tests/cli.test.ts @@ -19,27 +19,35 @@ console.log = (...args) => { const exePath = path.resolve(__dirname, "../dist/unified-latex-cli.mjs"); const examplesPath = path.resolve(__dirname, "examples"); +async function execCLI(args: string[]) { + return await executeCommand(`node`, [ + // package.json points to typescript sources and it is replaced with the build output + // before publishing by scripts/make-package.mjs. In testing, we need to point to the + // build output explicitly by passing the conditions flag. + `-C`, + `prebuilt`, + exePath, + ...args, + ]); +} + describe( "unified-latex-cli", () => { - let stdout: string, stderr: string; it("executable exists", async () => { expect(fsLegacy.existsSync(exePath)).toBeTruthy(); }); it("can execute without error", async () => { - let { stdout, stderr } = await exec(`node ${exePath} -h`); + const stdout = await execCLI(["-h"]); expect(stdout).toBeTruthy(); }); it("can format document", async () => { - let { stdout, stderr } = await exec( - `node ${exePath} ${examplesPath}/needs-fixing.tex` - ); + const stdout = await execCLI([`${examplesPath}/needs-fixing.tex`]); expect(stdout).toMatchSnapshot(); }); it("can expand macro", async () => { { - let stdout = await executeCommand(`node`, [ - exePath, + const stdout = await execCLI([ `${examplesPath}/needs-expanding.tex`, `-e`, "\\newcommand{foo}[1]{FOO(#1)}", @@ -50,8 +58,7 @@ describe( } { // Make sure we don't lose spaces in math mode - let stdout = await executeCommand(`node`, [ - exePath, + const stdout = await execCLI([ `${examplesPath}/needs-expanding.tex`, `-e`, "\\newcommand{foo}[1]{$\\x #1$}", @@ -62,9 +69,10 @@ describe( } }); it("can expand macros defined in document", async () => { - let { stdout, stderr } = await exec( - `node ${exePath} ${examplesPath}/has-definition.tex --stats-json` - ); + const stdout = await execCLI([ + `${examplesPath}/has-definition.tex`, + `--stats-json`, + ]); const { newcommands } = JSON.parse(stdout) as { newcommands: { name: string }[]; }; @@ -72,23 +80,25 @@ describe( expect(newcommandNames).toEqual(["foo", "baz"]); { - let { stdout, stderr } = await exec( - `node ${exePath} ${examplesPath}/has-definition.tex --expand-document-macro foo --expand-document-macro baz` - ); + const stdout = await execCLI([ + `${examplesPath}/has-definition.tex`, + `--expand-document-macro`, + `foo`, + `--expand-document-macro`, + `baz`, + ]); expect(stdout).toMatchSnapshot(); } }); it("can override default macros", async () => { { - let stdout = await executeCommand(`node`, [ - exePath, + const stdout = await execCLI([ `${examplesPath}/has-existing-definition.tex`, ]); expect(stdout).toMatchSnapshot(); } { - let stdout = await executeCommand(`node`, [ - exePath, + const stdout = await execCLI([ `${examplesPath}/has-existing-definition.tex`, `-e`, "\\newcommand{mathbb}{\\mathbb}", @@ -96,8 +106,7 @@ describe( expect(stdout).toMatchSnapshot(); } { - let stdout = await executeCommand(`node`, [ - exePath, + const stdout = await execCLI([ `${examplesPath}/has-existing-definition.tex`, `-e`, "\\newcommand{mathbb}[2]{\\mathbb{#1}{#2}}", @@ -107,17 +116,19 @@ describe( }); it("can convert to html", async () => { { - let { stdout, stderr } = await exec( - `node ${exePath} ${examplesPath}/simple.tex --html` - ); + const stdout = await execCLI([ + `${examplesPath}/simple.tex`, + `--html`, + ]); expect(stdout).toMatchSnapshot(); } }); it("can convert to markdown", async () => { { - let { stdout, stderr } = await exec( - `node ${exePath} ${examplesPath}/simple.tex --markdown` - ); + const stdout = await execCLI([ + `${examplesPath}/simple.tex`, + `--markdown`, + ]); expect(stdout).toMatchSnapshot(); } }); @@ -131,7 +142,10 @@ describe( * Run commands with arguments using "cross-spawn", which correctly escapes arguments * so that end results are the same across different shells. */ -async function executeCommand(executablePath: string, args: string[]) { +function executeCommand( + executablePath: string, + args: string[] +): Promise { return new Promise((resolve, reject) => { const childProcess = spawn(executablePath, args, { stdio: "pipe" }); diff --git a/packages/unified-latex-ctan/build.js b/packages/unified-latex-ctan/build.js index 95892b67..2238ffd2 100644 --- a/packages/unified-latex-ctan/build.js +++ b/packages/unified-latex-ctan/build.js @@ -23,7 +23,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-ctan/package.json b/packages/unified-latex-ctan/package.json index c29296d1..85adff87 100644 --- a/packages/unified-latex-ctan/package.json +++ b/packages/unified-latex-ctan/package.json @@ -29,19 +29,19 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*/index": { - "_bundle": "./dist/*/index.ts", - "import": "./dist/*/index.js", + "prebuilt": "./dist/dist/*/index.js", + "import": "./dist/*/index.ts", "require": "./dist/*/index.cjs" }, "./*": { - "_bundle": "./*/index.ts", - "import": "./dist/*/index.js", + "prebuilt": "./dist/*/index.js", + "import": "./*/index.ts", "require": "./dist/*/index.cjs" } }, diff --git a/packages/unified-latex-lint/build.js b/packages/unified-latex-lint/build.js index ec823e72..2213cd1e 100644 --- a/packages/unified-latex-lint/build.js +++ b/packages/unified-latex-lint/build.js @@ -23,7 +23,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-lint/package.json b/packages/unified-latex-lint/package.json index e73ce2ee..f39bfe41 100644 --- a/packages/unified-latex-lint/package.json +++ b/packages/unified-latex-lint/package.json @@ -27,19 +27,19 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*/index": { - "_bundle": "./dist/*/index.ts", - "import": "./dist/*/index.js", + "prebuilt": "./dist/dist/*/index.js", + "import": "./dist/*/index.ts", "require": "./dist/*/index.cjs" }, "./*": { - "_bundle": "./*/index.ts", - "import": "./dist/*/index.js", + "prebuilt": "./dist/*/index.js", + "import": "./*/index.ts", "require": "./dist/*/index.cjs" } }, diff --git a/packages/unified-latex-prettier/build.js b/packages/unified-latex-prettier/build.js index ecaee053..dbe6486f 100644 --- a/packages/unified-latex-prettier/build.js +++ b/packages/unified-latex-prettier/build.js @@ -23,7 +23,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-prettier/package.json b/packages/unified-latex-prettier/package.json index a925cf77..93320789 100644 --- a/packages/unified-latex-prettier/package.json +++ b/packages/unified-latex-prettier/package.json @@ -24,14 +24,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-to-hast/build.js b/packages/unified-latex-to-hast/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-to-hast/build.js +++ b/packages/unified-latex-to-hast/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-to-hast/package.json b/packages/unified-latex-to-hast/package.json index 49460b92..01957006 100644 --- a/packages/unified-latex-to-hast/package.json +++ b/packages/unified-latex-to-hast/package.json @@ -40,14 +40,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-to-mdast/build.js b/packages/unified-latex-to-mdast/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-to-mdast/build.js +++ b/packages/unified-latex-to-mdast/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-to-mdast/package.json b/packages/unified-latex-to-mdast/package.json index c1f02e3c..b5835062 100644 --- a/packages/unified-latex-to-mdast/package.json +++ b/packages/unified-latex-to-mdast/package.json @@ -27,14 +27,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-types/package.json b/packages/unified-latex-types/package.json index c21833d8..d124fbe0 100644 --- a/packages/unified-latex-types/package.json +++ b/packages/unified-latex-types/package.json @@ -12,13 +12,11 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "default": "./dist/index.js" + "default": "./index.ts" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./dist/*.ts", - "default": "./dist/*.js" + "default": "./dist/*.ts" } }, "scripts": { diff --git a/packages/unified-latex-util-align/build.js b/packages/unified-latex-util-align/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-align/build.js +++ b/packages/unified-latex-util-align/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-align/package.json b/packages/unified-latex-util-align/package.json index ca4dc36c..438d7ec4 100644 --- a/packages/unified-latex-util-align/package.json +++ b/packages/unified-latex-util-align/package.json @@ -17,14 +17,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-argspec/build.js b/packages/unified-latex-util-argspec/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-argspec/build.js +++ b/packages/unified-latex-util-argspec/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-argspec/package.json b/packages/unified-latex-util-argspec/package.json index 35c9bfc8..515ba995 100644 --- a/packages/unified-latex-util-argspec/package.json +++ b/packages/unified-latex-util-argspec/package.json @@ -15,14 +15,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-arguments/build.js b/packages/unified-latex-util-arguments/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-arguments/build.js +++ b/packages/unified-latex-util-arguments/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-arguments/package.json b/packages/unified-latex-util-arguments/package.json index 4a2cf617..47eb02db 100644 --- a/packages/unified-latex-util-arguments/package.json +++ b/packages/unified-latex-util-arguments/package.json @@ -22,14 +22,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-catcode/build.js b/packages/unified-latex-util-catcode/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-catcode/build.js +++ b/packages/unified-latex-util-catcode/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-catcode/package.json b/packages/unified-latex-util-catcode/package.json index 6a9d018b..6d92417f 100644 --- a/packages/unified-latex-util-catcode/package.json +++ b/packages/unified-latex-util-catcode/package.json @@ -17,14 +17,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-comments/build.js b/packages/unified-latex-util-comments/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-comments/build.js +++ b/packages/unified-latex-util-comments/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-comments/package.json b/packages/unified-latex-util-comments/package.json index 704dcd5f..4dbb804b 100644 --- a/packages/unified-latex-util-comments/package.json +++ b/packages/unified-latex-util-comments/package.json @@ -17,14 +17,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-environments/build.js b/packages/unified-latex-util-environments/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-environments/build.js +++ b/packages/unified-latex-util-environments/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-environments/package.json b/packages/unified-latex-util-environments/package.json index 0c2f26dc..abd93065 100644 --- a/packages/unified-latex-util-environments/package.json +++ b/packages/unified-latex-util-environments/package.json @@ -21,14 +21,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-glue/build.js b/packages/unified-latex-util-glue/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-glue/build.js +++ b/packages/unified-latex-util-glue/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-glue/package.json b/packages/unified-latex-util-glue/package.json index 8cf98a79..28c28565 100644 --- a/packages/unified-latex-util-glue/package.json +++ b/packages/unified-latex-util-glue/package.json @@ -17,14 +17,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-html-like/build.js b/packages/unified-latex-util-html-like/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-html-like/build.js +++ b/packages/unified-latex-util-html-like/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-html-like/package.json b/packages/unified-latex-util-html-like/package.json index 65873eba..d1293dc9 100644 --- a/packages/unified-latex-util-html-like/package.json +++ b/packages/unified-latex-util-html-like/package.json @@ -18,14 +18,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-ligatures/build.js b/packages/unified-latex-util-ligatures/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-ligatures/build.js +++ b/packages/unified-latex-util-ligatures/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-ligatures/package.json b/packages/unified-latex-util-ligatures/package.json index 2d878710..e7fb470f 100644 --- a/packages/unified-latex-util-ligatures/package.json +++ b/packages/unified-latex-util-ligatures/package.json @@ -18,14 +18,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-macros/build.js b/packages/unified-latex-util-macros/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-macros/build.js +++ b/packages/unified-latex-util-macros/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-macros/package.json b/packages/unified-latex-util-macros/package.json index 0295dae4..25db84d2 100644 --- a/packages/unified-latex-util-macros/package.json +++ b/packages/unified-latex-util-macros/package.json @@ -21,14 +21,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-match/build.js b/packages/unified-latex-util-match/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-match/build.js +++ b/packages/unified-latex-util-match/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-match/package.json b/packages/unified-latex-util-match/package.json index 586d75f5..b348a015 100644 --- a/packages/unified-latex-util-match/package.json +++ b/packages/unified-latex-util-match/package.json @@ -16,14 +16,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-packages/build.js b/packages/unified-latex-util-packages/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-packages/build.js +++ b/packages/unified-latex-util-packages/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-packages/package.json b/packages/unified-latex-util-packages/package.json index d93d0ec9..674c17cf 100644 --- a/packages/unified-latex-util-packages/package.json +++ b/packages/unified-latex-util-packages/package.json @@ -19,14 +19,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-parse/build.js b/packages/unified-latex-util-parse/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-parse/build.js +++ b/packages/unified-latex-util-parse/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-parse/package.json b/packages/unified-latex-util-parse/package.json index 7298d640..799a1205 100644 --- a/packages/unified-latex-util-parse/package.json +++ b/packages/unified-latex-util-parse/package.json @@ -25,14 +25,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-pegjs/build.js b/packages/unified-latex-util-pegjs/build.js index ddb473b7..295f5cce 100644 --- a/packages/unified-latex-util-pegjs/build.js +++ b/packages/unified-latex-util-pegjs/build.js @@ -21,7 +21,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; target: "node14", plugins: [pegjsLoader()], external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-pgfkeys/build.js b/packages/unified-latex-util-pgfkeys/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-pgfkeys/build.js +++ b/packages/unified-latex-util-pgfkeys/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-pgfkeys/package.json b/packages/unified-latex-util-pgfkeys/package.json index 21ed57a9..a672e56b 100644 --- a/packages/unified-latex-util-pgfkeys/package.json +++ b/packages/unified-latex-util-pgfkeys/package.json @@ -18,14 +18,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-print-raw/build.js b/packages/unified-latex-util-print-raw/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-print-raw/build.js +++ b/packages/unified-latex-util-print-raw/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-print-raw/package.json b/packages/unified-latex-util-print-raw/package.json index 5938c2f4..7cbe9e84 100644 --- a/packages/unified-latex-util-print-raw/package.json +++ b/packages/unified-latex-util-print-raw/package.json @@ -15,14 +15,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-render-info/build.js b/packages/unified-latex-util-render-info/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-render-info/build.js +++ b/packages/unified-latex-util-render-info/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-render-info/package.json b/packages/unified-latex-util-render-info/package.json index d5e10139..2e525f31 100644 --- a/packages/unified-latex-util-render-info/package.json +++ b/packages/unified-latex-util-render-info/package.json @@ -16,14 +16,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-replace/build.js b/packages/unified-latex-util-replace/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-replace/build.js +++ b/packages/unified-latex-util-replace/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-replace/package.json b/packages/unified-latex-util-replace/package.json index 625c7f40..595a652a 100644 --- a/packages/unified-latex-util-replace/package.json +++ b/packages/unified-latex-util-replace/package.json @@ -20,14 +20,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-scan/build.js b/packages/unified-latex-util-scan/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-scan/build.js +++ b/packages/unified-latex-util-scan/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-scan/package.json b/packages/unified-latex-util-scan/package.json index 55b61000..7e098706 100644 --- a/packages/unified-latex-util-scan/package.json +++ b/packages/unified-latex-util-scan/package.json @@ -18,14 +18,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-split/build.js b/packages/unified-latex-util-split/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-split/build.js +++ b/packages/unified-latex-util-split/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-split/package.json b/packages/unified-latex-util-split/package.json index 59d76015..d5452245 100644 --- a/packages/unified-latex-util-split/package.json +++ b/packages/unified-latex-util-split/package.json @@ -16,14 +16,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-to-string/build.js b/packages/unified-latex-util-to-string/build.js index 3b83d536..94571744 100644 --- a/packages/unified-latex-util-to-string/build.js +++ b/packages/unified-latex-util-to-string/build.js @@ -22,7 +22,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-to-string/package.json b/packages/unified-latex-util-to-string/package.json index 6d9b8ada..2565c109 100644 --- a/packages/unified-latex-util-to-string/package.json +++ b/packages/unified-latex-util-to-string/package.json @@ -19,14 +19,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-trim/build.js b/packages/unified-latex-util-trim/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-trim/build.js +++ b/packages/unified-latex-util-trim/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-trim/package.json b/packages/unified-latex-util-trim/package.json index 68165988..51713996 100644 --- a/packages/unified-latex-util-trim/package.json +++ b/packages/unified-latex-util-trim/package.json @@ -19,14 +19,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex-util-visit/build.js b/packages/unified-latex-util-visit/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex-util-visit/build.js +++ b/packages/unified-latex-util-visit/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex-util-visit/package.json b/packages/unified-latex-util-visit/package.json index 85eeb276..3af8edde 100644 --- a/packages/unified-latex-util-visit/package.json +++ b/packages/unified-latex-util-visit/package.json @@ -16,14 +16,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/packages/unified-latex/build.js b/packages/unified-latex/build.js index b6709d9b..9de2a35c 100644 --- a/packages/unified-latex/build.js +++ b/packages/unified-latex/build.js @@ -19,7 +19,6 @@ import { isCjsPackage } from "../../scripts/esbuild-module-check.mjs"; format: "esm", target: "node14", external: [...explicitDeps], - conditions: ["_bundle"], }; // Build the ESM diff --git a/packages/unified-latex/package.json b/packages/unified-latex/package.json index c2465c87..3be93dfa 100644 --- a/packages/unified-latex/package.json +++ b/packages/unified-latex/package.json @@ -18,14 +18,14 @@ ], "exports": { ".": { - "_bundle": "./index.ts", - "import": "./dist/index.js", + "prebuilt": "./dist/index.js", + "import": "./index.ts", "require": "./dist/index.cjs" }, "./*js": "./dist/*js", "./*": { - "_bundle": "./*.ts", - "import": "./dist/*.js", + "prebuilt": "./dist/*.js", + "import": "./*.ts", "require": "./dist/*.cjs" } }, diff --git a/tsconfig.build.json b/tsconfig.build.json index 0d6c1110..6336a1f1 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -29,7 +29,6 @@ "declarationMap": true, "moduleResolution": "Bundler", "resolveJsonModule": true, - "customConditions": ["_bundle"], - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true } }