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

Bump the version of @babel/helper-create-regexp-features-plugin #3363

Merged
merged 2 commits into from May 17, 2023

Conversation

mayorova
Copy link
Contributor

@mayorova mayorova commented May 16, 2023

What this PR does / why we need it:

The latest builds fail with the following error (one per each JS pack):

ERROR in ./app/javascript/packs/active_docs.ts
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: /opt/system/app/javascript/packs/active_docs.ts: Invalid Version: 70001900000
    at new SemVer (/opt/system/node_modules/semver/semver.js:314:11)
    at compare (/opt/system/node_modules/semver/semver.js:647:10)
    at Function.lt (/opt/system/node_modules/semver/semver.js:688:10)
    at PluginPass.pre (/opt/system/node_modules/@babel/plugin-transform-named-capturing-groups-regex/node_modules/@babel/helper-create-regexp-features-plugin/lib/index.js:55:44)
    at transformFile (/opt/system/node_modules/@babel/core/lib/transformation/index.js:73:27)
    at transformFile.next (<anonymous>)
    at run (/opt/system/node_modules/@babel/core/lib/transformation/index.js:24:12)
    at run.next (<anonymous>)
    at transform (/opt/system/node_modules/@babel/core/lib/transform.js:22:41)
    at transform.next (<anonymous>)
    at step (/opt/system/node_modules/gensync/index.js:261:32)
    at /opt/system/node_modules/gensync/index.js:273:13
    at async.call.result.err.err (/opt/system/node_modules/gensync/index.js:223:11)
    at /opt/system/node_modules/gensync/index.js:189:28
    at /opt/system/node_modules/@babel/core/lib/gensync-utils/async.js:68:7
    at /opt/system/node_modules/gensync/index.js:113:33
    at step (/opt/system/node_modules/gensync/index.js:287:14)
    at /opt/system/node_modules/gensync/index.js:273:13
    at async.call.result.err.err (/opt/system/node_modules/gensync/index.js:223:11)

This started happening after upgrading Babel: #3340

The issues seems to be a bug in Babel introduced here. The issue was reported and fixed in v7.21.8.

This version of @babel/core was already used in latest porta, but the package @babel/helper-create-regexp-features-plugin which is the one that has the fix, was still resolved to an older version.

This PR just updates the yarn.lock file.

Generated as follows:

yarn upgrade --recursive @babel/helper-create-regexp-features-plugin
npx yarn-deduplicate

Which issue(s) this PR fixes

-none-

Verification steps

Build the image and make sure the process completes successfully:

podman build -f openshift/system/Dockerfile --tag porta-image .

Special notes for your reviewer:

@josemigallas had this issue before, but it looked like it was resolved by adding .browserlistrc (see https://stackoverflow.com/questions/76162569/babel-error-invalid-version-70001900000/76172109). I think it was probably just a coincidence, as it doesn't seem related.

This version bump also upgraded eslint-plugin-react from 7.31.7 to 7.32.2 which added new rules, e.g. react/no-object-type-as-default-prop, and some issues reported by this rule are also fixed in this PR.
https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md#added-1

akostadinov
akostadinov previously approved these changes May 16, 2023
Copy link
Contributor

@akostadinov akostadinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how 1k lines were removed from the file but I like it.

@mayorova mayorova merged commit cd33004 into master May 17, 2023
17 of 21 checks passed
@mayorova mayorova deleted the upgrade-babel-dependencies branch May 17, 2023 10:40
/**
* Represents the user's permissions form, also known as Administrative. It handles the user's Role and their access to different Services.
* @param {InitialState} initialState - The values of the user's current settings.
* @param {State} initialState - The values of the user's current settings.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation was missed here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True... I don't like the original indentations anyway 🙃
But good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants