Skip to content

Commit bc123ef

Browse files
Bump scaffold (#28)
* Bump scaffold * Update transformer * Move to JSX classic * Add entry --------- Co-authored-by: @compulim <@compulim> Co-authored-by: William Wong <compulim@hotmail.com>
1 parent 8c5c1e0 commit bc123ef

22 files changed

+58
-18
lines changed

.eslintrc.react.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
extends:
22
- plugin:react/recommended
3-
- plugin:react/jsx-runtime
43
plugins:
54
- react
65
settings:

.github/workflows/pull-request-validation.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ on:
77

88
jobs:
99
call-workflow:
10+
strategy:
11+
matrix:
12+
react-version: [current, 16, 17, 18]
1013
uses: compulim/workflows/.github/workflows/pull-request-validation.yml@main
1114
with:
1215
package-name: use-memo-map
16+
react-version: ${{ matrix.react-version }}
1317
skip-integration-test: false

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3737
- [`react-test-renderer@18.2.0`](https://npmjs.com/package/react-test-renderer)
3838
- [`react@18.2.0`](https://npmjs.com/package/react)
3939
- [`typescript@5.4.3`](https://npmjs.com/package/typescript)
40+
- Updated pull request validation to test against various React versions, in PR [#28](https://github.com/compulim/use-memo-map/pull/28)
41+
- Moved from JSX Runtime to JSX Classic to support testing against React 16
4042

4143
## [0.0.4] - 2023-10-09
4244

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
"postscaffold": "npm run postscaffold:eslint:react && npm run postscaffold --if-present --workspaces",
2222
"postscaffold:eslint:react": "npm run bump:eslintrc",
2323
"precommit": "npm run precommit --if-present --workspaces",
24+
"switch:_": "npm run --if-present --workspaces switch && npm install --legacy-peer-deps --prefer-dedupe",
25+
"switch:react:16": "SWITCH_NAME=react:16 npm run switch:_",
26+
"switch:react:17": "SWITCH_NAME=react:17 npm run switch:_",
27+
"switch:react:18": "SWITCH_NAME=react:18 npm run switch:_",
2428
"test": "npm run test --if-present --workspaces"
2529
},
2630
"devDependencies": {

packages/integration-test/babel.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[
44
"@babel/preset-react",
55
{
6-
"runtime": "automatic"
6+
"runtime": "classic"
77
}
88
],
99
[

packages/integration-test/jest.config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[
99
"@babel/preset-react",
1010
{
11-
"runtime": "automatic"
11+
"runtime": "classic"
1212
}
1313
]
1414
]
@@ -21,7 +21,7 @@
2121
[
2222
"@babel/preset-react",
2323
{
24-
"runtime": "automatic"
24+
"runtime": "classic"
2525
}
2626
],
2727
[

packages/integration-test/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.localPeerDependencies // {}) as $L | (.devDependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true",
1010
"bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.localPeerDependencies // {}) as $L | (.dependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true",
1111
"precommit": "eslint --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts ./",
12+
"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",
1213
"test": "jest"
1314
},
1415
"author": "William Wong (https://github.com/compulim)",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This configuration file is for VSCode only.
22
{
33
"compilerOptions": {
4-
"jsx": "react-jsx"
4+
"jsx": "react"
55
}
66
}

packages/pages/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"precommit": "npm run precommit:typescript",
1212
"precommit:typescript": "tsc --project ./src/tsconfig.json",
1313
"reinstall": "rm -r node_modules package-lock.json && npm install",
14-
"start": "npm run build -- --servedir=./public"
14+
"start": "npm run build -- --servedir=./public",
15+
"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"
1516
},
1617
"author": "William Wong (https://github.com/compulim)",
1718
"license": "MIT",

0 commit comments

Comments
 (0)