Skip to content

Commit

Permalink
Merge pull request #1092 from spencermountain/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
spencermountain committed Feb 16, 2024
2 parents 4216ad9 + 1505dec commit 78cec48
Show file tree
Hide file tree
Showing 84 changed files with 1,864 additions and 795 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,14 @@ jobs:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ matrix.node-version }}-
${{ runner.os }}-npm-
cache: npm
cache-dependency-path: package-lock.json

- name: install
run: |
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'

- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: npm
cache-dependency-path: package-lock.json

- run: npm ci
- run: npm i -g c8 codecov
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,24 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

# Note that these steps are *identical* to build-and-test (with the caveat
# that build-and-test uses several versions of Node, and Release only uses
# 10.x) at least until the actual publishing happens. Ideally, we could
# delegate to the build- and-test workflow, but I haven't found a way to do
# that yet.
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
node-version: 16.x
persist-credentials: false

- name: cache dependencies
uses: actions/cache@v3
- uses: actions/setup-node@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-10.x-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-10.x-
${{ runner.os }}-npm-
node-version: 16.x
cache: npm

- name: install
run: |
Expand Down Expand Up @@ -58,6 +55,6 @@ jobs:
- name: publish
run: |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
npm publish
npm publish --access public --provenance
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,10 @@ _(match methods use the [match-syntax](https://docs.compromise.cool/compromise-m
- **[.has('')](https://observablehq.com/@spencermountain/compromise-match)** - Return a boolean if this match exists
- **[.before('')](https://observablehq.com/@spencermountain/compromise-match)** - return all terms before a match, in each phrase
- **[.after('')](https://observablehq.com/@spencermountain/compromise-match)** - return all terms after a match, in each phrase
- **.union()** - return combined matches without duplicates
- **.intersection()** - return only duplicate matches
- **.complement()** - get everything not in another match
- **.settle()** - remove overlaps from matches
- **[.union()](https://observablehq.com/@spencermountain/compromise-set)** - return combined matches without duplicates
- **[.intersection()](https://observablehq.com/@spencermountain/compromise-set)** - return only duplicate matches
- **[.complement()](https://observablehq.com/@spencermountain/compromise-set)** - get everything not in another match
- **[.settle()](https://observablehq.com/@spencermountain/compromise-set)** - remove overlaps from matches
- **[.growRight('')](https://observablehq.com/@spencermountain/compromise-match)** - add any matching terms immediately after each match
- **[.growLeft('')](https://observablehq.com/@spencermountain/compromise-match)** - add any matching terms immediately before each match
- **[.grow('')](https://observablehq.com/@spencermountain/compromise-match)** - add any matching terms before or after each match
Expand Down Expand Up @@ -636,6 +636,7 @@ _(these methods are on the main `nlp` object)_
- **[.numbers().greaterThan(min)](https://observablehq.com/@spencermountain/compromise-values)** - return numbers bigger than n
- **[.numbers().lessThan(max)](https://observablehq.com/@spencermountain/compromise-values)** - return numbers smaller than n
- **[.numbers().between(min, max)](https://observablehq.com/@spencermountain/compromise-values)** - return numbers between min and max
- **[.numbers().isUnit(unit)](https://observablehq.com/@spencermountain/compromise-values)** - return only numbers in the given unit, like 'km'
- **[.numbers().set(n)](https://observablehq.com/@spencermountain/compromise-values)** - set number to n
- **[.numbers().add(n)](https://observablehq.com/@spencermountain/compromise-values)** - increase number by n
- **[.numbers().subtract(n)](https://observablehq.com/@spencermountain/compromise-values)** - decrease number by n
Expand Down
2 changes: 1 addition & 1 deletion builds/compromise.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion builds/one/compromise-one.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion builds/one/compromise-one.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion builds/three/compromise-three.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion builds/three/compromise-three.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion builds/two/compromise-two.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion builds/two/compromise-two.mjs

Large diffs are not rendered by default.

22 changes: 19 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,27 @@ While all _Major_ releases should be reviewed, our only _large_ releases are **v
- remove confidence numbers
-->

<!-- #### 14.11.0 [Unreleased]
<!-- #### 14.13.0 [Unreleased]
- **[fix]** - .not() overlap detection
- **[fix]** - .before() .after()
-->

#### 14.12.0 [Feb 2024]

- **[new]** - .payload() plugin
- **[new]** - `.numbers().isUnit()` method #1089
- **[change]** - update github workflow (thanks FDawgs!)
- **[fix]** - README issues (thanks track0x1!)
- **[fix]** - .has() inconsistency
- **[new]** - support adding debug methods via plugins
- **[change]** - remove deprecated .debug(object) support
- **[fix]** - parentheses() match issue
- **[fix]** - tokenization issue #1085
- **[new]** - `dates().isBefore()`, `dates().isBefore()` methods
- **[new]** - `.debug('dates')` method
- **[fix]** - lazy join() issue
- **[update]** - dependencies

#### 14.11.2 [Jan 2024]

- **[new]** - support for frozen lex in plugin object #1080
Expand Down
Loading

0 comments on commit 78cec48

Please sign in to comment.