Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/website/prettier-3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gpbl authored Dec 22, 2023
2 parents 5c542e9 + eefbf4d commit b304a1e
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 40 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ There are many ways to help the development of DayPicker:
- Opening PRs with new features, bug fixes and improved rendering performance
- Align the source code to the latest Typescript / React practices
- Helping with unit and integration tests
- Proofreading [our website](http://react-day-picker-next.netlify.app) and the
- Proofreading [our website](https://react-day-picker.js.org/) and the
code documentation in the source files
- Making the website more stylish
- Help maintaining [the repository](https://github.com/gpbl/react-day-picker) on Github and triaging issues and PRs
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-day-picker",
"version": "8.9.1",
"version": "8.10.0",
"description": "Customizable Date Picker for React",
"author": "Giampaolo Bellavite <[email protected]>",
"homepage": "http://react-day-picker.js.org",
Expand Down Expand Up @@ -34,7 +34,7 @@
],
"devDependencies": {
"@jest/types": "^29.6.3",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.1",
"@rollup/plugin-typescript": "^11.1.3",
Expand All @@ -49,7 +49,7 @@
"@types/testing-library__jest-dom": "^5.14.9",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.62.0",
"date-fns": "^2.30.0",
"date-fns": "^3.0.0",
"eslint": "^8.50.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.6.1",
Expand Down Expand Up @@ -80,7 +80,7 @@
"typescript": "~4.9.5"
},
"peerDependencies": {
"date-fns": "^2.28.0",
"date-fns": "^2.28.0 || ^3.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"funding": {
Expand Down
47 changes: 19 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/Table/utils/daysToMonthWeeks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function daysToMonthWeeks(
ISOWeek?: boolean;
locale?: Locale;
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7;
firstWeekContainsDate?: 1 | 4;
}
): MonthWeek[] {
const toWeek = options?.ISOWeek
Expand Down
8 changes: 4 additions & 4 deletions src/components/Table/utils/getMonthWeeks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ describe('when using the "enGB" locale', () => {
expect(weekNumbers[weekNumbers.length - 1]).toEqual(5);
});
});
describe('when setting a 3 as first day of year', () => {
describe('when setting thursday as first day of year', () => {
const date = new Date(2022, 0);
const weeks = getMonthWeeks(date, { locale, firstWeekContainsDate: 3 });
test('the number of week should have number 53', () => {
const weeks = getMonthWeeks(date, { locale, firstWeekContainsDate: 4 });
test('the number of week should have number 52', () => {
const weekNumbers = weeks.map((week) => week.weekNumber);
expect(weekNumbers[0]).toEqual(53);
expect(weekNumbers[0]).toEqual(52);
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/utils/getMonthWeeks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function getMonthWeeks(
locale: Locale;
useFixedWeeks?: boolean;
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7;
firstWeekContainsDate?: 1 | 4;
ISOWeek?: boolean;
}
): MonthWeek[] {
Expand Down
2 changes: 1 addition & 1 deletion src/types/DayPickerBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export interface DayPickerBase {
*
* See also {@link ISOWeek}.
*/
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7;
firstWeekContainsDate?: 1 | 4;
/**
* Use ISO week dates instead of the locale setting. See also
* https://en.wikipedia.org/wiki/ISO_week_date.
Expand Down

0 comments on commit b304a1e

Please sign in to comment.