Skip to content

feat(node-resolve) Mark built-ins as external#1

Closed
tjenkinson wants to merge 47 commits intodo-not-ignore-exceptionsfrom
external-builtins
Closed

feat(node-resolve) Mark built-ins as external#1
tjenkinson wants to merge 47 commits intodo-not-ignore-exceptionsfrom
external-builtins

Conversation

@tjenkinson
Copy link
Owner

Rollup Plugin Name: node-resolve

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (updated)
  • no

Breaking Changes?

  • yes
  • no. Previously they would result in a rollup warning, so this is probably not breaking?

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

Description

This depends on from rollup#564.

I thought that if useBuiltins was true then any builtins would automatically be marked as external. This was not the case. This PR does that. Let me know if you think it doesn't make sense.

It also makes some of the docs a bit more accurate.

It seems a bit strange that some options (like jail) don't mark an import as external, but others (like resolveOnly and now preferBuiltins) do. I wonder if there is a reason or if we should make them consistent?

There is one commit that updates all the snapshots as I noticed when updating the ones for the tests I updated it changed them all because the ava domain in the comment changed.

tjenkinson and others added 25 commits September 6, 2020 16:35
* initial support for non-inlined wasm

* better document, fix output directory teardown

* run code in test instead of only asserting wasm is emitted

* fix formatting issue, add assertion

* doc clarification for non-inline files

* assert -> this.error

* limit -> maxFileSize

* use this.emitFile instead of manual copying

* switch to fs promise API
* fix(pluginutils): normalize pattern sep

* fix: missing quotes

* doc: normalizePath

* feat: normalizePath
…bject prototype (rollup#552)

* feat(commonjs): inject __esModule marker into ES namespaces

* docs(commonjs): improve documentation and update types

* feat(commonjs): Integrate into requireReturnsDefault option

* refactor(commonjs): add early exit for namespace augmentation
* feat(typescript): Add CustomTransformers support

* feat(typescript): Ensure compability with most existing transformers

* Added the ability to request a Program instance at transformer factory level
* Added the ability to request a TypeChecker instance at transformer factory level

* Better typings, testing

* Transformers will be a recognized configuration option from now on
* Better grouping of transformer types
* Object factories are forced to return a factory function (type-wise)
* Test: better illustration of object factories usage
* docs(replace): describe process.env.NODE_ENV case

Replacing process.env.NODE_ENV is the most popular case for this plugin. We should have it in readme.
See here ai/nanoid#236

* docs: add alternative values

Co-authored-by: Andrey Sitnik <andrey@sitnik.ru>

Co-authored-by: Andrew Powell <shellscape@users.noreply.github.com>
Co-authored-by: Andrey Sitnik <andrey@sitnik.ru>
* fix(node-resolve): resolve hash in path

* refact(node-resolve)!: remove special handling for hashes

See rollup#588 (comment)
…njsModule(...)` (rollup#602)

This happens when the code has an strong indicator for wrapping, like /__esModule/.test(code)
…llup#604)

BREAKING CHANGES: Raises minimal required Rollup version to 2.30.0
* refactor(commonjs): Refine logic for id wrapping, import transformation

* feat(commonjs): Pass type of import to node-resolve
* refact(wasm): use helper module instead of banner

* test(wasm): test inject helper logic
* fix(pluginutils): attach scope object to for-loop

* fix: types, add estree to devdependencies

* refactor: move estree import to the top
dummdidumm and others added 18 commits October 23, 2020 09:46
Co-authored-by: Simon Holthausen <simon.holthausen@accso.de>
* do not ignore errors

* do not error when import specifier does not map to file

* always swallow MODULE_NOT_FOUND errors

as not being able to resolve the id is a valid output

* return null from resolveId early if can't resolve

* strip null byte from importer if there is one

* fix root-dir test

this was passing before because the real error was being ignored

* remove try/catch

* use async exists() and realpath()

like we do in index.js

* pretend importer is `undefined` if it starts will \0

* return null if file not found with modulesOnly option
* Initial

* Add documentation

* Add npm files filter

* 1.0.0

* Clear dist folder

* Fix documentation

* 1.0.1

* Fix build

* 1.0.2

* Upgrade eslint

* 2.0.0

* Tidy up

* Return a name

* 2.0.2

* Upgrade to eslint 3

* Add buble back

* v3.0.0

* Add lockfile

* Move to jest

* Build with babel

* Upgrade dependencies

* Add throwOnError and throwOnWarnings options. Remove throwError option

* 4.0.0

* Document config file usage

Adds documentation on how to use a config file at project root, mentioned in TrySound/rollup-plugin-eslint#20.

* Update config file documentation

* Update README.md

* Remove node4 support and remove babel

* Add prettier

* Change api to named export

* Upgrade eslint

* Clean up gitignore

* 5.0.0

* Fix tests warning

* PR for optional config string

PR to allow a string to be passed for specific config files; primarily to allow different Rollup configs to have different linting rules.

* Fixed bug where .eslintrc files were still being used

* v5.1.0

* feat: options.fix can change files

* feat: add test case

* Upgrade dependencies and tests

* v6.0.0

* Fix travis

* Upgrade to ESLint 6.0.0

* v7.0.0

* Preparing move to rollup/plugins

* feat(eslint): fixed TrySound/rollup-plugin-eslint#38

* chore: update after review

* chore: lint readme

Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
Co-authored-by: Mark Brouch <mark.brouch@gmail.com>
Co-authored-by: Levi Roberts <bugs181@gmail.com>
Co-authored-by: frankieshen <frankieshen@tencent.com>
Co-authored-by: Shenfq <shenfq95@foxmail.com>
Co-authored-by: Stéphane Goetz <stephane.goetz@swissquote.ch>
Co-authored-by: shellscape <andrew@shellscape.org>
* chore(graphql): literally import @kocal/rollup-plugin-graphql

* chore(graphql): migrate plugin

* doc: list graphql and dynamic-import-vars plugins

* chore(graphql): use named export

Co-authored-by: shellscape <andrew@shellscape.org>
* fix(babel): strip query param in extension filter

* fix(babel): fix test

* test(babel): make test more robust
@tjenkinson tjenkinson closed this Nov 1, 2020
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.