smartbundle 0.2.0 → 0.3.0-alpha.0
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/__do_not_import_directly__/buildTypes.cjs +81 -0
- package/__do_not_import_directly__/buildTypes.js +41 -0
- package/__do_not_import_directly__/buildVite.cjs +84 -0
- package/__do_not_import_directly__/buildVite.js +84 -0
- package/__do_not_import_directly__/errors.cjs +3 -1
- package/__do_not_import_directly__/errors.js +3 -1
- package/__do_not_import_directly__/index.cjs +84 -123
- package/__do_not_import_directly__/index.js +58 -119
- package/__do_not_import_directly__/packageJson.cjs +11 -4
- package/__do_not_import_directly__/packageJson.js +9 -2
- package/__do_not_import_directly__/writePackageJson.cjs +2 -1
- package/__do_not_import_directly__/writePackageJson.js +2 -1
- package/package.json +4 -3
- package/src/args.d.ts +3 -3
- package/src/buildTypes.d.ts +7 -0
- package/src/buildVite.d.ts +19 -0
- package/src/errors.d.ts +2 -0
- package/src/packageJson.d.ts +17 -14
- package/src/build.test.d.ts +0 -1
- package/src/fixtures/deep-structure/level1/dep1.d.ts +0 -1
- package/src/fixtures/deep-structure/level1/level2/entrypoint1.d.ts +0 -1
- package/src/fixtures/export-default/entrypoint.d.ts +0 -2
- package/src/fixtures/simple-bin-build/bin.d.ts +0 -1
- package/src/fixtures/ts-import/a.d.ts +0 -1
- package/src/fixtures/ts-import/entrypoint.d.ts +0 -2
- package/src/packageJson.test.d.ts +0 -1
- package/types.d.ts +0 -1
@@ -0,0 +1,81 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
10
|
+
for (let key of __getOwnPropNames(from))
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
13
|
+
}
|
14
|
+
return to;
|
15
|
+
};
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
|
+
mod
|
23
|
+
));
|
24
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
25
|
+
const path = require("node:path");
|
26
|
+
const fs = require("node:fs");
|
27
|
+
function _interopNamespaceDefault(e) {
|
28
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
29
|
+
if (e) {
|
30
|
+
for (const k in e) {
|
31
|
+
if (k !== "default") {
|
32
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
33
|
+
Object.defineProperty(n, k, d.get ? d : {
|
34
|
+
enumerable: true,
|
35
|
+
get: () => e[k]
|
36
|
+
});
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
n.default = e;
|
41
|
+
return Object.freeze(n);
|
42
|
+
}
|
43
|
+
const path__namespace = /* @__PURE__ */ _interopNamespaceDefault(path);
|
44
|
+
const fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs);
|
45
|
+
async function buildTypes({
|
46
|
+
sourceDir,
|
47
|
+
files,
|
48
|
+
outDir
|
49
|
+
}) {
|
50
|
+
const ts = await import("typescript");
|
51
|
+
const configPath = path__namespace.join(sourceDir, "tsconfig.json");
|
52
|
+
const configFile = ts.readConfigFile(configPath, ts.sys.readFile);
|
53
|
+
const parsedCommandLine = ts.parseJsonConfigFileContent(
|
54
|
+
configFile.config,
|
55
|
+
ts.sys,
|
56
|
+
sourceDir,
|
57
|
+
{
|
58
|
+
declaration: true,
|
59
|
+
emitDeclarationOnly: true,
|
60
|
+
strict: false,
|
61
|
+
strictNullChecks: false,
|
62
|
+
strictFunctionTypes: false,
|
63
|
+
strictPropertyInitialization: false,
|
64
|
+
skipLibCheck: true,
|
65
|
+
skipDefaultLibCheck: true
|
66
|
+
},
|
67
|
+
configPath
|
68
|
+
);
|
69
|
+
const host = ts.createCompilerHost(parsedCommandLine.options);
|
70
|
+
const sourceToDtsMap = /* @__PURE__ */ new Map();
|
71
|
+
const program = ts.createProgram(files, parsedCommandLine.options, host);
|
72
|
+
program.emit(void 0, (fileName, data) => {
|
73
|
+
const relativePath = path__namespace.relative(sourceDir, fileName);
|
74
|
+
const finalPath = path__namespace.join(outDir, relativePath);
|
75
|
+
const sourceFileName = fileName.replace(/\.d\.ts$/, ".ts");
|
76
|
+
sourceToDtsMap.set(sourceFileName, finalPath);
|
77
|
+
fs__namespace.writeFileSync(finalPath, data);
|
78
|
+
});
|
79
|
+
return sourceToDtsMap;
|
80
|
+
}
|
81
|
+
exports.buildTypes = buildTypes;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import * as path from "node:path";
|
2
|
+
import * as fs from "node:fs";
|
3
|
+
async function buildTypes({
|
4
|
+
sourceDir,
|
5
|
+
files,
|
6
|
+
outDir
|
7
|
+
}) {
|
8
|
+
const ts = await import("typescript");
|
9
|
+
const configPath = path.join(sourceDir, "tsconfig.json");
|
10
|
+
const configFile = ts.readConfigFile(configPath, ts.sys.readFile);
|
11
|
+
const parsedCommandLine = ts.parseJsonConfigFileContent(
|
12
|
+
configFile.config,
|
13
|
+
ts.sys,
|
14
|
+
sourceDir,
|
15
|
+
{
|
16
|
+
declaration: true,
|
17
|
+
emitDeclarationOnly: true,
|
18
|
+
strict: false,
|
19
|
+
strictNullChecks: false,
|
20
|
+
strictFunctionTypes: false,
|
21
|
+
strictPropertyInitialization: false,
|
22
|
+
skipLibCheck: true,
|
23
|
+
skipDefaultLibCheck: true
|
24
|
+
},
|
25
|
+
configPath
|
26
|
+
);
|
27
|
+
const host = ts.createCompilerHost(parsedCommandLine.options);
|
28
|
+
const sourceToDtsMap = /* @__PURE__ */ new Map();
|
29
|
+
const program = ts.createProgram(files, parsedCommandLine.options, host);
|
30
|
+
program.emit(void 0, (fileName, data) => {
|
31
|
+
const relativePath = path.relative(sourceDir, fileName);
|
32
|
+
const finalPath = path.join(outDir, relativePath);
|
33
|
+
const sourceFileName = fileName.replace(/\.d\.ts$/, ".ts");
|
34
|
+
sourceToDtsMap.set(sourceFileName, finalPath);
|
35
|
+
fs.writeFileSync(finalPath, data);
|
36
|
+
});
|
37
|
+
return sourceToDtsMap;
|
38
|
+
}
|
39
|
+
export {
|
40
|
+
buildTypes
|
41
|
+
};
|
@@ -0,0 +1,84 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const vite = require("vite");
|
4
|
+
const path = require("node:path");
|
5
|
+
const errors = require("./errors.cjs");
|
6
|
+
function mapToObject(map) {
|
7
|
+
const obj = {};
|
8
|
+
for (const [key, value] of map) {
|
9
|
+
obj[key] = value;
|
10
|
+
}
|
11
|
+
return obj;
|
12
|
+
}
|
13
|
+
async function buildVite({
|
14
|
+
entrypoints,
|
15
|
+
packageJson,
|
16
|
+
sourceDir,
|
17
|
+
outDir
|
18
|
+
}) {
|
19
|
+
const outputs = await vite.build({
|
20
|
+
publicDir: false,
|
21
|
+
build: {
|
22
|
+
outDir,
|
23
|
+
write: true,
|
24
|
+
minify: false,
|
25
|
+
emptyOutDir: true,
|
26
|
+
assetsInlineLimit: 0,
|
27
|
+
terserOptions: {
|
28
|
+
compress: false,
|
29
|
+
mangle: false
|
30
|
+
},
|
31
|
+
lib: {
|
32
|
+
entry: mapToObject(entrypoints),
|
33
|
+
formats: ["es", "cjs"],
|
34
|
+
fileName: (format, entryName) => {
|
35
|
+
const entrypoint = entrypoints.get(entryName);
|
36
|
+
if (!entrypoint) {
|
37
|
+
const noExt2 = entryName.replace(/\.[^.]+$/, "");
|
38
|
+
return "__do_not_import_directly__/" + noExt2 + (format === "es" ? ".js" : ".cjs");
|
39
|
+
}
|
40
|
+
const relativePath = path.relative(sourceDir, entrypoint);
|
41
|
+
const noExt = relativePath.replace(/\.[^.]+$/, "");
|
42
|
+
if (format === "es") {
|
43
|
+
return `${noExt}.js`;
|
44
|
+
}
|
45
|
+
if (format === "cjs") {
|
46
|
+
return `${noExt}.cjs`;
|
47
|
+
}
|
48
|
+
return noExt;
|
49
|
+
}
|
50
|
+
},
|
51
|
+
rollupOptions: {
|
52
|
+
external: (id, parentId, isResolved) => {
|
53
|
+
if (id === packageJson.name) {
|
54
|
+
return true;
|
55
|
+
}
|
56
|
+
if (id.startsWith("node:")) {
|
57
|
+
return true;
|
58
|
+
}
|
59
|
+
if (id in (packageJson.dependencies ?? {})) {
|
60
|
+
return true;
|
61
|
+
}
|
62
|
+
if (id in (packageJson.optionalDependencies ?? {})) {
|
63
|
+
return true;
|
64
|
+
}
|
65
|
+
return false;
|
66
|
+
},
|
67
|
+
output: {
|
68
|
+
preserveModules: true
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
});
|
73
|
+
if (!Array.isArray(outputs)) {
|
74
|
+
return {
|
75
|
+
error: true,
|
76
|
+
errors: [errors.errors.rollupError]
|
77
|
+
};
|
78
|
+
}
|
79
|
+
return {
|
80
|
+
error: false,
|
81
|
+
output: outputs.flatMap((x) => x.output.filter((x2) => x2.type === "chunk"))
|
82
|
+
};
|
83
|
+
}
|
84
|
+
exports.buildVite = buildVite;
|
@@ -0,0 +1,84 @@
|
|
1
|
+
import { build } from "vite";
|
2
|
+
import { relative } from "node:path";
|
3
|
+
import { errors } from "./errors.js";
|
4
|
+
function mapToObject(map) {
|
5
|
+
const obj = {};
|
6
|
+
for (const [key, value] of map) {
|
7
|
+
obj[key] = value;
|
8
|
+
}
|
9
|
+
return obj;
|
10
|
+
}
|
11
|
+
async function buildVite({
|
12
|
+
entrypoints,
|
13
|
+
packageJson,
|
14
|
+
sourceDir,
|
15
|
+
outDir
|
16
|
+
}) {
|
17
|
+
const outputs = await build({
|
18
|
+
publicDir: false,
|
19
|
+
build: {
|
20
|
+
outDir,
|
21
|
+
write: true,
|
22
|
+
minify: false,
|
23
|
+
emptyOutDir: true,
|
24
|
+
assetsInlineLimit: 0,
|
25
|
+
terserOptions: {
|
26
|
+
compress: false,
|
27
|
+
mangle: false
|
28
|
+
},
|
29
|
+
lib: {
|
30
|
+
entry: mapToObject(entrypoints),
|
31
|
+
formats: ["es", "cjs"],
|
32
|
+
fileName: (format, entryName) => {
|
33
|
+
const entrypoint = entrypoints.get(entryName);
|
34
|
+
if (!entrypoint) {
|
35
|
+
const noExt2 = entryName.replace(/\.[^.]+$/, "");
|
36
|
+
return "__do_not_import_directly__/" + noExt2 + (format === "es" ? ".js" : ".cjs");
|
37
|
+
}
|
38
|
+
const relativePath = relative(sourceDir, entrypoint);
|
39
|
+
const noExt = relativePath.replace(/\.[^.]+$/, "");
|
40
|
+
if (format === "es") {
|
41
|
+
return `${noExt}.js`;
|
42
|
+
}
|
43
|
+
if (format === "cjs") {
|
44
|
+
return `${noExt}.cjs`;
|
45
|
+
}
|
46
|
+
return noExt;
|
47
|
+
}
|
48
|
+
},
|
49
|
+
rollupOptions: {
|
50
|
+
external: (id, parentId, isResolved) => {
|
51
|
+
if (id === packageJson.name) {
|
52
|
+
return true;
|
53
|
+
}
|
54
|
+
if (id.startsWith("node:")) {
|
55
|
+
return true;
|
56
|
+
}
|
57
|
+
if (id in (packageJson.dependencies ?? {})) {
|
58
|
+
return true;
|
59
|
+
}
|
60
|
+
if (id in (packageJson.optionalDependencies ?? {})) {
|
61
|
+
return true;
|
62
|
+
}
|
63
|
+
return false;
|
64
|
+
},
|
65
|
+
output: {
|
66
|
+
preserveModules: true
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
});
|
71
|
+
if (!Array.isArray(outputs)) {
|
72
|
+
return {
|
73
|
+
error: true,
|
74
|
+
errors: [errors.rollupError]
|
75
|
+
};
|
76
|
+
}
|
77
|
+
return {
|
78
|
+
error: false,
|
79
|
+
output: outputs.flatMap((x) => x.output.filter((x2) => x2.type === "chunk"))
|
80
|
+
};
|
81
|
+
}
|
82
|
+
export {
|
83
|
+
buildVite
|
84
|
+
};
|
@@ -12,6 +12,8 @@ const errors = {
|
|
12
12
|
descriptionString: "The `description` field must be a string. Please, verify the value. More info: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#description",
|
13
13
|
dependenciesInvalid: "The `dependencies` field must be an Object<string, string>. Please, verify the value. More info: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#dependencies",
|
14
14
|
binString: "The `bin` field must be a string. Please, verify the value. More info: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#bin",
|
15
|
-
rollupError: "An error occurred while building the package. Please, report it to the issues on GitHub"
|
15
|
+
rollupError: "An error occurred while building the package. Please, report it to the issues on GitHub",
|
16
|
+
typescriptNotFound: "The package.json contains typescript entrypoints, but the typescript package is not found. Please, install typescript@^5.0.0",
|
17
|
+
optionalDependenciesInvalid: "The `optionalDependencies` field must be an Object<string, string>. Please, verify the value. More info: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#optionaldependencies"
|
16
18
|
};
|
17
19
|
exports.errors = errors;
|
@@ -10,7 +10,9 @@ const errors = {
|
|
10
10
|
descriptionString: "The `description` field must be a string. Please, verify the value. More info: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#description",
|
11
11
|
dependenciesInvalid: "The `dependencies` field must be an Object<string, string>. Please, verify the value. More info: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#dependencies",
|
12
12
|
binString: "The `bin` field must be a string. Please, verify the value. More info: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#bin",
|
13
|
-
rollupError: "An error occurred while building the package. Please, report it to the issues on GitHub"
|
13
|
+
rollupError: "An error occurred while building the package. Please, report it to the issues on GitHub",
|
14
|
+
typescriptNotFound: "The package.json contains typescript entrypoints, but the typescript package is not found. Please, install typescript@^5.0.0",
|
15
|
+
optionalDependenciesInvalid: "The `optionalDependencies` field must be an Object<string, string>. Please, verify the value. More info: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#optionaldependencies"
|
14
16
|
};
|
15
17
|
export {
|
16
18
|
errors
|
@@ -1,32 +1,46 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
10
|
+
for (let key of __getOwnPropNames(from))
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
13
|
+
}
|
14
|
+
return to;
|
15
|
+
};
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
|
+
mod
|
23
|
+
));
|
2
24
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const
|
25
|
+
const path = require("node:path");
|
4
26
|
const fs = require("node:fs/promises");
|
5
27
|
const packageJson = require("./packageJson.cjs");
|
6
|
-
const vite = require("vite");
|
7
28
|
const writePackageJson = require("./writePackageJson.cjs");
|
8
|
-
const rollupts = require("@rollup/plugin-typescript");
|
9
29
|
const errors = require("./errors.cjs");
|
30
|
+
const buildTypes = require("./buildTypes.cjs");
|
31
|
+
const buildVite = require("./buildVite.cjs");
|
10
32
|
function myResolve(path1, path2) {
|
11
|
-
if (
|
33
|
+
if (path.isAbsolute(path2)) {
|
12
34
|
return path2;
|
13
35
|
}
|
14
|
-
return
|
15
|
-
}
|
16
|
-
function mapToObject(map) {
|
17
|
-
const obj = {};
|
18
|
-
for (const [key, value] of map) {
|
19
|
-
obj[key] = value;
|
20
|
-
}
|
21
|
-
return obj;
|
36
|
+
return path.join(path1, path2);
|
22
37
|
}
|
23
38
|
function reverseMap(map) {
|
24
39
|
const reversed = /* @__PURE__ */ new Map();
|
25
40
|
for (const [key, value] of map) {
|
26
|
-
const
|
27
|
-
const arr = reversed.get(noExtValue) ?? [];
|
41
|
+
const arr = reversed.get(value) ?? [];
|
28
42
|
arr.push(key);
|
29
|
-
reversed.set(
|
43
|
+
reversed.set(value, arr);
|
30
44
|
}
|
31
45
|
return reversed;
|
32
46
|
}
|
@@ -35,9 +49,11 @@ function setExports(exportsMap, exportName, mapFn) {
|
|
35
49
|
exportsMap.set(exportName, mapFn(entry));
|
36
50
|
}
|
37
51
|
async function run(args) {
|
38
|
-
var _a;
|
39
52
|
const sourceDir = myResolve(process.cwd(), args.sourceDir ?? ".");
|
40
|
-
const packagePath = myResolve(
|
53
|
+
const packagePath = myResolve(
|
54
|
+
sourceDir,
|
55
|
+
args.packagePath ?? "./package.json"
|
56
|
+
);
|
41
57
|
const outDir = myResolve(process.cwd(), args.outputDir ?? "./dist");
|
42
58
|
await fs.rm(outDir, { recursive: true, force: true });
|
43
59
|
await fs.mkdir(outDir, { recursive: true });
|
@@ -48,122 +64,67 @@ async function run(args) {
|
|
48
64
|
}
|
49
65
|
const entrypoints = /* @__PURE__ */ new Map();
|
50
66
|
if (packageJson$1.exports) {
|
51
|
-
const mainEntry =
|
67
|
+
const mainEntry = path.join(sourceDir, packageJson$1.exports);
|
52
68
|
entrypoints.set(".", mainEntry);
|
53
69
|
}
|
54
70
|
if (packageJson$1.bin) {
|
55
|
-
const binEntry =
|
71
|
+
const binEntry = path.join(sourceDir, packageJson$1.bin);
|
56
72
|
entrypoints.set("__bin__", binEntry);
|
57
73
|
}
|
58
|
-
const
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
rootDir: sourceDir,
|
64
|
-
declaration: true,
|
65
|
-
emitDeclarationOnly: true,
|
66
|
-
declarationDir: outDir
|
67
|
-
}
|
68
|
-
})
|
69
|
-
) : false;
|
70
|
-
const outputs = await vite.build({
|
71
|
-
publicDir: false,
|
72
|
-
build: {
|
73
|
-
outDir,
|
74
|
-
write: true,
|
75
|
-
minify: false,
|
76
|
-
emptyOutDir: true,
|
77
|
-
assetsInlineLimit: 0,
|
78
|
-
terserOptions: {
|
79
|
-
compress: false,
|
80
|
-
mangle: false
|
81
|
-
},
|
82
|
-
lib: {
|
83
|
-
entry: mapToObject(entrypoints),
|
84
|
-
formats: ["es", "cjs"],
|
85
|
-
fileName: (format, entryName) => {
|
86
|
-
const entrypoint = entrypoints.get(entryName);
|
87
|
-
if (!entrypoint) {
|
88
|
-
const noExt2 = entryName.replace(/\.[^.]+$/, "");
|
89
|
-
return "__do_not_import_directly__/" + noExt2 + (format === "es" ? ".js" : ".cjs");
|
90
|
-
}
|
91
|
-
const relativePath = node_path.relative(sourceDir, entrypoint);
|
92
|
-
const noExt = relativePath.replace(/\.[^.]+$/, "");
|
93
|
-
if (format === "es") {
|
94
|
-
return `${noExt}.js`;
|
95
|
-
}
|
96
|
-
if (format === "cjs") {
|
97
|
-
return `${noExt}.cjs`;
|
98
|
-
}
|
99
|
-
return noExt;
|
100
|
-
}
|
101
|
-
},
|
102
|
-
rollupOptions: {
|
103
|
-
plugins: [typescript],
|
104
|
-
external: (id, parentId, isResolved) => {
|
105
|
-
if (id === packageJson$1.name) {
|
106
|
-
return true;
|
107
|
-
}
|
108
|
-
if (id.startsWith("node:")) {
|
109
|
-
return true;
|
110
|
-
}
|
111
|
-
if (packageJson$1.dependencies) {
|
112
|
-
return id in packageJson$1.dependencies;
|
113
|
-
}
|
114
|
-
return false;
|
115
|
-
},
|
116
|
-
output: {
|
117
|
-
preserveModules: true
|
118
|
-
}
|
119
|
-
}
|
120
|
-
}
|
74
|
+
const outputs = await buildVite.buildVite({
|
75
|
+
entrypoints,
|
76
|
+
packageJson: packageJson$1,
|
77
|
+
sourceDir,
|
78
|
+
outDir
|
121
79
|
});
|
122
|
-
if (
|
123
|
-
return { error: true, errors:
|
80
|
+
if (outputs.error) {
|
81
|
+
return { error: true, errors: outputs.errors };
|
124
82
|
}
|
83
|
+
const viteOutput = outputs.output;
|
125
84
|
const exportsMap = /* @__PURE__ */ new Map();
|
126
85
|
const reversedEntrypoints = reverseMap(entrypoints);
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
if (format === "es") {
|
143
|
-
entry.mjs = "./" + el.fileName;
|
144
|
-
} else if (format === "cjs") {
|
145
|
-
entry.cjs = "./" + el.fileName;
|
146
|
-
}
|
147
|
-
return entry;
|
148
|
-
});
|
149
|
-
}
|
150
|
-
break;
|
151
|
-
case "asset":
|
152
|
-
if (el.fileName.endsWith(".d.ts")) {
|
153
|
-
const noExtPath2 = node_path.join(sourceDir, el.fileName.replace(/\.d\.ts$/, ""));
|
154
|
-
const exportPath2 = reversedEntrypoints.get(noExtPath2);
|
155
|
-
if (!exportPath2) {
|
156
|
-
continue;
|
157
|
-
}
|
158
|
-
for (const path of exportPath2) {
|
159
|
-
setExports(exportsMap, path, (entry) => {
|
160
|
-
entry.mdts = "./" + el.fileName;
|
161
|
-
return entry;
|
162
|
-
});
|
163
|
-
}
|
164
|
-
}
|
165
|
-
break;
|
86
|
+
const tsEntrypoints = [...entrypoints.values()].filter(
|
87
|
+
(entry) => entry.endsWith(".ts")
|
88
|
+
);
|
89
|
+
if (tsEntrypoints.length > 0) {
|
90
|
+
try {
|
91
|
+
await import("typescript");
|
92
|
+
} catch {
|
93
|
+
return { error: true, errors: [errors.errors.typescriptNotFound] };
|
94
|
+
}
|
95
|
+
const files = viteOutput.map((el) => el.facadeModuleId ?? "");
|
96
|
+
const dtsMap = await buildTypes.buildTypes({ sourceDir, files, outDir });
|
97
|
+
for (const [source, dts] of dtsMap) {
|
98
|
+
const exportPath = reversedEntrypoints.get(source);
|
99
|
+
if (!exportPath) {
|
100
|
+
continue;
|
166
101
|
}
|
102
|
+
for (const path$1 of exportPath) {
|
103
|
+
setExports(exportsMap, path$1, (entry) => {
|
104
|
+
entry.mdts = "./" + path.relative(outDir, dts);
|
105
|
+
return entry;
|
106
|
+
});
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|
110
|
+
for (const el of viteOutput) {
|
111
|
+
if (el.facadeModuleId == null) {
|
112
|
+
continue;
|
113
|
+
}
|
114
|
+
const exportPath = reversedEntrypoints.get(el.facadeModuleId);
|
115
|
+
if (!exportPath) {
|
116
|
+
continue;
|
117
|
+
}
|
118
|
+
for (const path2 of exportPath) {
|
119
|
+
setExports(exportsMap, path2, (entry) => {
|
120
|
+
const format = el.fileName.endsWith(".cjs") ? "cjs" : "es";
|
121
|
+
if (format === "es") {
|
122
|
+
entry.mjs = "./" + el.fileName;
|
123
|
+
} else if (format === "cjs") {
|
124
|
+
entry.cjs = "./" + el.fileName;
|
125
|
+
}
|
126
|
+
return entry;
|
127
|
+
});
|
167
128
|
}
|
168
129
|
}
|
169
130
|
await writePackageJson.writePackageJson(outDir, packageJson$1, {
|
@@ -1,30 +1,22 @@
|
|
1
|
-
import { join,
|
1
|
+
import { join, isAbsolute, relative } from "node:path";
|
2
2
|
import { rm, mkdir } from "node:fs/promises";
|
3
3
|
import { parsePackageJson } from "./packageJson.js";
|
4
|
-
import { build } from "vite";
|
5
4
|
import { writePackageJson } from "./writePackageJson.js";
|
6
|
-
import rollupts from "@rollup/plugin-typescript";
|
7
5
|
import { errors } from "./errors.js";
|
6
|
+
import { buildTypes } from "./buildTypes.js";
|
7
|
+
import { buildVite } from "./buildVite.js";
|
8
8
|
function myResolve(path1, path2) {
|
9
9
|
if (isAbsolute(path2)) {
|
10
10
|
return path2;
|
11
11
|
}
|
12
12
|
return join(path1, path2);
|
13
13
|
}
|
14
|
-
function mapToObject(map) {
|
15
|
-
const obj = {};
|
16
|
-
for (const [key, value] of map) {
|
17
|
-
obj[key] = value;
|
18
|
-
}
|
19
|
-
return obj;
|
20
|
-
}
|
21
14
|
function reverseMap(map) {
|
22
15
|
const reversed = /* @__PURE__ */ new Map();
|
23
16
|
for (const [key, value] of map) {
|
24
|
-
const
|
25
|
-
const arr = reversed.get(noExtValue) ?? [];
|
17
|
+
const arr = reversed.get(value) ?? [];
|
26
18
|
arr.push(key);
|
27
|
-
reversed.set(
|
19
|
+
reversed.set(value, arr);
|
28
20
|
}
|
29
21
|
return reversed;
|
30
22
|
}
|
@@ -33,9 +25,11 @@ function setExports(exportsMap, exportName, mapFn) {
|
|
33
25
|
exportsMap.set(exportName, mapFn(entry));
|
34
26
|
}
|
35
27
|
async function run(args) {
|
36
|
-
var _a;
|
37
28
|
const sourceDir = myResolve(process.cwd(), args.sourceDir ?? ".");
|
38
|
-
const packagePath = myResolve(
|
29
|
+
const packagePath = myResolve(
|
30
|
+
sourceDir,
|
31
|
+
args.packagePath ?? "./package.json"
|
32
|
+
);
|
39
33
|
const outDir = myResolve(process.cwd(), args.outputDir ?? "./dist");
|
40
34
|
await rm(outDir, { recursive: true, force: true });
|
41
35
|
await mkdir(outDir, { recursive: true });
|
@@ -53,117 +47,62 @@ async function run(args) {
|
|
53
47
|
const binEntry = join(sourceDir, packageJson.bin);
|
54
48
|
entrypoints.set("__bin__", binEntry);
|
55
49
|
}
|
56
|
-
const
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
rootDir: sourceDir,
|
62
|
-
declaration: true,
|
63
|
-
emitDeclarationOnly: true,
|
64
|
-
declarationDir: outDir
|
65
|
-
}
|
66
|
-
})
|
67
|
-
) : false;
|
68
|
-
const outputs = await build({
|
69
|
-
publicDir: false,
|
70
|
-
build: {
|
71
|
-
outDir,
|
72
|
-
write: true,
|
73
|
-
minify: false,
|
74
|
-
emptyOutDir: true,
|
75
|
-
assetsInlineLimit: 0,
|
76
|
-
terserOptions: {
|
77
|
-
compress: false,
|
78
|
-
mangle: false
|
79
|
-
},
|
80
|
-
lib: {
|
81
|
-
entry: mapToObject(entrypoints),
|
82
|
-
formats: ["es", "cjs"],
|
83
|
-
fileName: (format, entryName) => {
|
84
|
-
const entrypoint = entrypoints.get(entryName);
|
85
|
-
if (!entrypoint) {
|
86
|
-
const noExt2 = entryName.replace(/\.[^.]+$/, "");
|
87
|
-
return "__do_not_import_directly__/" + noExt2 + (format === "es" ? ".js" : ".cjs");
|
88
|
-
}
|
89
|
-
const relativePath = relative(sourceDir, entrypoint);
|
90
|
-
const noExt = relativePath.replace(/\.[^.]+$/, "");
|
91
|
-
if (format === "es") {
|
92
|
-
return `${noExt}.js`;
|
93
|
-
}
|
94
|
-
if (format === "cjs") {
|
95
|
-
return `${noExt}.cjs`;
|
96
|
-
}
|
97
|
-
return noExt;
|
98
|
-
}
|
99
|
-
},
|
100
|
-
rollupOptions: {
|
101
|
-
plugins: [typescript],
|
102
|
-
external: (id, parentId, isResolved) => {
|
103
|
-
if (id === packageJson.name) {
|
104
|
-
return true;
|
105
|
-
}
|
106
|
-
if (id.startsWith("node:")) {
|
107
|
-
return true;
|
108
|
-
}
|
109
|
-
if (packageJson.dependencies) {
|
110
|
-
return id in packageJson.dependencies;
|
111
|
-
}
|
112
|
-
return false;
|
113
|
-
},
|
114
|
-
output: {
|
115
|
-
preserveModules: true
|
116
|
-
}
|
117
|
-
}
|
118
|
-
}
|
50
|
+
const outputs = await buildVite({
|
51
|
+
entrypoints,
|
52
|
+
packageJson,
|
53
|
+
sourceDir,
|
54
|
+
outDir
|
119
55
|
});
|
120
|
-
if (
|
121
|
-
return { error: true, errors:
|
56
|
+
if (outputs.error) {
|
57
|
+
return { error: true, errors: outputs.errors };
|
122
58
|
}
|
59
|
+
const viteOutput = outputs.output;
|
123
60
|
const exportsMap = /* @__PURE__ */ new Map();
|
124
61
|
const reversedEntrypoints = reverseMap(entrypoints);
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
});
|
147
|
-
}
|
148
|
-
break;
|
149
|
-
case "asset":
|
150
|
-
if (el.fileName.endsWith(".d.ts")) {
|
151
|
-
const noExtPath2 = join(sourceDir, el.fileName.replace(/\.d\.ts$/, ""));
|
152
|
-
const exportPath2 = reversedEntrypoints.get(noExtPath2);
|
153
|
-
if (!exportPath2) {
|
154
|
-
continue;
|
155
|
-
}
|
156
|
-
for (const path of exportPath2) {
|
157
|
-
setExports(exportsMap, path, (entry) => {
|
158
|
-
entry.mdts = "./" + el.fileName;
|
159
|
-
return entry;
|
160
|
-
});
|
161
|
-
}
|
162
|
-
}
|
163
|
-
break;
|
62
|
+
const tsEntrypoints = [...entrypoints.values()].filter(
|
63
|
+
(entry) => entry.endsWith(".ts")
|
64
|
+
);
|
65
|
+
if (tsEntrypoints.length > 0) {
|
66
|
+
try {
|
67
|
+
await import("typescript");
|
68
|
+
} catch {
|
69
|
+
return { error: true, errors: [errors.typescriptNotFound] };
|
70
|
+
}
|
71
|
+
const files = viteOutput.map((el) => el.facadeModuleId ?? "");
|
72
|
+
const dtsMap = await buildTypes({ sourceDir, files, outDir });
|
73
|
+
for (const [source, dts] of dtsMap) {
|
74
|
+
const exportPath = reversedEntrypoints.get(source);
|
75
|
+
if (!exportPath) {
|
76
|
+
continue;
|
77
|
+
}
|
78
|
+
for (const path of exportPath) {
|
79
|
+
setExports(exportsMap, path, (entry) => {
|
80
|
+
entry.mdts = "./" + relative(outDir, dts);
|
81
|
+
return entry;
|
82
|
+
});
|
164
83
|
}
|
165
84
|
}
|
166
85
|
}
|
86
|
+
for (const el of viteOutput) {
|
87
|
+
if (el.facadeModuleId == null) {
|
88
|
+
continue;
|
89
|
+
}
|
90
|
+
const exportPath = reversedEntrypoints.get(el.facadeModuleId);
|
91
|
+
if (!exportPath) {
|
92
|
+
continue;
|
93
|
+
}
|
94
|
+
for (const path of exportPath) {
|
95
|
+
setExports(exportsMap, path, (entry) => {
|
96
|
+
const format = el.fileName.endsWith(".cjs") ? "cjs" : "es";
|
97
|
+
if (format === "es") {
|
98
|
+
entry.mjs = "./" + el.fileName;
|
99
|
+
} else if (format === "cjs") {
|
100
|
+
entry.cjs = "./" + el.fileName;
|
101
|
+
}
|
102
|
+
return entry;
|
103
|
+
});
|
104
|
+
}
|
105
|
+
}
|
167
106
|
await writePackageJson(outDir, packageJson, {
|
168
107
|
exportsMap
|
169
108
|
});
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const fs = require("node:fs/promises");
|
4
4
|
const z = require("zod");
|
5
5
|
const errors = require("./errors.cjs");
|
6
|
-
const
|
6
|
+
const path = require("node:path");
|
7
7
|
function _interopNamespaceDefault(e) {
|
8
8
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
9
9
|
if (e) {
|
@@ -35,18 +35,25 @@ function dependencies(errorText) {
|
|
35
35
|
function createPackageJsonSchema(sourceDir) {
|
36
36
|
return z.object({
|
37
37
|
exports: z.string({ message: errors.errors.exportsRequired }).refine((exports2) => {
|
38
|
-
const mainFinalPath =
|
38
|
+
const mainFinalPath = path.join(sourceDir, exports2);
|
39
39
|
return fileExists(mainFinalPath);
|
40
40
|
}, errors.errors.exportsInvalid).optional(),
|
41
|
-
name: z.string({ message: errors.errors.nameRequired }).min(1, errors.errors.nameMinLength).max(214, errors.errors.nameMaxLength).refine(
|
41
|
+
name: z.string({ message: errors.errors.nameRequired }).min(1, errors.errors.nameMinLength).max(214, errors.errors.nameMaxLength).refine(
|
42
|
+
(name) => ["_", "."].every((start) => !name.startsWith(start)),
|
43
|
+
errors.errors.nameStartsIllegalChars
|
44
|
+
),
|
42
45
|
version: z.string({ message: errors.errors.versionRequired }),
|
43
46
|
private: z.boolean({ message: errors.errors.privateIsTrue }).refine((value) => value, errors.errors.privateIsTrue),
|
44
47
|
description: z.string({ message: errors.errors.descriptionString }).optional(),
|
45
48
|
dependencies: dependencies(errors.errors.dependenciesInvalid),
|
49
|
+
optionalDependencies: dependencies(errors.errors.optionalDependenciesInvalid),
|
46
50
|
bin: z.string({ message: errors.errors.binString }).optional()
|
47
51
|
});
|
48
52
|
}
|
49
|
-
async function parsePackageJson({
|
53
|
+
async function parsePackageJson({
|
54
|
+
sourceDir,
|
55
|
+
packagePath
|
56
|
+
}) {
|
50
57
|
const packageString = await fs__namespace.readFile(packagePath, "utf-8");
|
51
58
|
const rawJson = JSON.parse(packageString);
|
52
59
|
const packageJsonSchema = createPackageJsonSchema(sourceDir);
|
@@ -19,15 +19,22 @@ function createPackageJsonSchema(sourceDir) {
|
|
19
19
|
const mainFinalPath = join(sourceDir, exports);
|
20
20
|
return fileExists(mainFinalPath);
|
21
21
|
}, errors.exportsInvalid).optional(),
|
22
|
-
name: z.string({ message: errors.nameRequired }).min(1, errors.nameMinLength).max(214, errors.nameMaxLength).refine(
|
22
|
+
name: z.string({ message: errors.nameRequired }).min(1, errors.nameMinLength).max(214, errors.nameMaxLength).refine(
|
23
|
+
(name) => ["_", "."].every((start) => !name.startsWith(start)),
|
24
|
+
errors.nameStartsIllegalChars
|
25
|
+
),
|
23
26
|
version: z.string({ message: errors.versionRequired }),
|
24
27
|
private: z.boolean({ message: errors.privateIsTrue }).refine((value) => value, errors.privateIsTrue),
|
25
28
|
description: z.string({ message: errors.descriptionString }).optional(),
|
26
29
|
dependencies: dependencies(errors.dependenciesInvalid),
|
30
|
+
optionalDependencies: dependencies(errors.optionalDependenciesInvalid),
|
27
31
|
bin: z.string({ message: errors.binString }).optional()
|
28
32
|
});
|
29
33
|
}
|
30
|
-
async function parsePackageJson({
|
34
|
+
async function parsePackageJson({
|
35
|
+
sourceDir,
|
36
|
+
packagePath
|
37
|
+
}) {
|
31
38
|
const packageString = await fs.readFile(packagePath, "utf-8");
|
32
39
|
const rawJson = JSON.parse(packageString);
|
33
40
|
const packageJsonSchema = createPackageJsonSchema(sourceDir);
|
@@ -34,7 +34,8 @@ async function writePackageJson(outDir, parsed, { exportsMap }) {
|
|
34
34
|
module: (_c = allExports["."]) == null ? void 0 : _c.default,
|
35
35
|
description: parsed.description ?? "",
|
36
36
|
exports: allExports,
|
37
|
-
dependencies: parsed.dependencies ?? void 0
|
37
|
+
dependencies: parsed.dependencies ?? void 0,
|
38
|
+
optionalDependencies: parsed.optionalDependencies ?? void 0
|
38
39
|
};
|
39
40
|
await fs.writeFile(`${outDir}/package.json`, JSON.stringify(res, null, 2));
|
40
41
|
}
|
@@ -32,7 +32,8 @@ async function writePackageJson(outDir, parsed, { exportsMap }) {
|
|
32
32
|
module: (_c = allExports["."]) == null ? void 0 : _c.default,
|
33
33
|
description: parsed.description ?? "",
|
34
34
|
exports: allExports,
|
35
|
-
dependencies: parsed.dependencies ?? void 0
|
35
|
+
dependencies: parsed.dependencies ?? void 0,
|
36
|
+
optionalDependencies: parsed.optionalDependencies ?? void 0
|
36
37
|
};
|
37
38
|
await writeFile(`${outDir}/package.json`, JSON.stringify(res, null, 2));
|
38
39
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "smartbundle",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.3.0-alpha.0",
|
5
5
|
"bin": "./src/bin.js",
|
6
6
|
"types": "./src/run.d.ts",
|
7
7
|
"module": "./src/run.js",
|
@@ -20,10 +20,11 @@
|
|
20
20
|
}
|
21
21
|
},
|
22
22
|
"dependencies": {
|
23
|
-
"@rollup/plugin-typescript": "^11.1.6",
|
24
|
-
"tslib": "^2.6.3",
|
25
23
|
"vite": "^5.3.4",
|
26
24
|
"yargs": "^17.7.2",
|
27
25
|
"zod": "^3.23.8"
|
26
|
+
},
|
27
|
+
"optionalDependencies": {
|
28
|
+
"typescript": "^5.0.0"
|
28
29
|
}
|
29
30
|
}
|
package/src/args.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
export declare const args: {
|
2
2
|
[x: string]: unknown;
|
3
|
-
sourceDir: string
|
4
|
-
packagePath: string
|
5
|
-
outputDir: string
|
3
|
+
sourceDir: string;
|
4
|
+
packagePath: string;
|
5
|
+
outputDir: string;
|
6
6
|
_: (string | number)[];
|
7
7
|
$0: string;
|
8
8
|
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { PackageJson } from "./packageJson.js";
|
2
|
+
import { Rollup } from "vite";
|
3
|
+
type BuildViteOptions = {
|
4
|
+
sourceDir: string;
|
5
|
+
packageJson: PackageJson;
|
6
|
+
entrypoints: Map<string, string>;
|
7
|
+
outDir: string;
|
8
|
+
};
|
9
|
+
type BuildSuccess = {
|
10
|
+
error: false;
|
11
|
+
output: Rollup.OutputChunk[];
|
12
|
+
};
|
13
|
+
type BuildError = {
|
14
|
+
error: true;
|
15
|
+
errors: Array<string>;
|
16
|
+
};
|
17
|
+
type BuildResult = BuildSuccess | BuildError;
|
18
|
+
export declare function buildVite({ entrypoints, packageJson, sourceDir, outDir, }: BuildViteOptions): Promise<BuildResult>;
|
19
|
+
export {};
|
package/src/errors.d.ts
CHANGED
package/src/packageJson.d.ts
CHANGED
@@ -6,23 +6,26 @@ declare function createPackageJsonSchema(sourceDir: string): z.ZodObject<{
|
|
6
6
|
private: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
|
7
7
|
description: z.ZodOptional<z.ZodString>;
|
8
8
|
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
9
|
+
optionalDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
9
10
|
bin: z.ZodOptional<z.ZodString>;
|
10
11
|
}, "strip", z.ZodTypeAny, {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
description?: string
|
16
|
-
dependencies?: Record<string, string
|
17
|
-
|
12
|
+
exports?: string;
|
13
|
+
name?: string;
|
14
|
+
version?: string;
|
15
|
+
private?: boolean;
|
16
|
+
description?: string;
|
17
|
+
dependencies?: Record<string, string>;
|
18
|
+
optionalDependencies?: Record<string, string>;
|
19
|
+
bin?: string;
|
18
20
|
}, {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
description?: string
|
24
|
-
dependencies?: Record<string, string
|
25
|
-
|
21
|
+
exports?: string;
|
22
|
+
name?: string;
|
23
|
+
version?: string;
|
24
|
+
private?: boolean;
|
25
|
+
description?: string;
|
26
|
+
dependencies?: Record<string, string>;
|
27
|
+
optionalDependencies?: Record<string, string>;
|
28
|
+
bin?: string;
|
26
29
|
}>;
|
27
30
|
type PackageJsonSchema = ReturnType<typeof createPackageJsonSchema>;
|
28
31
|
export type PackageJson = z.infer<PackageJsonSchema>;
|
package/src/build.test.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const a = 1;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function foo(): void;
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const a = 1;
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
package/types.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
import "vitest-directory-snapshot/dist/types.js";
|