@tinacms/scripts 0.0.0-e201abe-20260728041853 → 0.0.0-e24fc0e-20260824012452
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +25 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
// src/index.ts
|
|
7
7
|
import * as fs from "fs";
|
|
8
8
|
import { exec } from "child_process";
|
|
9
|
+
import { createRequire } from "module";
|
|
9
10
|
import path from "path";
|
|
10
11
|
import chalk from "chalk";
|
|
11
12
|
import chokidar from "chokidar";
|
|
@@ -303,6 +304,17 @@ See --help for a list of available commands.`
|
|
|
303
304
|
console.log("skipping @tinacms/app");
|
|
304
305
|
return;
|
|
305
306
|
}
|
|
307
|
+
if (["@tinacms/web-components"].includes(packageJSON.name)) {
|
|
308
|
+
await esbuild({
|
|
309
|
+
entryPoints: [path.join(process.cwd(), entry)],
|
|
310
|
+
bundle: true,
|
|
311
|
+
platform: "browser",
|
|
312
|
+
target: "esnext",
|
|
313
|
+
format: "esm",
|
|
314
|
+
outfile: path.join(process.cwd(), "dist", `${outInfo.outfile}.js`)
|
|
315
|
+
});
|
|
316
|
+
return true;
|
|
317
|
+
}
|
|
306
318
|
external.forEach((ext) => globals[ext] = "NOOP");
|
|
307
319
|
const isExternal = (id) => external.some((dep) => id === dep || id.startsWith(`${dep}/`));
|
|
308
320
|
if (target === "node") {
|
|
@@ -339,6 +351,15 @@ See --help for a list of available commands.`
|
|
|
339
351
|
});
|
|
340
352
|
} else if (["@tinacms/mdx"].includes(packageJSON.name)) {
|
|
341
353
|
const peerDeps2 = packageJSON.peerDependencies;
|
|
354
|
+
const acornManifest = createRequire(
|
|
355
|
+
path.join(process.cwd(), "package.json")
|
|
356
|
+
).resolve("acorn/package.json");
|
|
357
|
+
const alias = {
|
|
358
|
+
acorn: path.join(
|
|
359
|
+
path.dirname(acornManifest),
|
|
360
|
+
JSON.parse(fs.readFileSync(acornManifest, "utf8")).module
|
|
361
|
+
)
|
|
362
|
+
};
|
|
342
363
|
await esbuild({
|
|
343
364
|
entryPoints: [path.join(process.cwd(), entry)],
|
|
344
365
|
bundle: true,
|
|
@@ -346,7 +367,8 @@ See --help for a list of available commands.`
|
|
|
346
367
|
target: "esnext",
|
|
347
368
|
format: "esm",
|
|
348
369
|
outfile: path.join(process.cwd(), "dist", "index.js"),
|
|
349
|
-
external: Object.keys(__spreadValues({}, peerDeps2))
|
|
370
|
+
external: Object.keys(__spreadValues({}, peerDeps2)),
|
|
371
|
+
alias
|
|
350
372
|
});
|
|
351
373
|
await esbuild({
|
|
352
374
|
entryPoints: [path.join(process.cwd(), entry)],
|
|
@@ -358,7 +380,8 @@ See --help for a list of available commands.`
|
|
|
358
380
|
// Bundle dependencies, the remark ecosystem only publishes ES modules
|
|
359
381
|
// and includes "development" export maps which actually throw errors during
|
|
360
382
|
// development, which we don't want to expose our users to.
|
|
361
|
-
external: Object.keys(__spreadValues({}, peerDeps2))
|
|
383
|
+
external: Object.keys(__spreadValues({}, peerDeps2)),
|
|
384
|
+
alias
|
|
362
385
|
});
|
|
363
386
|
} else {
|
|
364
387
|
await esbuild({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/scripts",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-e24fc0e-20260824012452",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"chalk": "^5.4.1",
|
|
17
17
|
"chokidar": "^3.6.0",
|
|
18
18
|
"commander": "^7.2.0",
|
|
19
|
-
"esbuild": "^0.
|
|
19
|
+
"esbuild": "^0.28.1",
|
|
20
20
|
"fs-extra": "^11.3.0",
|
|
21
21
|
"json-diff": "^1.0.6",
|
|
22
22
|
"tsup": "^8.3.6",
|