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

fix(ci): DeprecationWarning in yarn_custom_checks #3309

Merged

Conversation

aldousalvarez
Copy link
Contributor

@aldousalvarez aldousalvarez commented Jun 11, 2024

Commit to be reviewed


fix(ci): DeprecationWarning in yarn_custom_checks

Primary Changes
----------------
1. Updated the main field to use index.js to fix the Deprecation Warning

Fixes #2956

Pull Request Requirements

  • Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
  • Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
  • Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

  • Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
  • Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@aldousalvarez

Could you please try to create yarn patches for the affected dependencies? https://yarnpkg.com/cli/patch

For example I manually edited this file:

examples/cactus-example-carbon-accounting-frontend/node_modules/@ionic-native/status-bar/package.json

By replacing this

"main":"bundle.js",

with this:

"main":"./ngx/bundle.js",

And the warning went away, so I'm thinking if you created yarn patches for all the ones with the warnings then we could get it done all the way through.

@aldousalvarez
Copy link
Contributor Author

@aldousalvarez

Could you please try to create yarn patches for the affected dependencies? https://yarnpkg.com/cli/patch

For example I manually edited this file:

examples/cactus-example-carbon-accounting-frontend/node_modules/@ionic-native/status-bar/package.json

By replacing this

"main":"bundle.js",

with this:

"main":"./ngx/bundle.js",

And the warning went away, so I'm thinking if you created yarn patches for all the ones with the warnings then we could get it done all the way through.

@petermetz I have tried using the yarn patches and it worked but when I try to run yarn run configure I get this

lerna-lite ERR! Error: Unsupported URL Type "patch:": patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch
lerna-lite ERR!     at unsupportedURLType (/home/dous/cactus/node_modules/npm-package-arg/lib/npa.js:310:15)
lerna-lite ERR!     at fromURL (/home/dous/cactus/node_modules/npm-package-arg/lib/npa.js:367:13)
lerna-lite ERR!     at Function.resolve (/home/dous/cactus/node_modules/npm-package-arg/lib/npa.js:83:12)
lerna-lite ERR!     at file:///home/dous/cactus/node_modules/@lerna-lite/core/dist/package-graph/package-graph.js:45:38
lerna-lite ERR!     at Array.forEach (<anonymous>)
lerna-lite ERR!     at file:///home/dous/cactus/node_modules/@lerna-lite/core/dist/package-graph/package-graph.js:30:44
lerna-lite ERR!     at PackageGraph.forEach (<anonymous>)
lerna-lite ERR!     at new PackageGraph (file:///home/dous/cactus/node_modules/@lerna-lite/core/dist/package-graph/package-graph.js:26:14)
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^
            
Error: Unsupported URL Type "patch:": patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch
    at unsupportedURLType (/home/dous/cactus/node_modules/npm-package-arg/lib/npa.js:310:15)
    at fromURL (/home/dous/cactus/node_modules/npm-package-arg/lib/npa.js:367:13)
    at Function.resolve (/home/dous/cactus/node_modules/npm-package-arg/lib/npa.js:83:12)
    at file:///home/dous/cactus/node_modules/@lerna-lite/core/dist/package-graph/package-graph.js:45:38
    at Array.forEach (<anonymous>)
    at file:///home/dous/cactus/node_modules/@lerna-lite/core/dist/package-graph/package-graph.js:30:44
    at PackageGraph.forEach (<anonymous>)
    at new PackageGraph (file:///home/dous/cactus/node_modules/@lerna-lite/core/dist/package-graph/package-graph.js:26:14)
    at file:///home/dous/cactus/node_modules/@lerna-lite/core/dist/command.js:187:37 {
  code: 'EUNSUPPORTEDPROTOCOL'
}

Node.js v20.11.1
ERROR: "build:dev:backend:postbuild" exited with 1.

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@aldousalvarez Alright, I investigated this a little further and it's going to need a bigger change in a different PR so for now let's just merge this as-is and I'll send another with the rest of the warnings. LGTM, thank you!

@petermetz petermetz force-pushed the aldousalvarez/issue2956 branch from 53d0b3d to 41aa579 Compare July 5, 2024 17:59
Primary Changes
----------------
1. Updated the main field to use index.js to fix the Deprecation Warning

Peter's Fixes:
----------------
1. I fixed the file paths in the require statements to match the new location
after we've remapped the bundle location in the package.json files.

Fixes hyperledger-cacti#2956

Co-Authored-by: Peter Somogyvari <[email protected]>

Signed-off-by: aldousalvarez <[email protected]>
Signed-off-by: Peter Somogyvari <[email protected]>
@petermetz petermetz force-pushed the aldousalvarez/issue2956 branch from 41aa579 to 96a3865 Compare July 5, 2024 18:36
@petermetz petermetz merged commit 96a3865 into hyperledger-cacti:main Jul 5, 2024
147 of 150 checks passed
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.

fix(ci): DeprecationWarning in yarn_custom_checks
3 participants