Skip to content

Commit bd2f15f

Browse files
author
Lukas Siemon
committed
fix: bumped min node version
BREAKING CHANGE: bumped min node version to 20
1 parent 5f10f58 commit bd2f15f

22 files changed

+1918
-1605
lines changed

.c8rc.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"coverage/*",
66
"lib/*",
77
"test/hot.js",
8+
"test/reg.js",
89
"eslint.config.js",
910
"test/regression-test.js",
1011
"test/worker.js",

.circleci/config.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,45 @@ workflows:
22
node-multi-build:
33
jobs:
44
- gally-create-pr
5-
- test-node-v18:
5+
- test-node-v20:
66
requires:
77
- gally-create-pr
8-
- test-node-v16:
8+
- test-node-v23:
99
requires:
1010
- gally-create-pr
11-
- test-node-v20:
11+
- test-node-v22:
1212
requires:
1313
- gally-create-pr
1414
- gally-auto-approve:
1515
requires:
1616
- gally-create-pr
17-
- test-node-v18
18-
- test-node-v16
1917
- test-node-v20
18+
- test-node-v23
19+
- test-node-v22
2020
filters:
2121
branches:
2222
only: /dependabot\/.*/
2323
- release:
2424
requires:
2525
- gally-create-pr
26-
- test-node-v18
27-
- test-node-v16
2826
- test-node-v20
27+
- test-node-v23
28+
- test-node-v22
2929
filters:
3030
branches:
3131
only: master
3232
version: 2.1
3333
jobs:
3434
gally-create-pr:
3535
docker:
36-
- image: cimg/node:16.20
36+
- image: cimg/node:20.11
3737
steps:
3838
- checkout
3939
- run: sudo yarn global add gally
4040
- run: ga promote $CIRCLE_BRANCH
4141
release:
4242
docker:
43-
- image: cimg/node:16.20
43+
- image: cimg/node:22.13
4444
steps:
4545
- checkout
4646
- run:
@@ -70,7 +70,7 @@ jobs:
7070
- run: yarn run semantic-release
7171
gally-auto-approve:
7272
docker:
73-
- image: cimg/node:16.20
73+
- image: cimg/node:20.11
7474
steps:
7575
- run:
7676
name: Set PR number
@@ -87,9 +87,9 @@ jobs:
8787
- run: >-
8888
ga approve $CIRCLE_PR_NUMBER --condition
8989
"base.ref=dev&state=open&user.login=dependabot-preview[bot]"
90-
test-node-v16:
90+
test-node-v20:
9191
docker:
92-
- image: cimg/node:16.20
92+
- image: cimg/node:20.18
9393
steps:
9494
- checkout
9595
- run:
@@ -119,9 +119,9 @@ jobs:
119119
- run: >-
120120
(git add . && git diff-index --quiet HEAD --) || (git status && exit
121121
1);
122-
test-node-v18:
122+
test-node-v23:
123123
docker:
124-
- image: cimg/node:18.16
124+
- image: cimg/node:23.6
125125
steps:
126126
- checkout
127127
- run:
@@ -151,9 +151,9 @@ jobs:
151151
- run: >-
152152
(git add . && git diff-index --quiet HEAD --) || (git status && exit
153153
1);
154-
test-node-v20:
154+
test-node-v22:
155155
docker:
156-
- image: cimg/node:20.4
156+
- image: cimg/node:22.13
157157
steps:
158158
- checkout
159159
- run:

.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"extends": [
44
"airbnb-base",
55
"plugin:mocha/recommended",
6-
"plugin:markdown/recommended"
6+
"plugin:markdown/recommended-legacy"
77
],
88
"rules": {
99
"@blackflux/rules/c8-prevent-ignore": 1,

.gally.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
"strict": true,
2424
"contexts": [
2525
"ci/circleci: gally-create-pr",
26-
"ci/circleci: test-node-v18",
27-
"ci/circleci: test-node-v16",
28-
"ci/circleci: test-node-v20"
26+
"ci/circleci: test-node-v20",
27+
"ci/circleci: test-node-v23",
28+
"ci/circleci: test-node-v22"
2929
]
3030
},
3131
"enforce_admins": false,

.roboconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"assorted/@npm-opensource"
55
],
66
"variables": {
7-
"nodeVersion": "16",
7+
"nodeVersion": "20",
88
"repoKey": "blackflux/object-scan",
99
"packageName": "object-scan",
1010
"projectName": "object-scan",

.roboconfig.lock

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"package.json",
1919
"src/index.js",
2020
"test/hot.js",
21-
"test/index.spec.js"
21+
"test/index.spec.js",
22+
"test/reg.js"
2223
]
2324
}

CONFDOCS.md

+44-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Documents configuration tasks managed by [robo-config](https://github.com/blackf
88
- <a name="blackfluxrobo-config-plugin-task-idx-ref-structnpm-default">:open_file_folder:</a> <a href="#blackfluxrobo-config-plugin-task-ref-structnpm-default">`struct/#npm-default`</a>
99
- <a name="blackfluxrobo-config-plugin-task-idx-ref-structforce-gardener">:clipboard:</a> <a href="#blackfluxrobo-config-plugin-task-ref-structforce-gardener">`struct/force-gardener`</a>
1010
- <a name="blackfluxrobo-config-plugin-task-idx-ref-structnpm-base">:open_file_folder:</a> <a href="#blackfluxrobo-config-plugin-task-ref-structnpm-base">`struct/#npm-base`</a>
11+
- <a name="blackfluxrobo-config-plugin-task-idx-ref-structtest-reg">:clipboard:</a> <a href="#blackfluxrobo-config-plugin-task-ref-structtest-reg">`struct/test-reg`</a>
1112
- <a name="blackfluxrobo-config-plugin-task-idx-ref-structtest-hot">:clipboard:</a> <a href="#blackfluxrobo-config-plugin-task-ref-structtest-hot">`struct/test-hot`</a>
1213
- <a name="blackfluxrobo-config-plugin-task-idx-ref-structtemplate-readme">:clipboard:</a> <a href="#blackfluxrobo-config-plugin-task-ref-structtemplate-readme">`struct/template-readme`</a>
1314
- <a name="blackfluxrobo-config-plugin-task-idx-ref-structtemplate-mocharc">:clipboard:</a> <a href="#blackfluxrobo-config-plugin-task-ref-structtemplate-mocharc">`struct/template-mocharc`</a>
@@ -87,7 +88,8 @@ Manage various configuration files for an open source npm package on github.
8788
<code>│&nbsp;&nbsp;└─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-srcindexjs">index.js</a></code><br/>
8889
<code>└─&nbsp;test</code><br/>
8990
<code>&nbsp;&nbsp;&nbsp;├─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testhotjs">hot.js</a></code><br/>
90-
<code>&nbsp;&nbsp;&nbsp;└─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testindexspecjs">index.spec.js</a></code><br/>
91+
<code>&nbsp;&nbsp;&nbsp;├─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testindexspecjs">index.spec.js</a></code><br/>
92+
<code>&nbsp;&nbsp;&nbsp;└─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testregjs">reg.js</a></code><br/>
9193
</ul>
9294
</td>
9395
<td align="left" valign="top">
@@ -151,7 +153,8 @@ Manage basic project structure for npm package on github.
151153
<code>│&nbsp;&nbsp;└─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-srcindexjs">index.js</a></code><br/>
152154
<code>└─&nbsp;test</code><br/>
153155
<code>&nbsp;&nbsp;&nbsp;├─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testhotjs">hot.js</a></code><br/>
154-
<code>&nbsp;&nbsp;&nbsp;└─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testindexspecjs">index.spec.js</a></code><br/>
156+
<code>&nbsp;&nbsp;&nbsp;├─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testindexspecjs">index.spec.js</a></code><br/>
157+
<code>&nbsp;&nbsp;&nbsp;└─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testregjs">reg.js</a></code><br/>
155158
</ul>
156159
</td>
157160
<td align="left" valign="top">
@@ -224,7 +227,8 @@ Manage basic project structure for npm package on github.
224227
<code>│&nbsp;&nbsp;└─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-srcindexjs">index.js</a></code><br/>
225228
<code>└─&nbsp;test</code><br/>
226229
<code>&nbsp;&nbsp;&nbsp;├─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testhotjs">hot.js</a></code><br/>
227-
<code>&nbsp;&nbsp;&nbsp;└─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testindexspecjs">index.spec.js</a></code><br/>
230+
<code>&nbsp;&nbsp;&nbsp;├─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testindexspecjs">index.spec.js</a></code><br/>
231+
<code>&nbsp;&nbsp;&nbsp;└─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testregjs">reg.js</a></code><br/>
228232
</ul>
229233
</td>
230234
<td align="left" valign="top">
@@ -244,11 +248,40 @@ Manage basic project structure for npm package on github.
244248
</tbody>
245249
</table>
246250

251+
###### :clipboard: <a name="blackfluxrobo-config-plugin-task-ref-structtest-reg">struct/test-reg</a> (<a href="#blackfluxrobo-config-plugin-task-idx-ref-structtest-reg">`index`</a>)
252+
253+
_Updating <a href="#blackfluxrobo-config-plugin-target-ref-testregjs">test/reg.js</a> using <a href="#blackfluxrobo-config-plugin-strat-ref-overwrite">overwrite</a>._
254+
255+
- Create register file.
256+
257+
<table>
258+
<tbody>
259+
<tr>
260+
<th>Targets</th>
261+
<th>Requires</th>
262+
</tr>
263+
<tr>
264+
<td align="left" valign="top">
265+
<ul>
266+
<code>project</code><br/>
267+
<code>└─&nbsp;test</code><br/>
268+
<code>&nbsp;&nbsp;&nbsp;└─&nbsp;<a href="#blackfluxrobo-config-plugin-target-ref-testregjs">reg.js</a></code><br/>
269+
</ul>
270+
</td>
271+
<td align="left" valign="top">
272+
<ul>
273+
<li><a href="#blackfluxrobo-config-plugin-req-ref-javascript">javascript</a></li>
274+
</ul>
275+
</td>
276+
</tr>
277+
</tbody>
278+
</table>
279+
247280
###### :clipboard: <a name="blackfluxrobo-config-plugin-task-ref-structtest-hot">struct/test-hot</a> (<a href="#blackfluxrobo-config-plugin-task-idx-ref-structtest-hot">`index`</a>)
248281

249282
_Updating <a href="#blackfluxrobo-config-plugin-target-ref-testhotjs">test/hot.js</a> using <a href="#blackfluxrobo-config-plugin-strat-ref-overwrite">overwrite</a>._
250283

251-
- Create custom loader file.
284+
- Create loader file.
252285

253286
<table>
254287
<tbody>
@@ -1651,11 +1684,17 @@ The code owner is the gatekeeper of the project, ultimately responsible for all
16511684

16521685
Execute all configured js-gardener tasks.
16531686

1687+
### <a name="blackfluxrobo-config-plugin-target-ref-testregjs">test/reg.js</a>
1688+
1689+
:small_blue_diamond: `other`
1690+
1691+
*Registration hook to load custom loader.*
1692+
16541693
### <a name="blackfluxrobo-config-plugin-target-ref-testhotjs">test/hot.js</a>
16551694

16561695
:small_blue_diamond: `other`
16571696

1658-
*Custom loader to allow hot reloading of files for testing.*
1697+
*Loader to allow hot reloading of files for testing.*
16591698

16601699
### <a name="blackfluxrobo-config-plugin-target-ref-readmemd">README.md</a> ([`link`](https://help.github.com/en/articles/about-readmes))
16611700

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Build Status](https://circleci.com/gh/blackflux/object-scan.png?style=shield)](https://circleci.com/gh/blackflux/object-scan)
44
[![NPM](https://img.shields.io/npm/v/object-scan.svg)](https://www.npmjs.com/package/object-scan)
55
[![Downloads](https://img.shields.io/npm/dt/object-scan.svg)](https://www.npmjs.com/package/object-scan)
6-
[![Size](https://shields.io/badge/min%20+%20gz-5.00%20KB-informational)](https://bundlephobia.com/package/object-scan)
6+
[![Size](https://shields.io/badge/min%20+%20gz-5.02%20KB-informational)](https://bundlephobia.com/package/object-scan)
77
[![Test Ratio](https://shields.io/badge/test%20:%20code-9.8%20:%201-informational)](./test/readme/replace-variables/ratio-badge.js)
88

99
Traverse object hierarchies using matching and callbacks.
@@ -18,7 +18,7 @@ Using npm:
1818

1919
In a browser:
2020

21-
```html
21+
```
2222
<script type="module">
2323
import objectScan from 'https://cdn.jsdelivr.net/npm/object-scan@<VERSION>/lib/index.min.js';
2424
// do logic here
@@ -93,7 +93,7 @@ A needle expression specifies one or more paths to an element (or a set of eleme
9393
Paths use the dot notation.
9494

9595
```txt
96-
store.book[0].title
96+
store.book[0].title;
9797
```
9898

9999
The matching syntax is fully validated and bad input will throw a syntax error. The following syntax is supported:

eslint.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default [
1313
...compat.extends(
1414
'airbnb-base',
1515
'plugin:mocha/recommended',
16-
'plugin:markdown/recommended'
16+
'plugin:markdown/recommended-legacy'
1717
),
1818
...compat.env({ es6: true, node: true, mocha: true }),
1919
...compat.plugins('json', 'mocha'),

package.json

+29-29
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"clean": "rm -rf lib",
99
"build": "cp -rf ./src ./lib && ncc build -m -o lib && mv lib/index.js lib/index.min.js && cp src/index.js lib/index.js && rm lib/package.json",
1010
"build-clean": "yarn run clean && yarn run build",
11-
"test-simple": "c8 mocha --experimental-loader=./test/hot.js \"./test/**/*.spec.js\"",
11+
"test-simple": "c8 mocha --import=./test/reg.js \"./test/**/*.spec.js\"",
1212
"test": "yarn run clean && yarn run gardener && yarn run test-simple",
13-
"semantic-release": "yarn run build-clean && npx semantic-release",
13+
"semantic-release": "yarn run build-clean && yarn exec semantic-release",
1414
"gardener": "node gardener.js",
1515
"docker": "docker run --net host -u`id -u`:`id -g` -v $(pwd):/user/project -v ~/.aws:/user/.aws -v ~/.npmrc:/user/.npmrc -w /user/project -it --entrypoint /bin/bash",
1616
"t": "yarn test",
@@ -51,42 +51,42 @@
5151
},
5252
"homepage": "https://github.com/blackflux/object-scan#readme",
5353
"devDependencies": {
54-
"@babel/core": "7.23.0",
55-
"@babel/eslint-parser": "7.22.15",
56-
"@babel/register": "7.22.15",
57-
"@blackflux/eslint-plugin-rules": "3.0.1",
58-
"@blackflux/robo-config-plugin": "9.2.2",
59-
"@eslint/eslintrc": "2.1.2",
60-
"@vercel/ncc": "0.38.0",
61-
"axios": "1.5.1",
62-
"c8": "8.0.1",
63-
"chai": "4.3.10",
64-
"diff": "5.1.0",
65-
"diff2html": "3.4.44",
66-
"eslint": "8.50.0",
54+
"@babel/core": "7.26.7",
55+
"@babel/eslint-parser": "7.26.5",
56+
"@babel/register": "7.25.9",
57+
"@blackflux/eslint-plugin-rules": "4.0.0",
58+
"@blackflux/robo-config-plugin": "10.0.0",
59+
"@eslint/eslintrc": "3.2.0",
60+
"@vercel/ncc": "0.38.3",
61+
"axios": "1.7.9",
62+
"c8": "10.1.3",
63+
"chai": "5.1.2",
64+
"diff": "7.0.0",
65+
"diff2html": "3.4.51",
66+
"eslint": "9.19.0",
6767
"eslint-config-airbnb-base": "15.0.0",
68-
"eslint-plugin-import": "2.28.1",
69-
"eslint-plugin-json": "3.1.0",
70-
"eslint-plugin-markdown": "3.0.1",
71-
"eslint-plugin-mocha": "10.2.0",
68+
"eslint-plugin-import": "2.31.0",
69+
"eslint-plugin-json": "4.0.1",
70+
"eslint-plugin-markdown": "5.1.0",
71+
"eslint-plugin-mocha": "10.5.0",
7272
"github-slugger": "2.0.0",
7373
"jmespath": "0.16.0",
74-
"joi-strict": "3.0.1",
75-
"js-gardener": "5.0.2",
74+
"joi-strict": "4.0.0",
75+
"js-gardener": "6.0.2",
7676
"json-stringify-pretty-compact": "4.0.0",
7777
"jsonpath": "1.1.1",
78-
"jsonpath-plus": "7.2.0",
78+
"jsonpath-plus": "10.2.0",
7979
"lodash.clonedeep": "4.5.0",
8080
"lodash.get": "4.4.2",
8181
"lodash.isequal": "4.5.0",
8282
"mustache": "4.2.0",
83-
"nimma": "0.3.1",
84-
"node-tdd": "4.0.1",
85-
"object-scan": "19.0.2",
86-
"promise-pool-ext": "3.0.2",
87-
"smart-fs": "4.0.1",
83+
"nimma": "0.7.1",
84+
"node-tdd": "6.0.0",
85+
"object-scan": "19.0.5",
86+
"promise-pool-ext": "3.3.0",
87+
"smart-fs": "5.0.1",
8888
"stringify-object": "5.0.0",
89-
"uuid": "9.0.1"
89+
"uuid": "11.0.5"
9090
},
9191
"licenses": [
9292
{
@@ -95,7 +95,7 @@
9595
}
9696
],
9797
"engines": {
98-
"node": ">= 16"
98+
"node": ">= 20"
9999
},
100100
"files": [
101101
"lib"

src/generic/helper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const asRegex = (regexStr) => {
2323

2424
try {
2525
return new RegExp(regexStr);
26-
} catch (e) {
26+
} catch {
2727
throw new Error(`Invalid Regex: "${regexStr}"`);
2828
}
2929
};

test/generic/iterator.spec.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import PRNG from '../helper/prng.js';
88

99
describe('Testing iterator', () => {
1010
let recIterate;
11+
1112
before(() => {
1213
recIterate = (obj, cb) => {
1314
if (Array.isArray(obj[0])) {

test/helper.spec/path-to-needle-path.spec.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import PRNG from '../helper/prng.js';
66
describe('Testing path-to-needle-path.js', () => {
77
let rng;
88
let needle;
9+
910
beforeEach(() => {
1011
rng = PRNG('44e669e4-401b-4440-9ee8-387ae0840d66');
1112
needle = ['name', 0, 'value', 16, 'property'];

0 commit comments

Comments
 (0)