Skip to content

Commit ee5cabf

Browse files
committed
update packer 0.10.1; less babel plugins; demo react 18;
1 parent 39a013e commit ee5cabf

15 files changed

+16923
-40255
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
packages/*/build
File renamed without changes.

.github/workflows/blank.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
5151
- name: Run tests
5252
run: |
53-
npm test
53+
npm run check
5454
5555
- name: Build
5656
run: |

babel.config.json

+1-14
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
"@babel/preset-typescript"
55
],
66
"plugins": [
7-
"@babel/plugin-syntax-dynamic-import",
8-
"@babel/plugin-transform-template-literals",
9-
"@babel/plugin-proposal-export-namespace-from",
10-
"@babel/plugin-proposal-export-default-from",
11-
"@babel/plugin-proposal-optional-chaining",
12-
"@babel/plugin-proposal-nullish-coalescing-operator",
137
[
148
"babel-plugin-named-asset-import",
159
{
@@ -19,14 +13,7 @@
1913
}
2014
}
2115
}
22-
],
23-
[
24-
"@babel/plugin-proposal-object-rest-spread",
25-
{
26-
"useBuiltIns": true
27-
}
28-
],
29-
"@babel/plugin-proposal-class-properties"
16+
]
3017
],
3118
"env": {
3219
"cjs": {

packages/jest.config.ts renamed to jest.config.ts

+24-20
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@ import type { Config } from '@jest/types'
22

33
const packages: string[] = ['kit-codemirror', 'material-code']
44

5-
const testMatchesLint: string[] = []
6-
7-
packages.forEach(pkg => {
8-
testMatchesLint.push(...[
9-
'<rootDir>/' + pkg + '/src/**/*.(js|ts|tsx)',
10-
'<rootDir>/' + pkg + '/tests/**/*.(test|spec|d).(js|ts|tsx)',
11-
])
12-
})
135
const base: Partial<Config.InitialOptions> = {
146
/*transformIgnorePatterns: [
157
'node_modules/?!(@ui-schema)',
@@ -18,8 +10,8 @@ const base: Partial<Config.InitialOptions> = {
1810
'^.+\\.tsx?$': 'ts-jest',
1911
},*/
2012
moduleNameMapper: {
21-
'^@ui-schema/material-code(.*)$': '<rootDir>/material-code/src$1',
22-
'^@ui-schema/kit-codemirror(.*)$': '<rootDir>/kit-codemirror/src$1',
13+
'^@ui-schema/material-code(.*)$': '<rootDir>/packages/material-code/src$1',
14+
'^@ui-schema/kit-codemirror(.*)$': '<rootDir>/packages/kit-codemirror/src$1',
2315
},
2416
moduleFileExtensions: [
2517
'ts',
@@ -31,6 +23,24 @@ const base: Partial<Config.InitialOptions> = {
3123
],
3224
coveragePathIgnorePatterns: [
3325
'(tests/.*.mock).(jsx?|tsx?|ts?|js?)$',
26+
'.*.(test|spec).(js|ts|tsx)$',
27+
'<rootDir>/packages/demo',
28+
],
29+
testPathIgnorePatterns: [
30+
'<rootDir>/dist',
31+
'<rootDir>/packages/.+/build',
32+
],
33+
watchPathIgnorePatterns: [
34+
'<rootDir>/.idea',
35+
'<rootDir>/.git',
36+
'<rootDir>/dist',
37+
'<rootDir>/node_modules',
38+
'<rootDir>/packages/.+/node_modules',
39+
'<rootDir>/packages/.+/build',
40+
],
41+
modulePathIgnorePatterns: [
42+
'<rootDir>/dist',
43+
'<rootDir>/packages/.+/build',
3444
],
3545
}
3646

@@ -46,26 +56,20 @@ const config: Config.InitialOptions = {
4656
...packages.map(pkg => ({
4757
displayName: 'test-' + pkg,
4858
...base,
49-
moduleDirectories: ['node_modules', '<rootDir>/' + pkg + '/node_modules'],
59+
moduleDirectories: ['node_modules', '<rootDir>/packages/' + pkg + '/node_modules'],
5060
//moduleDirectories: ['node_modules', '<rootDir>/ui-schema/node_modules', '<rootDir>/ds-material/node_modules'],
5161
// todo: check why `transformIgnorePatterns`, combined with multi-projects/lerna 0.5.3 upgrade, throws `TypeError: /node_modules/jest-runner-eslint/build/runner/index.js: node_modules/@ampproject/remapping/dist/remapping.umd.js: _remapping(...) is not a function`
5262
/*transformIgnorePatterns: [
5363
'node_modules/?!(@ui-schema)',
5464
],*/
5565
//testEnvironmentOptions: {},
5666
testMatch: [
57-
'<rootDir>/' + pkg + '/src/**/*.(test|spec).(js|ts|tsx)',
58-
'<rootDir>/' + pkg + '/tests/**/*.(test|spec).(js|ts|tsx)',
67+
'<rootDir>/packages/' + pkg + '/src/**/*.(test|spec).(js|ts|tsx)',
68+
'<rootDir>/packages/' + pkg + '/tests/**/*.(test|spec).(js|ts|tsx)',
5969
],
6070
})),
61-
{
62-
displayName: 'lint',
63-
runner: 'jest-runner-eslint',
64-
...base,
65-
testMatch: testMatchesLint,
66-
},
6771
],
68-
coverageDirectory: '<rootDir>/../coverage',
72+
coverageDirectory: '<rootDir>/coverage',
6973
}
7074

7175
export default config

0 commit comments

Comments
 (0)