@tinacms/scripts 0.0.0-9b751ce-20251121051639 → 0.0.0-9becbb4-20260805000828
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/__mocks__/styleMock.js +1 -1
- package/bin/tina-build +3 -3
- package/dist/chunk-Q2LW34XU.js +33 -0
- package/dist/index.js +76 -128
- package/dist/jest-runner.js +5 -42
- package/package.json +13 -9
package/__mocks__/styleMock.js
CHANGED
package/bin/tina-build
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
__spreadValues,
|
|
32
|
+
__objRest
|
|
33
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,73 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __spreadValues = (a, b) => {
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
|
-
var __objRest = (source, exclude) => {
|
|
22
|
-
var target = {};
|
|
23
|
-
for (var prop in source)
|
|
24
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
-
target[prop] = source[prop];
|
|
26
|
-
if (source != null && __getOwnPropSymbols)
|
|
27
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
}
|
|
31
|
-
return target;
|
|
32
|
-
};
|
|
33
|
-
var __export = (target, all) => {
|
|
34
|
-
for (var name in all)
|
|
35
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
36
|
-
};
|
|
37
|
-
var __copyProps = (to, from, except, desc) => {
|
|
38
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
39
|
-
for (let key of __getOwnPropNames(from))
|
|
40
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
41
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
42
|
-
}
|
|
43
|
-
return to;
|
|
44
|
-
};
|
|
45
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
46
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
47
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
48
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
49
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
50
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
51
|
-
mod
|
|
52
|
-
));
|
|
53
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "./chunk-Q2LW34XU.js";
|
|
54
5
|
|
|
55
6
|
// src/index.ts
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
var import_commander = __toESM(require("commander"));
|
|
67
|
-
var import_esbuild = require("esbuild");
|
|
68
|
-
var import_fs_extra = require("fs-extra");
|
|
69
|
-
var import_json_diff = __toESM(require("json-diff"));
|
|
70
|
-
var import_vite = require("vite");
|
|
7
|
+
import * as fs from "fs";
|
|
8
|
+
import { exec } from "child_process";
|
|
9
|
+
import path from "path";
|
|
10
|
+
import chalk from "chalk";
|
|
11
|
+
import chokidar from "chokidar";
|
|
12
|
+
import commander from "commander";
|
|
13
|
+
import { build as esbuild } from "esbuild";
|
|
14
|
+
import fsExtra from "fs-extra";
|
|
15
|
+
import jsonDiff from "json-diff";
|
|
16
|
+
import { build } from "vite";
|
|
71
17
|
|
|
72
18
|
// src/utils.ts
|
|
73
19
|
function deepMerge(target, source) {
|
|
@@ -104,9 +50,10 @@ async function sequential(items, callback) {
|
|
|
104
50
|
}
|
|
105
51
|
|
|
106
52
|
// src/index.ts
|
|
53
|
+
var { outputFileSync } = fsExtra;
|
|
107
54
|
var BuildTina = class {
|
|
108
55
|
constructor(name) {
|
|
109
|
-
this.program = new
|
|
56
|
+
this.program = new commander.Command(name);
|
|
110
57
|
}
|
|
111
58
|
registerCommands(commands, noHelp = false) {
|
|
112
59
|
for (const command of commands) {
|
|
@@ -148,7 +95,7 @@ Examples:
|
|
|
148
95
|
let packageJson = null;
|
|
149
96
|
try {
|
|
150
97
|
const packageJsonContent = fs.readFileSync(
|
|
151
|
-
|
|
98
|
+
path.join(process.cwd(), "package.json")
|
|
152
99
|
);
|
|
153
100
|
packageJson = JSON.parse(packageJsonContent.toString());
|
|
154
101
|
} catch (err) {
|
|
@@ -162,7 +109,7 @@ Examples:
|
|
|
162
109
|
console.info(`Skipping ${packageJson.name}`);
|
|
163
110
|
return;
|
|
164
111
|
}
|
|
165
|
-
const successMessage = `${
|
|
112
|
+
const successMessage = `${chalk.blue(`${packageJson.name}`)} built in`;
|
|
166
113
|
console.time(successMessage);
|
|
167
114
|
const entries = ((_a = packageJson.buildConfig) == null ? void 0 : _a.entryPoints.map(
|
|
168
115
|
(ep) => {
|
|
@@ -185,7 +132,7 @@ Examples:
|
|
|
185
132
|
}
|
|
186
133
|
watch() {
|
|
187
134
|
try {
|
|
188
|
-
|
|
135
|
+
exec("pnpm list -r --json", (error, stdout) => {
|
|
189
136
|
if (error) {
|
|
190
137
|
throw error;
|
|
191
138
|
}
|
|
@@ -195,8 +142,8 @@ Examples:
|
|
|
195
142
|
const pkgPath = "packages";
|
|
196
143
|
if (pkg.path.includes(pkgPath)) watchPaths.push(pkg.path);
|
|
197
144
|
}
|
|
198
|
-
|
|
199
|
-
watchPaths.map((p) =>
|
|
145
|
+
chokidar.watch(
|
|
146
|
+
watchPaths.map((p) => path.join(p, "src", "**/*")),
|
|
200
147
|
{ ignored: ["**/spec/**/*", "node_modules"] }
|
|
201
148
|
).on("change", async (path2) => {
|
|
202
149
|
const changedPackagePath = watchPaths.find(
|
|
@@ -233,7 +180,7 @@ Examples:
|
|
|
233
180
|
process.exit(1);
|
|
234
181
|
}
|
|
235
182
|
try {
|
|
236
|
-
|
|
183
|
+
exec(
|
|
237
184
|
"pnpm exec tinacms dev --no-server",
|
|
238
185
|
{ cwd: process.cwd() },
|
|
239
186
|
(error, stdout, stderr) => {
|
|
@@ -266,13 +213,13 @@ Examples:
|
|
|
266
213
|
}
|
|
267
214
|
const _a = tinaLock.schema, { version } = _a, schema = __objRest(_a, ["version"]);
|
|
268
215
|
const _b = newTinaLock.schema, { version: newVersion } = _b, newSchema = __objRest(_b, ["version"]);
|
|
269
|
-
const schemaDiff =
|
|
216
|
+
const schemaDiff = jsonDiff.diffString(schema, newSchema);
|
|
270
217
|
if (schemaDiff) {
|
|
271
218
|
console.error("Unexpected change(s) to Tina schema \u274C");
|
|
272
219
|
console.error(schemaDiff);
|
|
273
220
|
throw new Error("Unexpected change(s) to Tina schema \u274C");
|
|
274
221
|
}
|
|
275
|
-
const graphqlDiff =
|
|
222
|
+
const graphqlDiff = jsonDiff.diffString(
|
|
276
223
|
tinaLock.graphql,
|
|
277
224
|
newTinaLock.graphql
|
|
278
225
|
);
|
|
@@ -333,10 +280,10 @@ See --help for a list of available commands.`
|
|
|
333
280
|
this.program.parse(args);
|
|
334
281
|
}
|
|
335
282
|
getOutputPaths(entry) {
|
|
336
|
-
const { dir, name } =
|
|
283
|
+
const { dir, name } = path.parse(entry);
|
|
337
284
|
const outdir = dir.replace("src", "dist");
|
|
338
285
|
const outfile = name;
|
|
339
|
-
const relativeOutfile =
|
|
286
|
+
const relativeOutfile = path.join(
|
|
340
287
|
outdir.split("/").map(() => "..").join("/"),
|
|
341
288
|
dir,
|
|
342
289
|
name
|
|
@@ -346,7 +293,7 @@ See --help for a list of available commands.`
|
|
|
346
293
|
async buildPackage(entryPoint, packageJSON) {
|
|
347
294
|
const entry = entryPoint.name;
|
|
348
295
|
const target = entryPoint.target;
|
|
349
|
-
const extension =
|
|
296
|
+
const extension = path.extname(entry);
|
|
350
297
|
const deps = packageJSON.dependencies;
|
|
351
298
|
const peerDeps = packageJSON.peerDependencies;
|
|
352
299
|
const external = Object.keys(__spreadValues(__spreadValues({}, deps), peerDeps));
|
|
@@ -356,15 +303,28 @@ See --help for a list of available commands.`
|
|
|
356
303
|
console.log("skipping @tinacms/app");
|
|
357
304
|
return;
|
|
358
305
|
}
|
|
306
|
+
if (["@tinacms/web-components"].includes(packageJSON.name)) {
|
|
307
|
+
await esbuild({
|
|
308
|
+
entryPoints: [path.join(process.cwd(), entry)],
|
|
309
|
+
bundle: true,
|
|
310
|
+
platform: "browser",
|
|
311
|
+
target: "esnext",
|
|
312
|
+
format: "esm",
|
|
313
|
+
outfile: path.join(process.cwd(), "dist", `${outInfo.outfile}.js`)
|
|
314
|
+
});
|
|
315
|
+
return true;
|
|
316
|
+
}
|
|
359
317
|
external.forEach((ext) => globals[ext] = "NOOP");
|
|
318
|
+
const isExternal = (id) => external.some((dep) => id === dep || id.startsWith(`${dep}/`));
|
|
360
319
|
if (target === "node") {
|
|
361
320
|
if (["@tinacms/graphql", "@tinacms/datalayer"].includes(packageJSON.name)) {
|
|
362
|
-
await (
|
|
363
|
-
entryPoints: [
|
|
321
|
+
await esbuild({
|
|
322
|
+
entryPoints: [path.join(process.cwd(), entry)],
|
|
364
323
|
bundle: true,
|
|
365
324
|
platform: "node",
|
|
366
|
-
target: "
|
|
367
|
-
|
|
325
|
+
target: "esnext",
|
|
326
|
+
format: "esm",
|
|
327
|
+
outfile: path.join(
|
|
368
328
|
process.cwd(),
|
|
369
329
|
"dist",
|
|
370
330
|
`${outInfo.outfile ? outInfo.outfile : "index"}.js`
|
|
@@ -375,66 +335,55 @@ See --help for a list of available commands.`
|
|
|
375
335
|
return !entryPoint2.bundle.includes(item);
|
|
376
336
|
})
|
|
377
337
|
});
|
|
378
|
-
await (
|
|
379
|
-
entryPoints: [
|
|
338
|
+
await esbuild({
|
|
339
|
+
entryPoints: [path.join(process.cwd(), entry)],
|
|
380
340
|
bundle: true,
|
|
381
341
|
platform: "node",
|
|
382
|
-
target: "
|
|
342
|
+
target: "esnext",
|
|
383
343
|
format: "esm",
|
|
384
|
-
outfile:
|
|
344
|
+
outfile: path.join(
|
|
385
345
|
process.cwd(),
|
|
386
346
|
"dist",
|
|
387
|
-
`${outInfo.outfile ? outInfo.outfile : "index"}.
|
|
347
|
+
`${outInfo.outfile ? outInfo.outfile : "index"}.js`
|
|
388
348
|
),
|
|
389
349
|
external
|
|
390
350
|
});
|
|
391
351
|
} else if (["@tinacms/mdx"].includes(packageJSON.name)) {
|
|
392
352
|
const peerDeps2 = packageJSON.peerDependencies;
|
|
393
|
-
await (
|
|
394
|
-
entryPoints: [
|
|
353
|
+
await esbuild({
|
|
354
|
+
entryPoints: [path.join(process.cwd(), entry)],
|
|
395
355
|
bundle: true,
|
|
396
356
|
platform: "node",
|
|
397
|
-
target: "
|
|
398
|
-
format: "cjs",
|
|
399
|
-
outfile: import_node_path.default.join(process.cwd(), "dist", "index.js"),
|
|
400
|
-
external: Object.keys(__spreadValues({}, peerDeps2))
|
|
401
|
-
});
|
|
402
|
-
await (0, import_esbuild.build)({
|
|
403
|
-
entryPoints: [import_node_path.default.join(process.cwd(), entry)],
|
|
404
|
-
bundle: true,
|
|
405
|
-
platform: "node",
|
|
406
|
-
target: "es2020",
|
|
357
|
+
target: "esnext",
|
|
407
358
|
format: "esm",
|
|
408
|
-
outfile:
|
|
409
|
-
// Bundle dependencies, the remark ecosystem only publishes ES modules
|
|
410
|
-
// and includes "development" export maps which actually throw errors during
|
|
411
|
-
// development, which we don't want to expose our users to.
|
|
359
|
+
outfile: path.join(process.cwd(), "dist", "index.js"),
|
|
412
360
|
external: Object.keys(__spreadValues({}, peerDeps2))
|
|
413
361
|
});
|
|
414
|
-
await (
|
|
415
|
-
entryPoints: [
|
|
362
|
+
await esbuild({
|
|
363
|
+
entryPoints: [path.join(process.cwd(), entry)],
|
|
416
364
|
bundle: true,
|
|
417
365
|
platform: "browser",
|
|
418
|
-
target: "
|
|
366
|
+
target: "esnext",
|
|
419
367
|
format: "esm",
|
|
420
|
-
outfile:
|
|
368
|
+
outfile: path.join(process.cwd(), "dist", "index.browser.js"),
|
|
421
369
|
// Bundle dependencies, the remark ecosystem only publishes ES modules
|
|
422
370
|
// and includes "development" export maps which actually throw errors during
|
|
423
371
|
// development, which we don't want to expose our users to.
|
|
424
372
|
external: Object.keys(__spreadValues({}, peerDeps2))
|
|
425
373
|
});
|
|
426
374
|
} else {
|
|
427
|
-
await (
|
|
428
|
-
entryPoints: [
|
|
375
|
+
await esbuild({
|
|
376
|
+
entryPoints: [path.join(process.cwd(), entry)],
|
|
429
377
|
bundle: true,
|
|
430
378
|
platform: "node",
|
|
431
|
-
target: "
|
|
432
|
-
|
|
379
|
+
target: "esnext",
|
|
380
|
+
format: "esm",
|
|
381
|
+
outfile: path.join(process.cwd(), "dist", `${outInfo.outfile}.js`),
|
|
433
382
|
external
|
|
434
383
|
});
|
|
435
384
|
}
|
|
436
385
|
fs.writeFileSync(
|
|
437
|
-
|
|
386
|
+
path.join(
|
|
438
387
|
process.cwd(),
|
|
439
388
|
"dist",
|
|
440
389
|
entry.replace("src/", "").replace(extension, ".d.ts")
|
|
@@ -446,22 +395,22 @@ See --help for a list of available commands.`
|
|
|
446
395
|
const defaultBuildConfig = {
|
|
447
396
|
resolve: {
|
|
448
397
|
alias: {
|
|
449
|
-
"@toolkit":
|
|
450
|
-
"@tinacms/toolkit":
|
|
398
|
+
"@toolkit": path.resolve(process.cwd(), "src/toolkit"),
|
|
399
|
+
"@tinacms/toolkit": path.resolve(
|
|
451
400
|
process.cwd(),
|
|
452
401
|
"src/toolkit/index.ts"
|
|
453
|
-
)
|
|
402
|
+
),
|
|
403
|
+
"@utils": path.resolve(process.cwd(), "src/utils")
|
|
454
404
|
}
|
|
455
405
|
},
|
|
456
406
|
build: {
|
|
457
407
|
minify: false,
|
|
458
408
|
assetsInlineLimit: 0,
|
|
459
409
|
lib: {
|
|
460
|
-
entry:
|
|
410
|
+
entry: path.resolve(process.cwd(), entry),
|
|
461
411
|
name: packageJSON.name,
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
}
|
|
412
|
+
formats: ["es"],
|
|
413
|
+
fileName: () => `${outInfo.outfile}.js`
|
|
465
414
|
},
|
|
466
415
|
outDir: outInfo.outdir,
|
|
467
416
|
emptyOutDir: false,
|
|
@@ -492,20 +441,19 @@ See --help for a list of available commands.`
|
|
|
492
441
|
output: {
|
|
493
442
|
globals
|
|
494
443
|
},
|
|
495
|
-
external
|
|
444
|
+
external: isExternal
|
|
496
445
|
}
|
|
497
446
|
}
|
|
498
447
|
};
|
|
499
448
|
const buildConfig = packageJSON.buildConfig ? deepMerge(defaultBuildConfig, packageJSON.buildConfig) : defaultBuildConfig;
|
|
500
|
-
await
|
|
501
|
-
|
|
502
|
-
|
|
449
|
+
await build(__spreadValues({}, buildConfig));
|
|
450
|
+
outputFileSync(
|
|
451
|
+
path.join(outInfo.outdir, `${outInfo.outfile}.d.ts`),
|
|
503
452
|
`export * from "${outInfo.relativeOutfile}"`
|
|
504
453
|
);
|
|
505
454
|
return true;
|
|
506
455
|
}
|
|
507
456
|
};
|
|
508
|
-
|
|
509
|
-
0 && (module.exports = {
|
|
457
|
+
export {
|
|
510
458
|
BuildTina
|
|
511
|
-
}
|
|
459
|
+
};
|
package/dist/jest-runner.js
CHANGED
|
@@ -1,55 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
import "./chunk-Q2LW34XU.js";
|
|
28
2
|
|
|
29
3
|
// src/jest-runner.ts
|
|
30
|
-
var jest_runner_exports = {};
|
|
31
|
-
__export(jest_runner_exports, {
|
|
32
|
-
default: () => jest_runner_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(jest_runner_exports);
|
|
35
|
-
var import_jest_plugin = __toESM(require("@sucrase/jest-plugin"));
|
|
36
4
|
var config = {
|
|
37
5
|
verbose: true,
|
|
38
6
|
transform: {
|
|
39
|
-
"
|
|
40
|
-
".(js)": "@tinacms/scripts/dist/jest-runner.js"
|
|
7
|
+
"^.+\\.[tj]sx?$": "babel-jest"
|
|
41
8
|
},
|
|
42
|
-
transformIgnorePatterns: [],
|
|
43
|
-
testRegex: "(\\.spec|.test)\\.(ts|tsx|js)$",
|
|
44
|
-
modulePaths: ["<rootDir>/dir/", "<rootDir>/node_modules/"],
|
|
45
|
-
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
|
|
46
9
|
testPathIgnorePatterns: ["/dist/"],
|
|
47
10
|
moduleNameMapper: {
|
|
48
11
|
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/../../__mocks__/fileMock.js",
|
|
49
12
|
"\\.(css|less|scss|sass)$": "@tinacms/scripts/__mocks__/styleMock.js"
|
|
50
13
|
}
|
|
51
14
|
};
|
|
52
|
-
var jest_runner_default =
|
|
53
|
-
|
|
54
|
-
|
|
15
|
+
var jest_runner_default = config;
|
|
16
|
+
export {
|
|
17
|
+
jest_runner_default as default
|
|
55
18
|
};
|
package/package.json
CHANGED
|
@@ -1,36 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/scripts",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.0-9becbb4-20260805000828",
|
|
4
5
|
"main": "dist/index.js",
|
|
5
6
|
"files": [
|
|
6
7
|
"dist",
|
|
7
8
|
"bin/*",
|
|
8
|
-
"__mocks__/styleMock.js"
|
|
9
|
-
".env"
|
|
9
|
+
"__mocks__/styleMock.js"
|
|
10
10
|
],
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"bin": {
|
|
13
13
|
"tinacms-scripts": "./bin/tina-build"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"
|
|
17
|
-
"chalk": "^4.1.2",
|
|
16
|
+
"chalk": "^5.4.1",
|
|
18
17
|
"chokidar": "^3.6.0",
|
|
19
18
|
"commander": "^7.2.0",
|
|
20
|
-
"esbuild": "^0.
|
|
19
|
+
"esbuild": "^0.25.0",
|
|
21
20
|
"fs-extra": "^11.3.0",
|
|
22
21
|
"json-diff": "^1.0.6",
|
|
23
22
|
"tsup": "^8.3.6",
|
|
24
23
|
"typescript": "^5.7.3",
|
|
25
|
-
"vite": "^4.
|
|
24
|
+
"vite": "^6.4.3"
|
|
26
25
|
},
|
|
27
26
|
"devDependencies": {
|
|
28
27
|
"@types/fs-extra": "^11.0.4",
|
|
29
|
-
"@types/json-diff": "^1.0.3"
|
|
28
|
+
"@types/json-diff": "^1.0.3",
|
|
29
|
+
"jest": "^30.1.3"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"url": "https://github.com/tinacms/tinacms.git",
|
|
33
|
+
"directory": "packages/@tinacms/scripts"
|
|
30
34
|
},
|
|
31
35
|
"scripts": {
|
|
32
36
|
"build:all": "bin/tina-build build:all",
|
|
33
37
|
"watch": "node bin/tina-build watch",
|
|
34
|
-
"build": "pnpm tsup src/jest-runner.ts src/
|
|
38
|
+
"build": "pnpm tsup src/jest-runner.ts src/index.ts --format esm"
|
|
35
39
|
}
|
|
36
40
|
}
|