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

8.0.0 -> 8.1.0 breaks with TypeError when using Rollup #291

Closed
Jason3S opened this issue Feb 25, 2023 · 4 comments
Closed

8.0.0 -> 8.1.0 breaks with TypeError when using Rollup #291

Jason3S opened this issue Feb 25, 2023 · 4 comments

Comments

@Jason3S
Copy link

Jason3S commented Feb 25, 2023

I'm not sure why upgrading to 8.1.0 breaks things. Or even why chalk would get included.

ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
                                                                          ^

TypeError: Cannot read properties of undefined (reading 'close')
cspell-lib link:../../../packages/cspell-lib
└─┬ cosmiconfig 8.1.0
  └─┬ parse-json 5.2.0
    └─┬ @babel/code-frame 7.18.6
      └─┬ @babel/highlight 7.18.6
        └── chalk 2.4.2
cspell-lib link:../../../packages/cspell-lib
└─┬ cosmiconfig 8.1.0
  └─┬ parse-json 5.2.0
    └─┬ @babel/code-frame 7.18.6
      └─┬ @babel/highlight 7.18.6
        └─┬ chalk 2.4.2
          └── ansi-styles 3.2.1
cspell-lib link:../../../packages/cspell-lib
└─┬ cosmiconfig 8.0.0
  └─┬ parse-json 5.2.0
    └─┬ @babel/code-frame 7.18.6
      └─┬ @babel/highlight 7.18.6
        └── chalk 2.4.2
cspell-lib link:../../../packages/cspell-lib
└─┬ cosmiconfig 8.0.0
  └─┬ parse-json 5.2.0
    └─┬ @babel/code-frame 7.18.6
      └─┬ @babel/highlight 7.18.6
        └─┬ chalk 2.4.2
          └── ansi-styles 3.2.1
@d-fischer
Copy link
Member

That's weird, there were no changes to any of the dependencies in package.json in 8.1.0.

Can you provide a full reproduction case (optimally just as a github repo I can easily clone and run to see the error) for this?

Jason3S added a commit to streetsidesoftware/cspell that referenced this issue Feb 25, 2023
@Jason3S
Copy link
Author

Jason3S commented Feb 26, 2023

@d-fischer
Copy link
Member

I tracked this down to a change in @rollup/plugin-commonjs. Version 23.0.4 works, everything past it does not. It seems to be due to this PR.

Please open an issue in rollup's repository.

If they refuse to fix this for some reason, the package having to adapt would probably be chalk or ansi-styles, not cosmiconfig.

@d-fischer d-fischer closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2023
@Jason3S
Copy link
Author

Jason3S commented Feb 27, 2023

@d-fischer,

Thank you for looking into it.

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

No branches or pull requests

2 participants