mirror of
https://github.com/hanzoai/frames.git
synced 2026-09-24 00:08:03 +00:00
fix(core): publish missing subpath exports (#1616)
This commit is contained in:
@@ -141,6 +141,15 @@
|
||||
"import": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts"
|
||||
},
|
||||
"./package.json": "./package.json",
|
||||
"./beats": {
|
||||
"import": "./dist/beats/index.js",
|
||||
"types": "./dist/beats/index.d.ts"
|
||||
},
|
||||
"./html-attr-safety": {
|
||||
"import": "./dist/utils/htmlAttrSafety.js",
|
||||
"types": "./dist/utils/htmlAttrSafety.d.ts"
|
||||
},
|
||||
"./lint": {
|
||||
"import": "./dist/lint/index.js",
|
||||
"types": "./dist/lint/index.d.ts"
|
||||
@@ -161,7 +170,15 @@
|
||||
"import": "./dist/colorLuts.js",
|
||||
"types": "./dist/colorLuts.d.ts"
|
||||
},
|
||||
"./storyboard": {
|
||||
"import": "./dist/storyboard/index.js",
|
||||
"types": "./dist/storyboard/index.d.ts"
|
||||
},
|
||||
"./runtime": "./dist/hyperframe.runtime.iife.js",
|
||||
"./runtime/clipTree": {
|
||||
"import": "./dist/runtime/clipTree.js",
|
||||
"types": "./dist/runtime/clipTree.d.ts"
|
||||
},
|
||||
"./runtime/lottie-readiness": {
|
||||
"import": "./dist/lottieReadiness.js",
|
||||
"types": "./dist/lottieReadiness.d.ts"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export * from "./beatDetection";
|
||||
export * from "./beatFile";
|
||||
export * from "./beatDetection.js";
|
||||
export * from "./beatFile.js";
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"files": ["src/runtime/mediaVolumeEnvelope.ts"],
|
||||
"files": ["src/runtime/clipTree.ts", "src/runtime/mediaVolumeEnvelope.ts"],
|
||||
"include": ["src/**/*"],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
|
||||
@@ -29,6 +29,12 @@ function listWorkspaceRefs(pkg) {
|
||||
return refs;
|
||||
}
|
||||
|
||||
function listMissingPublishedExports(pkg) {
|
||||
if (!pkg.exports || !pkg.publishConfig?.exports) return [];
|
||||
|
||||
return Object.keys(pkg.exports).filter((exportKey) => !(exportKey in pkg.publishConfig.exports));
|
||||
}
|
||||
|
||||
function parsePackJson(output, workspace) {
|
||||
try {
|
||||
const parsed = JSON.parse(output);
|
||||
@@ -44,6 +50,14 @@ function main() {
|
||||
readFileSync(join(ROOT, workspace, "package.json"), "utf8"),
|
||||
);
|
||||
if (sourcePackageJson.private) continue;
|
||||
|
||||
const missingPublishedExports = listMissingPublishedExports(sourcePackageJson);
|
||||
if (missingPublishedExports.length > 0) {
|
||||
throw new Error(
|
||||
`${workspace} publishConfig.exports is missing source exports: ${missingPublishedExports.join(", ")}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (listWorkspaceRefs(sourcePackageJson).length === 0) continue;
|
||||
|
||||
const packDir = mkdtempSync(join(tmpdir(), "hyperframes-pack-"));
|
||||
|
||||
Reference in New Issue
Block a user