Skip to content

meta rollupVersion updated to from 2.70 to 2.78 #246

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Sanshain
Copy link

That's a widespread problem with compability nollup and actual versions of official rollup plugin (@rollup/plugin-node-resolve, @rollup/plugin-commonjs etc), for example with node-resolve v 15.2.3:

Error: Insufficient rollup version: "@rollup/plugin-node-resolve" requires at least [email protected] but found [email protected].

Most of them require at least 2.78.0 rollup version. I figered out that to solve this problem, it is quite to update version rollupVersion within lib/impl/PluginMeta.js file. After the fix nollup continues to interact perfectly with the newest at the moment versions of the plugins

@PepsRyuu
Copy link
Owner

Thanks for looking into this. What's the story with the source-map-fast? Is there some sort of issue with the dependency? Is there a scenario that reproduces the bug you faced with it?

@Sanshain
Copy link
Author

Sanshain commented Sep 2, 2024

source-map-fast

Thanks for looking into this. What's the story with the source-map-fast? Is there some sort of issue with the dependency? Is there a scenario that reproduces the bug you faced with it?

Hello! I faced with a trouble in an attempt to get to work together nollup and linaria (@linaria/rollup package via --force flag). It looked like this:

image

The trouble was - as I figured out - in 255 line of lib/util.js file inside source-map package:

image

The aRoot variable is undefined, but it used as if it exact string type! I've notived that developers of the sourcemap package don't use typescript and even jsdoc at all. So types lack makes very easy possibility to make a mistakes.

To avoid the problem I have forked nollup repository and tried to update source-map dependency. But despite plural updates implemented by source-map developers - it still had the problem. But now the trouble was moved into getURLType function:

function getURLType(url) {
  if (url[0] === "/") {
    if (url[1] === "/") return "scheme-relative";
    return "path-absolute";
  }

  return ABSOLUTE_SCHEME.test(url) ? "absolute" : "path-relative";
}

Above, the argument url may be undefined. Therefore it also leads to the same problem (but now it is attempt to get index on undefined).

I sent pull request three months ago, but it seems the problem still exists.

By the way I tried the same configuration with rollup and the error didn't throw - I don't aware why so.

But nevertheless, I am inclined to that the problem is not problem of nollup. I think it is a problem of source-map. However I needed to fix this trouble at moment,. So I solved it via fixed fork of the source-map (may be there is a better approach to solve this one, but I didn't guess it).

And I don't know if this will be useful for nollup as a project, but at least you will be aware that cases like this are possible.

2.70 -> 2.78

This fix I implemented with a goal of compatibility with latest versions of @rollup/plugin-node-resolve package (it works well for me)

PS:

Thank you for your project. You did a great job. I hope it will be alive, despite other popular projects.

@Sanshain Sanshain changed the title meta rollupVeriosn updated to from 2.70 to 2.78 meta rollupVersion updated to from 2.70 to 2.78 Sep 8, 2024
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.

2 participants