Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Conversation

@NMinhNguyen
Copy link
Contributor

The null character \0 seems to have first been introduced by d169da1.

Fixes #197

@NMinhNguyen
Copy link
Contributor Author

Question: running npm install results in the following change to package-lock.json, but I wasn't sure if I should commit that too?

- "version": "4.0.0-beta.1",
+ "version": "4.0.0-beta.2",

@Andarist
Copy link
Member

You have mentioned that you would like to setup an integration test for this - is this still your intent? Could you also share a repository with the issue reproduced?

Question: running npm install results in the following change to package-lock.json, but I wasn't sure if I should commit that too?

Also not sure 😜 I guess yes, just add it to the commit and we'll decide before merging this in

@NMinhNguyen
Copy link
Contributor Author

@Andarist My bad, I just wanted to get the PR ready before 😜But I was working on the repro, and here it is: https://github.com/NMinhNguyen/rollup-plugin-babel-null-convention. Integration test may be a little harder/take more time though!

The null character `\0` seems to have first been introduced by d169da1.

Fixes #197
@NMinhNguyen
Copy link
Contributor Author

NMinhNguyen commented Mar 16, 2018

So I have my first stab at an integration test here. It does depend on rollup-plugin-node-resolve@^2.1.1 and the test does fail if you remove the \0 from the helper name. I dug into this a little more, and it appears that rollup-plugin-node-resolve@^3.2.0 works because of this breaking change in v3, especially https://github.com/rollup/rollup-plugin-node-resolve/pull/90/files?w=1#diff-1fdf421c05c1140f6d71444ea2b27638L74:

-						if ( err ) {
-							if ( skip === true ) accept( false );
-							else reject( Error( `Could not resolve '${importee}' from ${normalize( importer )}` ) );
-						} else {

Interestingly, in the screenshot below, you can see that resolveId still returns an error, but due to the different branching logic in v3, the promise ends up being resolved with undefined:

image

@Andarist, could you perhaps help reproduce the issue you were experiencing with acorn? And lastly, the reason I'm not so keen on upgrading to v3 in my project is because of the several issues reported in that PR around the removal of skip option: rollup/rollup-plugin-node-resolve#90, as well as rollup/rollup-plugin-node-resolve#72

@Andarist
Copy link
Member

Andarist commented Mar 19, 2018

Cannot reproduce my previous issue with acorn.

Thanks for the report, report and explaining the issue. Good work!

@Andarist Andarist merged commit 2e8fecd into rollup:master Mar 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants