Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use tsx instead of ts-node, which is [broken on Node >20](TypeStrong/ts-node#2100). Before: ``` $ npm run sync-figma-to-tokens > sync-figma-to-tokens > ts-node-esm -P tsconfig.json src/sync_figma_to_tokens.ts TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/jyang/figma/variables-github-action-example/src/sync_figma_to_tokens.ts at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9) at defaultGetFormat (node:internal/modules/esm/get_format:203:36) at defaultLoad (node:internal/modules/esm/load:143:22) at async nextLoad (node:internal/modules/esm/hooks:866:22) at async nextLoad (node:internal/modules/esm/hooks:866:22) at async Hooks.load (node:internal/modules/esm/hooks:449:20) at async MessagePort.handleMessage (node:internal/modules/esm/worker:196:18) { code: 'ERR_UNKNOWN_FILE_EXTENSION' ``` After: ``` $ npm run sync-figma-to-tokens > sync-figma-to-tokens > tsx src/sync_figma_to_tokens.ts Wrote Primitives — Completed.Modern Theme.json Wrote Primitives — Completed.Brutal Theme.json Wrote Tokens — Completed.Light.json Wrote Tokens — Completed.Dark.json Wrote Product interactions — Completed.Default.json ✅ Tokens files have been written to the tokens_new directory ```
- Loading branch information