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

fix(ruleset-migrator): resolve npm packages correctly #2022

Merged
merged 4 commits into from
Jan 25, 2022

Conversation

P0lip
Copy link
Contributor

@P0lip P0lip commented Jan 17, 2022

Fixes #2019

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

@P0lip P0lip self-assigned this Jan 17, 2022
@P0lip P0lip force-pushed the fix/ruleset-migrator/node-resolution branch from 59d873d to 9468469 Compare January 17, 2022 11:20
@P0lip P0lip force-pushed the fix/ruleset-migrator/node-resolution branch from 65ae608 to 5deeba8 Compare January 19, 2022 02:02
@P0lip P0lip added the t/bug Something isn't working label Jan 19, 2022
@P0lip P0lip marked this pull request as ready for review January 19, 2022 12:09
@P0lip P0lip requested a review from domagojk January 19, 2022 12:10
expect(isPackageImport(input)).toBe(true);
});

it.each(['', '/nimma/legacy', 'path', 'https://cdn.skypack.dev/@stoplight/spectral-core'])(
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth also adding spectral:oas as an example here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

could add it, though in reality isPackageImport is unlikely to ever receive stoplight:oas as it's being replaced with @stoplight/spectral-rulesets here https://github.com/stoplightio/spectral/blob/develop/packages/ruleset-migrator/src/transformers/extends.ts#L21

Copy link
Contributor

@domagojk domagojk left a comment

Choose a reason for hiding this comment

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

LGTM

@P0lip P0lip merged commit 843e47c into develop Jan 25, 2022
@P0lip P0lip deleted the fix/ruleset-migrator/node-resolution branch January 25, 2022 12:50
stoplight-bot pushed a commit that referenced this pull request Jan 26, 2022
# [@stoplight/spectral-ruleset-migrator-v1.7.2](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-ruleset-migrator-v1.7.1...@stoplight/spectral-ruleset-migrator-v1.7.2) (2022-01-26)

### Bug Fixes

* **ruleset-migrator:** resolve npm packages correctly ([#2022](#2022)) ([843e47c](843e47c))
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version @stoplight/spectral-ruleset-migrator-v1.7.2 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

jamietanna added a commit to jamietanna/spectral that referenced this pull request Jan 26, 2022
As noted in stoplightio#2022, the version pinning can only be done using
`package.json`s, not the `extends` rule.
jamietanna added a commit to jamietanna/spectral that referenced this pull request Jan 26, 2022
As noted in stoplightio#2022, the version pinning can only be done using
`package.json`s, not the `extends` rule.
jamietanna added a commit to jamietanna/spectral that referenced this pull request Jan 26, 2022
As noted in stoplightio#2022, the version pinning can only be done using
`package.json`s, not the `extends` rule.
jamietanna added a commit to jamietanna/spectral that referenced this pull request Jan 27, 2022
As noted in stoplightio#2022, the version pinning can only be done using
`package.json`s, not the `extends` rule.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released t/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spectral lint when using NPM-provided rulesets does not resolve rulesets
4 participants