Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Publishing v7.x doesn't update latest dist-tags #10349

Open
bigtimebuddy opened this issue Mar 20, 2024 · 0 comments
Open

Bug: Publishing v7.x doesn't update latest dist-tags #10349

bigtimebuddy opened this issue Mar 20, 2024 · 0 comments

Comments

@bigtimebuddy
Copy link
Member

Current Behavior

When publishing v7.4.2, I noticed that the latest dist-tag didn't get updated (only latest-7.x). This created downstream issue. E.g., @pixi/node was using ^7.3.0, but it was still pulling 7.4.0. npm prioritizes the latest tag.

Expected Behavior

I just want to capture this issue so I will fix it later as part of the publishing process.

Steps to Reproduce

Publish v7.x by running the following and publish a GitHub Release:

npm run release

Environment

  • pixi.js version: e.g. 7.1.0
  • Browser & Version: e.g. Chrome 108
  • OS & Version: e.g. Ubuntu 22.04
  • Running Example: e.g. https://pixiplayground.com/

Possible Solution

This fixed the issue running locally in the repo.

import workspacesRun from "workspaces-run";
import { execSync } from 'child_process';
import rootPkg from './package.json' assert { type: 'json' };

async function main() {
    await workspacesRun.default({ cwd: process.cwd(), orderByDeps: true }, async (pkg) =>
    {
        if (!pkg.config.private && pkg.config.name !== 'pixi.js')
        {
            const cmd = `npm dist-tag add ${pkg.config.name}@${rootPkg.version} latest`;
            process.stdout.write(cmd + ' ... ');
            execSync(cmd, { stdio: 'inherit' });
            console.log('done.');
        }
    });
}

main();

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant