Update sdk to v2 #4477
node.js.yml
on: pull_request
Create Package
2m 52s
Tests
2m 5s
Test coverage
2m 57s
Cypress
3m 17s
Performance
4m 8s
Annotations
6 errors and 1 warning
Tests
@tokens-studio/figma-plugin#test: command (/home/runner/work/figma-plugin/figma-plugin/packages/tokens-studio-for-figma) yarn run test exited (1)
|
Tests
Process completed with exit code 1.
|
Create Package
@tokens-studio/figma-plugin#build: command (/home/runner/work/figma-plugin/figma-plugin/packages/tokens-studio-for-figma) yarn run build exited (2)
|
Create Package
Process completed with exit code 2.
|
Test coverage
Error: Command failed: cd packages/tokens-studio-for-figma && npm run test:coverage:ci && cd ../.. && mv packages/tokens-studio-for-figma/coverage-summary.json coverage-summary.json
npm warn config ignoring workspace config at /home/runner/work/figma-plugin/figma-plugin/packages/tokens-studio-for-figma/.npmrc
npm warn config ignoring workspace config at /home/runner/work/figma-plugin/figma-plugin/packages/tokens-studio-for-figma/.npmrc
npm warn config ignoring workspace config at /home/runner/work/figma-plugin/figma-plugin/packages/tokens-studio-for-figma/.npmrc
● Test suite failed to run
Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
By default "node_modules" folder is ignored by transformers.
Here's what you can do:
• If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
• If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/configuration
For information about custom transformations, see:
https://jestjs.io/docs/code-transformation
Details:
/home/runner/work/figma-plugin/figma-plugin/node_modules/@tokens-studio/sdk/dist/index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export * from './api/index.js';
^^^^^^
SyntaxError: Unexpected token 'export'
> 1 | import {
| ^
2 | ThemeGroup, TokenSetType, TokensSet, create,
3 | } from '@tokens-studio/sdk';
4 | import * as Sentry from '@sentry/react';
at Runtime.createScriptFromCode (../../node_modules/jest-runtime/build/index.js:1505:14)
at Object.<anonymous> (src/storage/TokensStudioTokenStorage.ts:1:1)
at Object.<anonymous> (src/app/store/providers/tokens-studio/tokensStudio.tsx:18:1)
at Object.<anonymous> (src/app/store/providers/tokens-studio/index.ts:1:1)
at Object.<anonymous> (src/app/store/models/tokenState.tsx:44:1)
at Object.<anonymous> (src/app/store/models/index.tsx:3:1)
at Object.<anonymous> (src/app/store/models/tokenState.test.ts:3:1)
● Test suite failed to run
Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
By default "node_modules" folder is ignored by transformers.
Here's what you can do:
• If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
• If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https
|
Cypress
The process '/opt/hostedtoolcache/node/18.20.5/x64/bin/npm' failed with exit code 2
|
Tests
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|