diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 0a350bc10..2bb331343 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -5,6 +5,8 @@ on: [pull_request] jobs: build-and-test: runs-on: ${{ matrix.os }} + permissions: + contents: read strategy: matrix: @@ -13,13 +15,14 @@ jobs: steps: - uses: actions/checkout@v4 + with: + persist-credentials: false - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: npm - cache-dependency-path: package-lock.json - name: install run: | diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ff15cc052..bb51dd12f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -9,14 +9,18 @@ on: jobs: getCoverage: runs-on: ubuntu-latest - + permissions: + contents: read + steps: - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: actions/setup-node@v4 with: node-version: '16' cache: npm - cache-dependency-path: package-lock.json - run: npm ci - run: npm i -g c8 codecov diff --git a/package.json b/package.json index b8e863253..f566407c7 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,18 @@ "import": "./src/three.js", "require": "./builds/three/compromise-three.cjs", "types": "./types/three.d.ts" + }, + "./misc": { + "types": "./types/misc.d.ts" + }, + "./view/one": { + "types": "./types/view/one.d.ts" + }, + "./view/two": { + "types": "./types/view/two.d.ts" + }, + "./view/three": { + "types": "./types/view/three.d.ts" } }, "typesVersions": { diff --git a/plugins/dates/src/model/regex.js b/plugins/dates/src/model/regex.js index 36276c4df..c70486cd8 100644 --- a/plugins/dates/src/model/regex.js +++ b/plugins/dates/src/model/regex.js @@ -10,7 +10,7 @@ export default [ // @4pm [/^@[1-9]+(am|pm)$/, 'Time', '@5pm'], // 03/02 - [/^[0-9]{2}\/[0-9]{2}$/, 'Date', '03/02'], + [/^(?:0[1-9]|1[0-2])\/(?:0[1-9]|[12]\d|3[01])$/, 'Date', '03/02'], // iso-time // [/^[0-9]{4}[:-][0-9]{2}[:-][0-9]{2}T[0-9]/i, 'Time', 'iso-time-tag']