Skip to content

Commit

Permalink
fix: support node 16 for legacy react projects (#69)
Browse files Browse the repository at this point in the history
Co-authored-by: F <[email protected]>
  • Loading branch information
Feshchenko and F authored Aug 30, 2024
1 parent 5c33216 commit 40a50b8
Show file tree
Hide file tree
Showing 5 changed files with 1,067 additions and 869 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
node-version: [16.x, 18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "datepicker",
"version": "6.6.6",
"version": "6.6.7",
"description": "The ultimate tool to create a date, range and time picker in your React applications.",
"scripts": {
"clean": "rimraf node_modules",
Expand Down Expand Up @@ -63,6 +63,6 @@
]
},
"engines": {
"node": ">=18"
"node": ">=16"
}
}
20 changes: 10 additions & 10 deletions packages/datepicker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rehookify/datepicker",
"version": "6.6.6",
"version": "6.6.7",
"description": "The ultimate tool to create a date, range and time picker in your React applications.",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.mjs",
Expand Down Expand Up @@ -60,21 +60,21 @@
},
"homepage": "https://github.com/rehookify/datepicker#readme",
"devDependencies": {
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@babel/preset-typescript": "^7.24.7",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@testing-library/react": "^16.0.0",
"@types/react": "^18.3.3",
"jsdom": "^24.1.0",
"@testing-library/react": "^16.0.1",
"@types/react": "^18.3.5",
"jsdom": "^25.0.0",
"react": "^18.3.1",
"rimraf": "^5.0.7",
"rollup": "^4.18.0",
"rimraf": "^6.0.1",
"rollup": "^4.21.2",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-typescript2": "^0.36.0",
"vitest": "^1.6.0"
"vitest": "^2.0.5"
},
"peerDependencies": {
"react": "^16.8.0 || ^17 || ^18"
Expand All @@ -83,6 +83,6 @@
"access": "public"
},
"engines": {
"node": ">=18"
"node": ">=16"
}
}
5 changes: 4 additions & 1 deletion packages/datepicker/src/__test__/date.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ describe('formatMonthName', () => {

expect(formatMonthName(testDate, DEFAULT_LOCALE_CONFIG)).toBe('November');
// Short version of Ukrainian "листопад"
expect(formatMonthName(testDate, ALTERNATIVE_LOCALE_CONFIG)).toBe('лист.');
// Note node 16 has value "лис" and node 18+ has value "лист."
expect(formatMonthName(testDate, ALTERNATIVE_LOCALE_CONFIG)).toMatch(
/^лис/,
);
});
});

Expand Down
Loading

0 comments on commit 40a50b8

Please sign in to comment.