Skip to content

Commit a52e439

Browse files
authored
Merge pull request #1525 from Jakub007d/npm-migration
chore: migration to npm
2 parents e40928f + 5f45da1 commit a52e439

File tree

39 files changed

+35359
-17467
lines changed

39 files changed

+35359
-17467
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
uses: actions/setup-node@v4
2626
with:
2727
node-version: '20'
28-
cache: 'yarn'
28+
cache: 'npm'
2929

3030
- name: Install dependencies
31-
run: yarn install --frozen-lockfile
31+
run: npm ci
3232

3333
- name: Derive appropriate SHAs for base and head for nx affected commands
3434
uses: nrwl/nx-set-shas@v4
@@ -48,7 +48,7 @@ jobs:
4848
continue-on-error: false
4949

5050
- name: Clear Jest cache
51-
run: yarn jest --clearCache
51+
run: npx jest --clearCache
5252

5353
- name: Run tests on affected projects
5454
run: npx nx affected --target=test --parallel=3 --coverage
@@ -71,11 +71,11 @@ jobs:
7171
uses: actions/setup-node@v4
7272
with:
7373
node-version: '20'
74-
cache: 'yarn'
74+
cache: 'npm'
7575
registry-url: 'https://registry.npmjs.org'
7676

7777
- name: Install dependencies
78-
run: yarn install --frozen-lockfile
78+
run: npm ci
7979

8080
- name: Derive appropriate SHAs for base and head for nx affected commands
8181
uses: nrwl/nx-set-shas@v4

config/jest.setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// eslint-disable-next-line no-unused-vars
2-
import '@testing-library/jest-dom/extend-expect';
2+
import '@testing-library/jest-dom';
33

44
Element.prototype.scrollTo = () => {};
55

jest.config.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
testEnvironment: 'jest-environment-jsdom',
3+
verbose: true,
4+
testPathIgnorePatterns: [
5+
'/node_modules/',
6+
'packages/suir-component-mapper/',
7+
'/.nx/'
8+
],
9+
setupFilesAfterEnv: [
10+
'<rootDir>/config/jest.setup.js'
11+
],
12+
collectCoverageFrom: [
13+
'<rootDir>/packages/**/src/**/*.js',
14+
'<rootDir>/packages/**/src/**/*.ts',
15+
'!<rootDir>/packages/**/src/**/*.d.ts',
16+
'!<rootDir>/packages/react-renderer-demo/**/*.js',
17+
'!<rootDir>/packages/suir-component-mapper/**/*.js',
18+
'!<rootDir>/packages/**/dist',
19+
'!<rootDir>/templates/**/*.js',
20+
'!<rootDir>/packages/**/src/**/index.js',
21+
'!<rootDir>/shared/**/*.js'
22+
],
23+
moduleNameMapper: {
24+
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
25+
'\\.(css|scss)$': 'identity-obj-proxy'
26+
},
27+
modulePathIgnorePatterns: [
28+
'<rootDir>/templates/',
29+
'<rootDir>/.nx/'
30+
],
31+
globalSetup: '<rootDir>/config/globalSetup.js'
32+
};

0 commit comments

Comments
 (0)