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-bundler): remove extraneous 'external dependency' warnings #2475

Merged

Conversation

billiegoose
Copy link
Member

@billiegoose billiegoose commented May 17, 2023

Fixes https://github.com/stoplightio/platform-internal/issues/16525

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

Screenshots

Before:
239012037-c8539711-0ebd-4293-baa6-04f604a4f3d5

After:
239021842-ef4fcd3b-f6db-4c56-af6a-5fbd4e408c04

Additional context

These warnings create noise in our DataDog logs for the api-design service.

@billiegoose billiegoose requested a review from a team as a code owner May 17, 2023 16:51
@billiegoose billiegoose self-assigned this May 17, 2023
@billiegoose billiegoose force-pushed the chore/no-more-external-dependency-warnings-when-bundling branch from ba80f3e to 476c982 Compare May 17, 2023 16:54
Copy link
Contributor

@P0lip P0lip left a comment

Choose a reason for hiding this comment

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

I think it's fine for now.
Ideally, we should perhaps allow custom external . This way we could also get rid of the option we pass here
image

FWIW, that warning might be actually valuable for some less advanced users of Spectral if they use Spectral programmatically and choose a wrong bundle target, etc.

The reason we can safely keep @stoplight/spectral- imports in our platform is that that ruleset is meant to be used either in Studio or CLI, so the bundling will happen again.
Otherwise, if you, say, have a web app and set node as a bundle target, the imports will be kept, but loading that code will fail.

@P0lip P0lip merged commit e791534 into develop May 17, 2023
8 checks passed
@P0lip P0lip deleted the chore/no-more-external-dependency-warnings-when-bundling branch May 17, 2023 17:18
stoplight-bot pushed a commit that referenced this pull request May 17, 2023
# [@stoplight/spectral-ruleset-bundler-v1.5.2](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-ruleset-bundler-v1.5.1...@stoplight/spectral-ruleset-bundler-v1.5.2) (2023-05-17)

### Bug Fixes

* **ruleset-bundler:** remove extraneous 'external dependency' warnings ([#2475](#2475)) ([e791534](e791534))
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version @stoplight/spectral-ruleset-bundler-v1.5.2 🎉

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

Your semantic-release bot 📦🚀

stoplight-bot pushed a commit that referenced this pull request May 23, 2023
# [6.7.0](v6.6.0...v6.7.0) (2023-05-23)

### Bug Fixes

* **core:** improve deep ruleset inheritance ([#2326](#2326)) ([378b4b8](378b4b8))
* **core:** more accurate ruleset error paths ([66b3ca7](66b3ca7))
* **core:** reset path in fn context ([#2389](#2389)) ([3d47ec4](3d47ec4))
* **ref-resolver:** bump @stoplight/json-ref-resolver from ~3.1.4 to ~3.1.5 ([#3635](https://github.com/stoplightio/spectral/issues/3635)) ([215ae93](215ae93))
* **ruleset-bundler:** defaults should be last one ([#2403](#2403)) ([8780cfa](8780cfa))
* **ruleset-bundler:** remove extraneous 'external dependency' warnings ([#2475](#2475)) ([e791534](e791534))
* **ruleset-migrator:** avoid positive lookbehinds ([#2349](#2349)) ([455c324](455c324))
* **ruleset-migrator:** transform functions under overrides ([#2459](#2459)) ([45e817f](45e817f))
* **ruleset-migrator:** use module for require.resolve ([#2405](#2405)) ([d7c0fa4](d7c0fa4))
* **rulesets:** avoid false errors from ajv ([#2408](#2408)) ([92dab78](92dab78))
* **rulesets:** length.min said "must not be longer than" ([#2355](#2355)) ([df3b6f9](df3b6f9))

### Features

* **core:** relax formats validation ([#2151](#2151)) ([de16b4c](de16b4c))
* **core:** support end-user extensions in the rule definitions ([#2345](#2345)) ([365fced](365fced))
* **core:** support x- extensions in the ruleset ([#2440](#2440)) ([964151e](964151e))
* **formats:** support AsyncAPI 2.6.0 ([#2391](#2391)) ([b8e51b4](b8e51b4))
* **formatters:** move formatters to a separate package ([#2468](#2468)) ([664e259](664e259))
* **rulesets:** add traits array path to headers rule ([#2460](#2460)) ([9ceabca](9ceabca))
* **rulesets:** support AsyncAPI 2.6.0 ([#2391](#2391)) ([94a7801](94a7801))
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 6.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@stoplightio stoplightio deleted a comment from stoplight-bot Jul 6, 2023
@stoplightio stoplightio deleted a comment from stoplight-bot Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants