Skip to content

Commit

Permalink
fix: publish alias issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Dec 13, 2024
1 parent 993f7c3 commit 4a980fe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .changeset/small-trees-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"marko": patch
"@marko/compiler": patch
"@marko/runtime-tags": patch
"@marko/translator-interop-class-tags": patch
---

Fix publish alias issue.
4 changes: 2 additions & 2 deletions packages/compiler/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const config = {
* Allows configuring Marko to compile to different runtimes.
*/
translator: (() => {
const translatorReg = /^(?:@marko\/|marko-)(?:translator|runtime)-/;
const translatorReg = /^(?:@marko\/|marko-)runtime-/;
let translator;
let pkg;

Expand Down Expand Up @@ -93,7 +93,7 @@ const config = {
}
}

if (translator && translator.endsWith("runtime")) {
if (translator) {
translator += "/translator";
}

Expand Down
1 change: 1 addition & 0 deletions packages/runtime-class/src/translator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { analyzeStaticVDOM } from "./util/optimize-vdom-create";
export { optionalTaglibs, default as taglibs } from "./taglib";
export { entryBuilder as internalEntryBuilder } from "./util/add-dependencies";

export const preferAPI = "class";
export const analyze = {
Program: {
enter(program) {
Expand Down
4 changes: 3 additions & 1 deletion scripts/publish-alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ pkg.version = "6.0.0-" + pkg.version.replace(/^(0\.)+/, "");

try {
fs.writeFileSync(runtimeTagsPkgFile, JSON.stringify(pkg, null, 2) + "\n");
cp.execSync(`npm publish --tag next ./${relativeRuntimeTagsDir}`);
cp.execSync(
`node scripts/pkg-override && npm publish --tag next ./${relativeRuntimeTagsDir} && node scripts/pkg-override`,
);
} finally {
fs.writeFileSync(runtimeTagsPkgFile, originalPkgSource);
}

0 comments on commit 4a980fe

Please sign in to comment.