Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #1092

Merged
merged 38 commits into from Feb 16, 2024
Merged

Dev #1092

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
198ae07
chore(misc): update `Match` type with `freeze` property
Fdawgs Jan 26, 2024
60fc6e4
chore(misc): update `Plugin` type with `frozen` property
Fdawgs Jan 26, 2024
20710ab
ci: bump github actions
Fdawgs Jan 26, 2024
bf81771
Merge pull request #1083 from Fdawgs/patch-1
spencermountain Jan 26, 2024
0a4e26d
Merge pull request #1084 from Fdawgs/ci/actions
spencermountain Jan 26, 2024
4e4b42d
ci(release): update workflow
Fdawgs Feb 6, 2024
5fd1b58
Merge pull request #1087 from Fdawgs/patch-1
spencermountain Feb 6, 2024
9e3320e
payload proof of concept
spencermountain Feb 7, 2024
d0f88d7
cleanup api
spencermountain Feb 7, 2024
3dc8c6f
has match issue
spencermountain Feb 7, 2024
c7c6e09
first payload test
spencermountain Feb 7, 2024
2495729
Merge branch 'master' into dev
spencermountain Feb 8, 2024
9140943
add isUnit method to value #1089
spencermountain Feb 12, 2024
5f701e1
tests for isUnit
spencermountain Feb 12, 2024
fb0249a
support custom debug methods
spencermountain Feb 12, 2024
87c6f70
debug methods working
spencermountain Feb 12, 2024
5d031d9
payload debug working
spencermountain Feb 12, 2024
abd1902
fix for dirty parentheses match #1065
spencermountain Feb 12, 2024
1c622a4
tests for parentheses
spencermountain Feb 12, 2024
69ce2b2
isbefore working
spencermountain Feb 13, 2024
9cc069a
dates debug method
spencermountain Feb 13, 2024
d5f96b6
date debug okay
spencermountain Feb 13, 2024
386c1d6
isSame method
spencermountain Feb 13, 2024
7b95c8b
fix for #1085
spencermountain Feb 13, 2024
adf28d0
fix penn mapping for #1090
spencermountain Feb 13, 2024
fc9b61b
move plugin
spencermountain Feb 16, 2024
da06dbd
fix payload bug
spencermountain Feb 16, 2024
f54dd52
build tests working
spencermountain Feb 16, 2024
17b8b91
rc 0.0.1
spencermountain Feb 16, 2024
d5ae5c1
date tests passing
spencermountain Feb 16, 2024
dd546c2
dates 3.5.0rc
spencermountain Feb 16, 2024
8a0c4b6
support older compromise versions
spencermountain Feb 16, 2024
bb69014
0.0.2rc
spencermountain Feb 16, 2024
cfc91d1
builds
spencermountain Feb 16, 2024
7a61d36
fix join issue
spencermountain Feb 16, 2024
cd10e08
14.12.0rc
spencermountain Feb 16, 2024
19590c3
soften 14.12 requirement
spencermountain Feb 16, 2024
1505dec
0.0.3
spencermountain Feb 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 4 additions & 11 deletions .github/workflows/build-and-test.yml
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
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
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
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
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