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

chore: swap assert syntax with 'with' to accommodate Node >=22 #18236

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

annawen1
Copy link
Member

@annawen1 annawen1 commented Dec 10, 2024

When running the web-components build on Node v23, the following line errors out

import * as packageJson from '../package.json' assert { type: 'json' };

due to the "import assertions" no longer being supported. Fix is to use with instead. This will break in older Node versions like 16 || 17, but that doesn't matter as we specify Carbon needs >=18.

Changelog

Changed

  • swap assert keyword with with

Testing / Reviewing

See that the ci-checks, especially the build, pass

@annawen1 annawen1 requested a review from a team as a code owner December 10, 2024 14:53
@annawen1 annawen1 changed the title chore: swap assert syntax with 'with' to accommodate Node >22 chore: swap assert syntax with 'with' to accommodate Node >=22 Dec 10, 2024
Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit f72b3b0
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/6758adf5c5ab020008a68877
😎 Deploy Preview https://deploy-preview-18236--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit f72b3b0
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6758adf59bd8540008a6d8f3
😎 Deploy Preview https://deploy-preview-18236--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit f72b3b0
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6758adf53570910008bdcd64
😎 Deploy Preview https://deploy-preview-18236--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.16%. Comparing base (a022b9a) to head (f72b3b0).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #18236   +/-   ##
=======================================
  Coverage   84.16%   84.16%           
=======================================
  Files         404      404           
  Lines       14350    14350           
  Branches     4619     4649   +30     
=======================================
  Hits        12077    12077           
  Misses       2111     2111           
  Partials      162      162           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Gururajj77 Gururajj77 left a comment

Choose a reason for hiding this comment

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

Works with node 23 🚀

@annawen1 annawen1 enabled auto-merge December 11, 2024 14:28
@annawen1 annawen1 added this pull request to the merge queue Dec 11, 2024
Merged via the queue into carbon-design-system:main with commit 5b3df41 Dec 11, 2024
37 checks passed
@annawen1 annawen1 deleted the fix/change-assert-syntax branch December 11, 2024 14:50
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.

5 participants