Skip to content

Commit 40a50b8

Browse files
FeshchenkoF
andauthored
fix: support node 16 for legacy react projects (#69)
Co-authored-by: F <f@MacBook-Pro-F.local>
1 parent 5c33216 commit 40a50b8

File tree

5 files changed

+1067
-869
lines changed

5 files changed

+1067
-869
lines changed

.github/workflows/unit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [18.x, 20.x, 22.x]
19+
node-version: [16.x, 18.x, 20.x, 22.x]
2020

2121
steps:
2222
- uses: actions/checkout@v3

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "datepicker",
3-
"version": "6.6.6",
3+
"version": "6.6.7",
44
"description": "The ultimate tool to create a date, range and time picker in your React applications.",
55
"scripts": {
66
"clean": "rimraf node_modules",
@@ -63,6 +63,6 @@
6363
]
6464
},
6565
"engines": {
66-
"node": ">=18"
66+
"node": ">=16"
6767
}
6868
}

packages/datepicker/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rehookify/datepicker",
3-
"version": "6.6.6",
3+
"version": "6.6.7",
44
"description": "The ultimate tool to create a date, range and time picker in your React applications.",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.esm.mjs",
@@ -60,21 +60,21 @@
6060
},
6161
"homepage": "https://github.com/rehookify/datepicker#readme",
6262
"devDependencies": {
63-
"@babel/core": "^7.24.7",
64-
"@babel/preset-env": "^7.24.7",
63+
"@babel/core": "^7.25.2",
64+
"@babel/preset-env": "^7.25.4",
6565
"@babel/preset-typescript": "^7.24.7",
6666
"@rollup/plugin-commonjs": "^26.0.1",
6767
"@rollup/plugin-node-resolve": "^15.2.3",
6868
"@rollup/plugin-terser": "^0.4.4",
69-
"@testing-library/react": "^16.0.0",
70-
"@types/react": "^18.3.3",
71-
"jsdom": "^24.1.0",
69+
"@testing-library/react": "^16.0.1",
70+
"@types/react": "^18.3.5",
71+
"jsdom": "^25.0.0",
7272
"react": "^18.3.1",
73-
"rimraf": "^5.0.7",
74-
"rollup": "^4.18.0",
73+
"rimraf": "^6.0.1",
74+
"rollup": "^4.21.2",
7575
"rollup-plugin-peer-deps-external": "^2.2.4",
7676
"rollup-plugin-typescript2": "^0.36.0",
77-
"vitest": "^1.6.0"
77+
"vitest": "^2.0.5"
7878
},
7979
"peerDependencies": {
8080
"react": "^16.8.0 || ^17 || ^18"
@@ -83,6 +83,6 @@
8383
"access": "public"
8484
},
8585
"engines": {
86-
"node": ">=18"
86+
"node": ">=16"
8787
}
8888
}

packages/datepicker/src/__test__/date.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ describe('formatMonthName', () => {
140140

141141
expect(formatMonthName(testDate, DEFAULT_LOCALE_CONFIG)).toBe('November');
142142
// Short version of Ukrainian "листопад"
143-
expect(formatMonthName(testDate, ALTERNATIVE_LOCALE_CONFIG)).toBe('лист.');
143+
// Note node 16 has value "лис" and node 18+ has value "лист."
144+
expect(formatMonthName(testDate, ALTERNATIVE_LOCALE_CONFIG)).toMatch(
145+
/^лис/,
146+
);
144147
});
145148
});
146149

0 commit comments

Comments
 (0)