Skip to content

Commit

Permalink
fix: deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Apr 20, 2023
1 parent ab20bd9 commit 15f5c7c
Show file tree
Hide file tree
Showing 8 changed files with 2,554 additions and 2,960 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
env:
NODE_OPTIONS: '--max-old-space-size=3200'
steps:
- { uses: actions/checkout@v2, with: { persist-credentials: false } }
- { uses: actions/setup-node@v2, with: { node-version: 16, cache: 'yarn' } }
- { uses: actions/checkout@v3, with: { persist-credentials: false } }
- { uses: actions/setup-node@v3, with: { node-version: 18, cache: 'yarn' } }
- { name: yarn, run: yarn --frozen-lockfile }

- name: build
run: yarn build

- name: test
run: yarn test-ci
run: yarn test
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ on:
jobs:
release-job:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
if: "!contains(github.event.head_commit.message, 'skip ci')"
env: { NODE_OPTIONS: '--max-old-space-size=3200' }
steps:
- { uses: actions/checkout@v2, with: { persist-credentials: true } }
- { uses: actions/setup-node@v2, with: { node-version: 16, cache: 'yarn' } }
- { uses: actions/checkout@v3, with: { persist-credentials: true } }
- { uses: actions/setup-node@v3, with: { node-version: 18, cache: 'yarn' } }

# Cache for npm/npx in ~/.npm
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: npm-v1-${{ runner.os }}
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
},
"devDependencies": {
"@naturalcycles/bench-lib": "^1.0.4",
"@naturalcycles/dev-lib": "^12.6.0",
"@naturalcycles/dev-lib": "^13.25.5",
"@naturalcycles/js-lib": "^14.6.1",
"@naturalcycles/nodejs-lib": "^12.11.3",
"@types/node": "^17.0.23",
"jest": "^27.0.1",
"@types/node": "^18.15.12",
"jest": "^29.5.0",
"moment": "^2.24.0"
},
"files": [
Expand All @@ -31,14 +31,15 @@
"module": "dist-esm/index.js",
"sideEffects": false,
"publishConfig": {
"provenance": true,
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/NaturalCycles/time-lib"
},
"engines": {
"node": ">=14.15.0"
"node": ">=16.15.0"
},
"version": "3.3.0",
"description": "Date/time related API, based on Day.js",
Expand Down
10 changes: 5 additions & 5 deletions src/dayjsRange.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,30 @@ import {

test('dayjsRange', () => {
expect(dayjsRangeISODate('2021-12-24', '2021-12-26')).toMatchInlineSnapshot(`
Array [
[
"2021-12-24",
"2021-12-25",
]
`)

expect(dayjsRangeInclISODate('2021-12-24', '2021-12-26')).toMatchInlineSnapshot(`
Array [
[
"2021-12-24",
"2021-12-25",
"2021-12-26",
]
`)

expect(dayjsRangeISODate('2021-12-24', '2021-12-30', 2)).toMatchInlineSnapshot(`
Array [
[
"2021-12-24",
"2021-12-26",
"2021-12-28",
]
`)

expect(dayjsRangeInclISODate('2021-12-24', '2021-12-30', 2)).toMatchInlineSnapshot(`
Array [
[
"2021-12-24",
"2021-12-26",
"2021-12-28",
Expand All @@ -44,7 +44,7 @@ test('dayjsRange', () => {

expect(dayjsRange('2021-12-24', '2021-12-26', 4, 'hour').map(d => d.toPretty(false)))
.toMatchInlineSnapshot(`
Array [
[
"2021-12-24 00:00",
"2021-12-24 04:00",
"2021-12-24 08:00",
Expand Down
6 changes: 3 additions & 3 deletions src/dayjsRange.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { END, IsoDate, Sequence } from '@naturalcycles/js-lib'
import { END, IsoDateString, Sequence } from '@naturalcycles/js-lib'
import { ConfigType, dayjs, IDayjs, OpUnitType } from './index'

/**
Expand Down Expand Up @@ -58,7 +58,7 @@ export function dayjsRangeISODate(
maxExcl: ConfigType,
step = 1,
stepUnit: OpUnitType = 'd',
): IsoDate[] {
): IsoDateString[] {
return dayjsRange(minIncl, maxExcl, step, stepUnit).map(d => d.toISODate())
}

Expand All @@ -80,7 +80,7 @@ export function dayjsRangeInclISODate(
maxIncl: ConfigType,
step = 1,
stepUnit: OpUnitType = 'd',
): IsoDate[] {
): IsoDateString[] {
return dayjsRangeIncl(minIncl, maxIncl, step, stepUnit).map(d => d.toISODate())
}

Expand Down
2 changes: 1 addition & 1 deletion src/locale.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test('fdow of default locale should be Monday', () => {
expect(dayjs().localeData().firstDayOfWeek()).toBe(1)

expect(dayjs().localeData().weekdays()).toMatchInlineSnapshot(`
Array [
[
"Sunday",
"Monday",
"Tuesday",
Expand Down
Loading

0 comments on commit 15f5c7c

Please sign in to comment.