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: Update version replace script to ESM #404

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

OndraM
Copy link
Member

@OndraM OndraM commented Jan 9, 2025

To fix

$ ts-node scripts/readme-replace-version.ts
TypeError: Unknown file extension ".ts" for readme-replace-version.ts
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:183:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:209:36)
    at defaultLoad (node:internal/modules/esm/load:116:22)
    at async ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:483:32)
    at async ModuleJob._link (node:internal/modules/esm/module_job:115:19) {
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

@OndraM OndraM requested a review from literat as a code owner January 9, 2025 15:18
@github-actions github-actions bot added the maintenance Changes to the build process or auxilary tools and libraries or other maintenance label Jan 9, 2025
Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for cookie-consent-manager ready!

Name Link
🔨 Latest commit 9e1bd14
🔍 Latest deploy log https://app.netlify.com/sites/cookie-consent-manager/deploys/678102f306b5aa0008ea65c1
😎 Deploy Preview https://deploy-preview-404--cookie-consent-manager.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.

@OndraM OndraM force-pushed the chore/replace-script-update branch from 87b766d to cffbadf Compare January 9, 2025 15:21
Copy link
Collaborator

@literat literat left a comment

Choose a reason for hiding this comment

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

I have switched ts-node for tsx - https://tsx.is/, so you will have better DX with executing TypeScript scripts (do not care if CJS or ESM).

@OndraM
Copy link
Member Author

OndraM commented Jan 10, 2025

I have switched ts-node for tsx - https://tsx.is/, so you will have better DX with executing TypeScript scripts (do not care if CJS or ESM).

Cool, thanks. It looks definitely better.

BTW it is always great to see how many ways to achieve such simple task as running a file there is in JavaScript ecosystem :-D

@OndraM OndraM force-pushed the chore/replace-script-update branch from 0845504 to 9e1bd14 Compare January 10, 2025 11:22
@OndraM OndraM merged commit 970d6ac into release/v3 Jan 10, 2025
12 checks passed
@OndraM OndraM deleted the chore/replace-script-update branch January 10, 2025 11:23
@literat
Copy link
Collaborator

literat commented Jan 10, 2025

BTW it is always great to see how many ways to achieve such simple task as running a file there is in JavaScript ecosystem :-D

The world is evolving 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Changes to the build process or auxilary tools and libraries or other maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants