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

Strictly define Node API #1514

Merged
merged 1 commit into from
Jul 19, 2022
Merged

Strictly define Node API #1514

merged 1 commit into from
Jul 19, 2022

Conversation

bmish
Copy link
Member

@bmish bmish commented Jul 14, 2022

This follows the lead of ESLint core and other ESLint plugins in strictly defining their Node API so that users cannot reach in and import/depend on arbitrary files inside the plugin.

  • https://eslint.org/docs/latest/user-guide/migrating-to-8.0.0#remove-lib

    Beginning in v8.0.0, ESLint is strictly defining its public API. Previously, you could reach into individual files such as require("eslint/lib/rules/semi") and this is no longer allowed. There are a limited number of existing APIs that are now available through the /use-at-your-own-risk entrypoint for backwards compatibility, but these APIs are not formally supported and may break or disappear at any point in time.

https://nodejs.org/api/packages.html#main-entry-point-export

The following change helps prepare for this:

Related change:

If anyone needs something that is no longer accessible, please file an issue to let us know and we can consider whether it's something that should be explicitly exported.

Part of v11 release (#1169).

@bmish bmish added the Breaking label Jul 14, 2022
@bmish bmish mentioned this pull request Jul 14, 2022
@bmish bmish changed the title breaking: strictly define Node API Strictly define Node API Jul 14, 2022
@bmish bmish merged commit 4fe0c58 into ember-cli:master Jul 19, 2022
bmish added a commit to bmish/eslint-plugin-ember that referenced this pull request Jul 19, 2022
* master:
  breaking: add no-array-prototype-extensions as recommended rule (ember-cli#1517)
  breaking: remove base config (ember-cli#1518)
  breaking: stop exporting non-Ember utils (ember-cli#1513)
  breaking: update `avoid-leaking-state-in-ember-objects` rule to augment instead of replace default config (ember-cli#1512)
  breaking: strictly define Node API (ember-cli#1514)
  breaking: enable useOptionalChaining on no-get rule (ember-cli#1519)
  Drop support for Node 10, 12, 15, 17 (ember-cli#1318)
bmish added a commit that referenced this pull request Jul 19, 2022
* master:
  breaking: add no-array-prototype-extensions as recommended rule (#1517)
  breaking: remove base config (#1518)
  breaking: stop exporting non-Ember utils (#1513)
  breaking: update `avoid-leaking-state-in-ember-objects` rule to augment instead of replace default config (#1512)
  breaking: strictly define Node API (#1514)
  breaking: enable useOptionalChaining on no-get rule (#1519)
  Drop support for Node 10, 12, 15, 17 (#1318)
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

2 participants