mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix(core): publish missing subpath exports (#1616)
This commit is contained in:
@@ -141,6 +141,15 @@
|
|||||||
"import": "./dist/index.js",
|
"import": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts"
|
"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": {
|
"./lint": {
|
||||||
"import": "./dist/lint/index.js",
|
"import": "./dist/lint/index.js",
|
||||||
"types": "./dist/lint/index.d.ts"
|
"types": "./dist/lint/index.d.ts"
|
||||||
@@ -161,7 +170,15 @@
|
|||||||
"import": "./dist/colorLuts.js",
|
"import": "./dist/colorLuts.js",
|
||||||
"types": "./dist/colorLuts.d.ts"
|
"types": "./dist/colorLuts.d.ts"
|
||||||
},
|
},
|
||||||
|
"./storyboard": {
|
||||||
|
"import": "./dist/storyboard/index.js",
|
||||||
|
"types": "./dist/storyboard/index.d.ts"
|
||||||
|
},
|
||||||
"./runtime": "./dist/hyperframe.runtime.iife.js",
|
"./runtime": "./dist/hyperframe.runtime.iife.js",
|
||||||
|
"./runtime/clipTree": {
|
||||||
|
"import": "./dist/runtime/clipTree.js",
|
||||||
|
"types": "./dist/runtime/clipTree.d.ts"
|
||||||
|
},
|
||||||
"./runtime/lottie-readiness": {
|
"./runtime/lottie-readiness": {
|
||||||
"import": "./dist/lottieReadiness.js",
|
"import": "./dist/lottieReadiness.js",
|
||||||
"types": "./dist/lottieReadiness.d.ts"
|
"types": "./dist/lottieReadiness.d.ts"
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
export * from "./beatDetection";
|
export * from "./beatDetection.js";
|
||||||
export * from "./beatFile";
|
export * from "./beatFile.js";
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"rootDir": "./src"
|
"rootDir": "./src"
|
||||||
},
|
},
|
||||||
"files": ["src/runtime/mediaVolumeEnvelope.ts"],
|
"files": ["src/runtime/clipTree.ts", "src/runtime/mediaVolumeEnvelope.ts"],
|
||||||
"include": ["src/**/*"],
|
"include": ["src/**/*"],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
|||||||
@@ -29,6 +29,12 @@ function listWorkspaceRefs(pkg) {
|
|||||||
return refs;
|
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) {
|
function parsePackJson(output, workspace) {
|
||||||
try {
|
try {
|
||||||
const parsed = JSON.parse(output);
|
const parsed = JSON.parse(output);
|
||||||
@@ -44,6 +50,14 @@ function main() {
|
|||||||
readFileSync(join(ROOT, workspace, "package.json"), "utf8"),
|
readFileSync(join(ROOT, workspace, "package.json"), "utf8"),
|
||||||
);
|
);
|
||||||
if (sourcePackageJson.private) continue;
|
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;
|
if (listWorkspaceRefs(sourcePackageJson).length === 0) continue;
|
||||||
|
|
||||||
const packDir = mkdtempSync(join(tmpdir(), "hyperframes-pack-"));
|
const packDir = mkdtempSync(join(tmpdir(), "hyperframes-pack-"));
|
||||||
|
|||||||
Reference in New Issue
Block a user