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

Drop Node.js 16 support and move to ESM #164

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Drop Node.js 16 support and move to ESM #164

wants to merge 18 commits into from

Conversation

marcomontalbano
Copy link
Owner

@marcomontalbano marcomontalbano commented Feb 27, 2024

Discussion #167

What's inside?

  • Drop Node.js 16 support
  • Move from CJS to ESM
  • Update all dependencies to latest major
  • Replace mocha and sinon with vitest
  • Update documentation and configuration samples

Breaking changes

This library is now pure ESM.

This change may seem significant, but for most users, it's likely to have minimal impact. If your project already uses type="module" in your package.json, you're good to go.

However, if your project hasn't yet made this transition, you'll need to rename your .figmaexportrc.js configuration file:

-  .figmaexportrc.js
+  .figmaexportrc.mjs

adjust the command you run:

figma-export use-config .figmaexportrc.mjs

and start using import foo from 'foo' instead of const foo = require('foo') to import the packages inside the .figmaexportrc.mjs. You can take a look at .figmaexportrc.example.js as an example.

@marcomontalbano marcomontalbano added this to the v6.0.0 milestone Feb 27, 2024
@marcomontalbano marcomontalbano changed the title Esm Move to ESM Mar 3, 2024
@marcomontalbano marcomontalbano added the PR: Breaking Changes ☄️ Only for pull request. Contains breaking changes label Mar 3, 2024
@marcomontalbano marcomontalbano self-assigned this Mar 3, 2024
@marcomontalbano marcomontalbano changed the title Move to ESM Drop Node.js 16 support and move to ESM Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Breaking Changes ☄️ Only for pull request. Contains breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant