From 7b4a99c89be334faf9d67e2674d95f1d35c9acdd Mon Sep 17 00:00:00 2001 From: iamkun Date: Sat, 11 Jun 2022 11:37:25 +0800 Subject: [PATCH 1/3] chore: add action lint & test (#1939) --- .github/workflows/check.yml | 26 ++++++++++++++++++++++++++ .travis.yml | 8 ++++---- 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 000000000..0ff6907dd --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,26 @@ +name: Lint & Unit Test +on: + push: + branches: [ master, dev ] + pull_request: + branches: [dev] +jobs: + check: + runs-on: ubuntu-latest + strategy: + matrix: + node: [ 12, 14, 16, 18 ] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install dependencies + run: npm install -g codecov && npm install + - name: Run Lint + run: npm run lint + - name: Run tests + run: npm test && codecov diff --git a/.travis.yml b/.travis.yml index ec3ad83d2..b8aba28b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,10 @@ cache: - ~/.npm - node_modules node_js: + - '18' + - '16' - '14' - '12' - - '10' - - '8' install: - npm install -g codecov - npm install @@ -20,5 +20,5 @@ after_success: npx travis-deploy-once --pro && npm run build && npm run babel && npm install -g @semantic-release/changelog @semantic-release/git semantic-release && semantic-release && echo release success && curl ${TriggerUrl} && npm run test:sauce; fi branches: - except: - - /^v\d+\.\d+\.\d+$/ + only: + - master From 8f09834a88b8e7f8353c6e7473d4711596890a8c Mon Sep 17 00:00:00 2001 From: R3tep Date: Sat, 11 Jun 2022 05:41:01 +0200 Subject: [PATCH 2/3] fix: fix French [fr] local ordinal (#1932) Co-authored-by: iamkun --- src/locale/fr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locale/fr.js b/src/locale/fr.js index be06169f6..e913b4aa7 100644 --- a/src/locale/fr.js +++ b/src/locale/fr.js @@ -34,7 +34,7 @@ const locale = { yy: '%d ans' }, ordinal: (n) => { - const o = n === 1 ? 'er' : '' + const o = n === 1 ? 'er' : 'e' return `${n}${o}` } } From 526f0ae549ffbeeb9ef1099ca23964791fc59743 Mon Sep 17 00:00:00 2001 From: R3tep Date: Sat, 11 Jun 2022 05:44:35 +0200 Subject: [PATCH 3/3] fix: fix type error to add ordianl property in InstanceLocaleDataReturn and GlobalLocaleDataReturn types (#1931) Co-authored-by: iamkun --- types/plugin/localeData.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/plugin/localeData.d.ts b/types/plugin/localeData.d.ts index bc0aa14bd..ae9e55766 100644 --- a/types/plugin/localeData.d.ts +++ b/types/plugin/localeData.d.ts @@ -16,6 +16,7 @@ declare module 'dayjs' { monthsShort(instance?: Dayjs): MonthNames; longDateFormat(format: string): string; meridiem(hour?: number, minute?: number, isLower?: boolean): string; + ordinal(n: number): string } interface GlobalLocaleDataReturn { @@ -27,6 +28,7 @@ declare module 'dayjs' { monthsShort(): MonthNames; longDateFormat(format: string): string; meridiem(hour?: number, minute?: number, isLower?: boolean): string; + ordinal(n: number): string } interface Dayjs {