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: detect version information from node_modules for pnpm’s catalog #1063

Merged
merged 2 commits into from
Feb 23, 2025

Conversation

baseballyama
Copy link
Member

@baseballyama baseballyama commented Feb 9, 2025

I noticed this issue while using pnpm catalog in our project.

@baseballyama baseballyama changed the title feat: Detect version information from node_modules when not specified in package.json, like pnpm’s catalog feat: detect version information from node_modules when not specified in package.json, like pnpm’s catalog Feb 9, 2025
@baseballyama baseballyama force-pushed the feat/support-pnpm-catalog branch from dc10495 to 173b5be Compare February 9, 2025 10:40
Copy link
Contributor

github-actions bot commented Feb 9, 2025

Try the Instant Preview in Online Playground

ESLint Online Playground

Install the Instant Preview to Your Local

npm i https://pkg.pr.new/eslint-plugin-svelte@1063

Published Instant Preview Packages:

View Commit

@baseballyama baseballyama marked this pull request as draft February 9, 2025 11:31
@baseballyama baseballyama force-pushed the feat/support-pnpm-catalog branch from 173b5be to 3510a29 Compare February 9, 2025 11:34
Copy link

changeset-bot bot commented Feb 9, 2025

🦋 Changeset detected

Latest commit: 42100df

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-svelte Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@baseballyama baseballyama force-pushed the feat/support-pnpm-catalog branch from 3510a29 to 74a3f23 Compare February 9, 2025 11:56
@baseballyama baseballyama marked this pull request as ready for review February 9, 2025 11:56
@baseballyama
Copy link
Member Author

I have confirmed that it works correctly in my project using pnpm catalog.

@baseballyama baseballyama changed the title feat: detect version information from node_modules when not specified in package.json, like pnpm’s catalog feat: detect version information from node_modules for pnpm’s catalog Feb 9, 2025
@ota-meshi
Copy link
Member

I just realized, how about getting the version like this:

import  {VERSION} from "svelte/compiler"

I think it will also work with Svelte v3.

@baseballyama
Copy link
Member Author

import {VERSION} from "svelte/compiler"

I can’t believe it. How did I overlook this until now 😇. I have confirmed that this works even with the 5.0.0-next version.
https://www.npmjs.com/package/svelte/v/5.0.0-next.272?activeTab=code

@baseballyama
Copy link
Member Author

I updated the PR according to your suggegstion.

@baseballyama baseballyama merged commit d39c90c into main Feb 23, 2025
17 checks passed
@baseballyama baseballyama deleted the feat/support-pnpm-catalog branch February 23, 2025 13:04
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