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

CI all green even if package.json is not in sync #1557

Closed
junedev opened this issue Dec 11, 2021 · 9 comments
Closed

CI all green even if package.json is not in sync #1557

junedev opened this issue Dec 11, 2021 · 9 comments
Assignees
Labels
bug 🐛 Something isn't working

Comments

@junedev
Copy link
Member

junedev commented Dec 11, 2021

We noticed the master got out of sync somehow and here in my PR #1476, the package.json is not in sync but the CI is all green nevertheless. If I run the sync command, I get a change for the package.json file.

cc @SleeplessByte @tejasbubane

@junedev junedev added the bug 🐛 Something isn't working label Dec 11, 2021
@junedev
Copy link
Member Author

junedev commented Dec 11, 2021

So this is the error message:

Checking integrity of concept/windowing-system/package.json...
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/javascript/javascript/node_modules/chalk/source/index.js from /home/runner/work/javascript/javascript/scripts/checksum not supported.
Instead change the require of index.js in /home/runner/work/javascript/javascript/scripts/checksum to a dynamic import() which is available in all CommonJS modules.
    at Object.newLoader [as .js] (/home/runner/work/javascript/javascript/node_modules/pirates/lib/index.js:104:7)
    at checksumAssignment (/home/runner/work/javascript/javascript/scripts/checksum:43:19)
    at /home/runner/work/javascript/javascript/scripts/checksum:105:14
    at Array.every (<anonymous>)
    at checksumAll (/home/runner/work/javascript/javascript/scripts/checksum:103:24)
    at Object.<anonymous> (/home/runner/work/javascript/javascript/scripts/checksum:126:1)
    at Object.newLoader [as .js] (/home/runner/work/javascript/javascript/node_modules/pirates/lib/index.js:104:7)
    at Object.<anonymous> (/home/runner/work/javascript/javascript/node_modules/@babel/node/lib/_babel-node.js:176:21) {
  code: 'ERR_REQUIRE_ESM'
}

But for some reason that does not fail the CI job.

The root cause is probably one of the dependabot updates that got merged.

@junedev junedev self-assigned this Dec 11, 2021
@junedev
Copy link
Member Author

junedev commented Dec 11, 2021

This is the cause: #1541 Chalk was updated to a new major version that only supports ESM now.

@junedev
Copy link
Member Author

junedev commented Dec 11, 2021

I am reverting the chalk version now as a quick fix but there are still other todos here:

  • Fix the issue that the CI script passed although there was an error.
  • Find a solution or at least discuss how we deal with this ESM vs. CommonJS mess that is currently going on.

@SleeplessByte
Copy link
Member

Yep. Your investigation is correct.

  • Downgrade chalk please
  • The ESM/CommonJS shit is a hot topic. If you check the Chalk repository, you'll see ;)
  • I'll also figure out how to actually make it blow up CI.

@junedev
Copy link
Member Author

junedev commented Dec 11, 2021

CI is fixed now, my PR correctly shows up as out of sync.
image

Judging by my twitter feed ESM/CommonJS is a hot topic in the whole ecosystem. But I didn't understand how to best deal with it for now.

@SleeplessByte
Copy link
Member

It's one of the things where I just hack around it too. I have a few projects with esm-only packages, so we can likely copy that configuration to make things work again. Feel free to pick that up if you want to, but otherwise I will get to it, before the year turns 2022.

@junedev junedev removed their assignment Dec 11, 2021
@junedev
Copy link
Member Author

junedev commented Dec 11, 2021

Would be great if you could take care of the rest of this issue. I just assigned myself for doing the quick fix.

@SleeplessByte
Copy link
Member

Yes!

@SleeplessByte
Copy link
Member

I don't think this is the case anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants