Skip to content

Commit 6261f24

Browse files
committed
fix: updated TypeScript configuration for better source map handling
1 parent 6214590 commit 6261f24

File tree

8 files changed

+3286
-2880
lines changed

8 files changed

+3286
-2880
lines changed

.fatherrc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ export default defineConfig({
55
umd: { entry: 'src', output: 'umd' },
66
sourcemap: true,
77
targets: { chrome: 80 },
8-
plugins: ['./scripts/legacy-mode.ts'],
8+
plugins: ['./scripts/plugin-legacy-mode.ts'],
99
});

.github/workflows/reusable-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: npm ci
3434

3535
- name: Run tests
36-
run: npm run jest
36+
run: npm run task:jest
3737

3838
# Run legacy tests on multiple matrix Node.js versions
3939
run-tests-legacy-node13:
@@ -65,7 +65,7 @@ jobs:
6565
run: npm run ts2lib
6666

6767
- name: Run tests
68-
run: npm run jest:legacy
68+
run: npm run task:jest:legacy
6969

7070
# Run legacy tests on multiple matrix Node.js versions
7171
run-tests-legacy-node15:
@@ -97,7 +97,7 @@ jobs:
9797
run: npm run ts2lib
9898

9999
- name: Run tests
100-
run: npm run jest:legacy
100+
run: npm run task:jest:legacy
101101

102102
# Run tests on multiple matrix Node.js versions
103103
run-tests-modern-nodes:
@@ -125,7 +125,7 @@ jobs:
125125
node-version: ${{ matrix.node-version }}
126126

127127
- name: Run tests
128-
run: npm run jest
128+
run: npm run task:jest
129129

130130
# This job is used to run tests on legacy Node.js versions
131131
# 1. Use default Node.js

jest-legacy.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ module.exports = {
55
preset: 'ts-jest',
66
testEnvironment: 'node',
77
testMatch: ['<rootDir>/tslib/test/**/*.{spec,test}.js'],
8-
setupFiles: ['./tslib/test/jest.setup.js'],
8+
setupFilesAfterEnv: ['<rootDir>/tslib/test/jest.setup.js'],
99
collectCoverage: true,
10-
collectCoverageFrom: ['tslib/src/**/*.js'],
11-
coveragePathIgnorePatterns: ['tslib/src/types.js'],
10+
collectCoverageFrom: ['<rootDir>/lib/**/*.js'],
11+
coveragePathIgnorePatterns: ['<rootDir>/lib/types.js'],
1212
moduleNameMapper: {
13-
'^@enum-plus': '<rootDir>/tslib/src',
14-
'^@enum-plus/(.*)$': '<rootDir>/tslib/src/$1',
13+
'^@enum-plus': '<rootDir>/lib',
14+
'^@enum-plus/(.*)$': '<rootDir>/lib/$1',
1515
},
1616
};

0 commit comments

Comments
 (0)