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

Use npm registry to check for new versions #1895

Merged
merged 2 commits into from
Apr 19, 2023
Merged

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Apr 14, 2023

Started to get 403 errors on the getLatestVersion check. This PR proposes to use the npm registry is the source of truth to check for new versions. It also proposes a CLI command instead of opening the installation docs

Screen.Recording.2023-04-14.at.17.13.52.mov

@Janpot Janpot added the core Infrastructure work going on behind the scenes label Apr 14, 2023
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 16, 2023
Copy link
Member

@apedroferreira apedroferreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!


export type PackageManager = 'npm' | 'yarn' | 'pnpm';

async function detectPackageManager() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

@Janpot Janpot Apr 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would only work if toolpad was started through a package manager script though, it's slightly different here, I'd like to find out what package manager was used to author their project. e.g. they may run npx @mui/toolpad on a project that was installed with yarn. We want to propose yarn in that case, not npm

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 19, 2023
@Janpot Janpot enabled auto-merge (squash) April 19, 2023 16:20
@Janpot Janpot merged commit f7136b9 into master Apr 19, 2023
@Janpot Janpot deleted the upgrade-version-check branch April 19, 2023 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants