Skip to content

Commit 8ba45d9

Browse files
author
@compulim
committed
Bump scaffold
1 parent a4b61d2 commit 8ba45d9

File tree

9 files changed

+18
-12
lines changed

9 files changed

+18
-12
lines changed

.eslintrc.test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
env:
2+
commonjs: true
3+
es2021: true
4+
es2022: true
5+
jest: true
6+
rules:
7+
# Disable for convenience
8+
react/display-name: off
9+
# Disable for convenience
10+
react/prop-types: off
11+
'@typescript-eslint/no-require-imports': off

.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ overrides:
1111
- '**/*.mts'
1212
- '**/*.ts'
1313
- '**/*.tsx'
14-
- extends: .eslintrc.jest.yml
14+
- extends: .eslintrc.test.yml
1515
files:
1616
- '**/__tests__/**'
1717
- '**/*.spec.cjs'

packages/integration-test/jest.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"testMatch": ["**/__tests__/**/*.?([cm])[jt]s?(x)", "**/?(*.)+(spec|test).?([cm])[jt]s?(x)"],
33
"transform": {
4-
"\\.c?jsx?$": [
4+
"\\.cjsx?$": [
55
"babel-jest",
66
{
77
"presets": [

packages/integration-test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"precommit": "ESLINT_USE_FLAT_CONFIG=false eslint --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts ./",
1414
"pretest": "if test \"$CI\" = \"true\"; then npm run build; npm run docker -- --detach --wait; fi",
1515
"switch": "cat package.json | jq --arg SWITCH_NAME $SWITCH_NAME -r '(.[\"switch:\" + $SWITCH_NAME] // {}) as $TEMPLATE | .devDependencies += ($TEMPLATE.devDependencies // {}) | .dependencies += ($TEMPLATE.dependencies // {})' | tee ./package.json.tmp && mv ./package.json.tmp ./package.json",
16-
"test": "jest"
16+
"test": "node --import ./happy-dom-env.ts --test ${CI:---watch} **/*.{spec,test}.{[jt]s,[jt]sx,c[jt]s,m[jt]s}"
1717
},
1818
"author": "William Wong (https://github.com/compulim)",
1919
"license": "MIT",
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
{
2-
"compilerOptions": {
3-
"jsx": "react"
4-
},
52
"extends": "@tsconfig/strictest/tsconfig.json"
63
}

packages/pages/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"private": true,
66
"scripts": {
7-
"build": "esbuild --alias:react=./src/react.cjs --bundle --entry-names=[name]/[ext]/main --format=esm --jsx=automatic --minify --outdir=./public/static/ --sourcemap app=./src/app2/index.tsx react-chain-of-responsibility=./src/bundle.ts react-chain-of-responsibility-preview=./src/bundle.preview.ts",
7+
"build": "esbuild --bundle --entry-names=[name]/[ext]/main --jsx=transform --minify --outdir=./public/static/ --sourcemap app=./src/app/index.tsx",
88
"bump": "npm run bump:prod && npm run bump:dev",
99
"bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // {}) as $L | (.devDependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true",
1010
"bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // {}) as $L | (.dependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true",

packages/react-chain-of-responsibility/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/.env
22
/*.tgz
33
/CHANGELOG.md
4-
/coverage/
54
/dist/
65
/LICENSE
76
/node_modules/

packages/react-chain-of-responsibility/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@
5050
"precommit:typescript:production": "tsc --noEmit --project ./src/tsconfig.precommit.production.json",
5151
"precommit:typescript:test": "tsc --noEmit --project ./src/tsconfig.precommit.test.json",
5252
"prepack": "cp ../../CHANGELOG.md . && cp ../../LICENSE . && cp ../../README.md .",
53+
"start": "npm run build -- --onSuccess \"touch ../pages/package.json\" --watch",
5354
"switch": "cat package.json | jq --arg SWITCH_NAME $SWITCH_NAME -r '(.[\"switch:\" + $SWITCH_NAME] // {}) as $TEMPLATE | .devDependencies += ($TEMPLATE.devDependencies // {}) | .dependencies += ($TEMPLATE.dependencies // {})' | tee ./package.json.tmp && mv ./package.json.tmp ./package.json",
54-
"test": "jest"
55+
"test": "node --import ./happy-dom-env.ts --test ${CI:---watch} **/*.{spec,test}.{[jt]s,[jt]sx,c[jt]s,m[jt]s}"
5556
},
5657
"repository": {
5758
"type": "git",

packages/react-chain-of-responsibility/tsup.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ export default defineConfig([
44
{
55
dts: true,
66
entry: {
7-
'react-chain-of-responsibility': './src/index.ts',
8-
'react-chain-of-responsibility.fluentUI': './src/index.fluentUI.ts',
9-
'react-chain-of-responsibility.preview': './src/index.preview.ts'
7+
['react-chain-of-responsibility'.split('/').reverse()[0]]: './src/index.ts'
108
},
119
format: ['cjs', 'esm'],
1210
sourcemap: true,

0 commit comments

Comments
 (0)