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

feat: initial support for upgrading packages in devtools #134

Merged
merged 7 commits into from
Mar 20, 2023

Conversation

antfu
Copy link
Member

@antfu antfu commented Mar 16, 2023

No description provided.

import { readPackageJSON } from 'pkg-types'
import semver from 'semver'
import { version as devToolsVersion } from '../../package.json'
import type { UpdateInfo } from '../types'
import { getPackageInfo } from 'local-pkg'
Copy link
Member

Choose a reason for hiding this comment

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

Would it be helpful if we expose such utility from nypm? (i also probably need it also for both CLI and layer handling dep-resolution)

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd be happy to! One caveat is that in local-pkg, I manually wrote the code for CJS and ESM separately, as the resolution algorithms are a bit different. Which means it can not be bundled. Not sure if we could find a better isomorphic solution, otherwise are you considering this acceptable?

Copy link
Member

Choose a reason for hiding this comment

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

Sure. Let me check local-pkg and be back to you. Have you tried mlly.resolvePath with conditions?

@antfu antfu changed the title feat: upgrade packages in devtools feat: initial support for upgrading packages in devtools Mar 20, 2023
@antfu antfu marked this pull request as ready for review March 20, 2023 09:11
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

Successfully merging this pull request may close these issues.

2 participants