Skip to content

Commit

Permalink
Update the meta updater
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jan 23, 2025
1 parent 941ec23 commit 8aed933
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .meta-updater/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default () =>

if (pkg) {
const isPublished = !pkg.private;
const isRoot = pkg.name === 'glimmer-engine';

const scripts = /** @type { JsonObject } */ (actual.scripts ??= {});

Expand All @@ -30,20 +31,35 @@ export default () =>
// replaced with prepack
delete scripts['test:types'];

if (isPublished) {
const updateRepo = () => {
update(actual, 'repository', {
type: 'git',
url: 'git+https://github.com/glimmerjs/glimmer-vm.git',
directory: pkg.root,
...(pkg.root
? {
directory: pkg.root,
}
: {}),
});
};

if (isPublished) {
updateRepo();
update(publishConfig, 'access', 'public');
} else if (pkg['repo-meta']?.built) {
delete publishConfig['access'];
} else {
publishConfig = actual.publishConfig = {};

update(actual, 'version', repo.workspace.version);
delete actual.repository;
/**
* Needed for release automation
*/
if (isRoot) {
updateRepo();
} else {
delete actual.repository;
}
delete scripts['test:publint'];
cleanup(actual, 'publishConfig');
return actual;
Expand Down

0 comments on commit 8aed933

Please sign in to comment.