identifier-js 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/test.yml +55 -0
- package/package.json +44 -41
- package/readme.md +13 -3
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Verify the complete public test suite across supported Node.js releases and operating systems.
|
|
2
|
+
name: Cross-platform tests
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [master]
|
|
7
|
+
pull_request:
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
# Tests need read access to the project and its public workspace-data source.
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
name: ${{ matrix.os }} / Node.js ${{ matrix.node }}
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
22
|
+
node: [20, 22, 24]
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
# Check out the exact project revision selected by the workflow event.
|
|
26
|
+
- name: Check out repository
|
|
27
|
+
uses: actions/checkout@v7
|
|
28
|
+
|
|
29
|
+
# Install each supported Node.js runtime independently on every operating system.
|
|
30
|
+
- name: Set up Node.js
|
|
31
|
+
uses: actions/setup-node@v7
|
|
32
|
+
with:
|
|
33
|
+
node-version: ${{ matrix.node }}
|
|
34
|
+
|
|
35
|
+
# Install development dependencies without requiring a generated package lock.
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: npm install --no-audit --no-fund
|
|
38
|
+
|
|
39
|
+
# Check out only this project's test concern from the public workspace-data source.
|
|
40
|
+
- name: Check out public tests
|
|
41
|
+
uses: actions/checkout@v7
|
|
42
|
+
with:
|
|
43
|
+
repository: SorinGFS/public-data
|
|
44
|
+
ref: master
|
|
45
|
+
path: workspace-data
|
|
46
|
+
sparse-checkout: tests/github.com/SorinGFS/identifier-js
|
|
47
|
+
|
|
48
|
+
# Reproduce the ordinary workspace layout consumed by the package test script.
|
|
49
|
+
- name: Materialize public tests
|
|
50
|
+
run: >-
|
|
51
|
+
node -e "require('node:fs').cpSync('workspace-data/tests/github.com/SorinGFS/identifier-js', '#/public/tests', { recursive: true })"
|
|
52
|
+
|
|
53
|
+
# Execute the materialized Vitest suite and propagate any failed result.
|
|
54
|
+
- name: Run tests
|
|
55
|
+
run: npm test
|
package/package.json
CHANGED
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "identifier-js",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "A RFC3986 / RFC3987 compliant fast parser/validator/resolver/composer for NodeJS and browser.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"IRI",
|
|
7
|
-
"URI",
|
|
8
|
-
"IRI-reference",
|
|
9
|
-
"URI-reference",
|
|
10
|
-
"ipv4",
|
|
11
|
-
"ipv6",
|
|
12
|
-
"uuid",
|
|
13
|
-
"parser",
|
|
14
|
-
"validator",
|
|
15
|
-
"RFC3986",
|
|
16
|
-
"RFC3987"
|
|
17
|
-
],
|
|
18
|
-
"homepage": "https://github.com/SorinGFS/identifier-js#readme",
|
|
19
|
-
"bugs": {
|
|
20
|
-
"url": "https://github.com/SorinGFS/identifier-js/issues"
|
|
21
|
-
},
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "git+https://github.com/SorinGFS/identifier-js.git"
|
|
25
|
-
},
|
|
26
|
-
"license": "MIT",
|
|
27
|
-
"author": "SorinGFS",
|
|
28
|
-
"type": "commonjs",
|
|
29
|
-
"main": "index.js",
|
|
30
|
-
"scripts": {
|
|
31
|
-
"update-deps": "npx npm-check-updates -u && npm install",
|
|
32
|
-
"test": "node \"#/public/tests/vitest-
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"url-templates": "^1.0.7"
|
|
36
|
-
},
|
|
37
|
-
"engines": {
|
|
38
|
-
"node": ">=
|
|
39
|
-
},
|
|
40
|
-
"engineStrict": true
|
|
41
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "identifier-js",
|
|
3
|
+
"version": "0.0.16",
|
|
4
|
+
"description": "A RFC3986 / RFC3987 compliant fast parser/validator/resolver/composer for NodeJS and browser.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"IRI",
|
|
7
|
+
"URI",
|
|
8
|
+
"IRI-reference",
|
|
9
|
+
"URI-reference",
|
|
10
|
+
"ipv4",
|
|
11
|
+
"ipv6",
|
|
12
|
+
"uuid",
|
|
13
|
+
"parser",
|
|
14
|
+
"validator",
|
|
15
|
+
"RFC3986",
|
|
16
|
+
"RFC3987"
|
|
17
|
+
],
|
|
18
|
+
"homepage": "https://github.com/SorinGFS/identifier-js#readme",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/SorinGFS/identifier-js/issues"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/SorinGFS/identifier-js.git"
|
|
25
|
+
},
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"author": "SorinGFS",
|
|
28
|
+
"type": "commonjs",
|
|
29
|
+
"main": "index.js",
|
|
30
|
+
"scripts": {
|
|
31
|
+
"update-deps": "npx npm-check-updates -u && npm install",
|
|
32
|
+
"test": "node \"#/public/tests/vitest-run.js\""
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"url-templates": "^1.0.7"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=20.0.0"
|
|
39
|
+
},
|
|
40
|
+
"engineStrict": true,
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"vitest": "^4.1.11"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/readme.md
CHANGED
|
@@ -17,7 +17,7 @@ description: An RFC 3986 and RFC 3987 parser, validator, and reference resolver
|
|
|
17
17
|
- UUID and UUIDv4 lexical validation;
|
|
18
18
|
- lazily compiled and cached regular expressions.
|
|
19
19
|
|
|
20
|
-
The package is synchronous, CommonJS, and supports Node.js
|
|
20
|
+
The package is synchronous, CommonJS, and supports Node.js 20 or newer. Browser use requires a bundler or runtime that supports CommonJS dependencies and Unicode regular expressions.
|
|
21
21
|
|
|
22
22
|
## Install
|
|
23
23
|
|
|
@@ -435,11 +435,21 @@ The current suite contains 418 active tests covering URI/IRI validation and pars
|
|
|
435
435
|
|
|
436
436
|
The reference-conversion changes were additionally checked against 2,646 combinations of paths, absent/empty/non-empty queries, and absent/empty/non-empty fragments.
|
|
437
437
|
|
|
438
|
+
Continuous integration materializes the public test suite and runs it on Node.js 20, 22, and 24 across Ubuntu, Windows, and macOS.
|
|
439
|
+
|
|
438
440
|
<details>
|
|
439
441
|
<summary><strong>Tests</strong></summary>
|
|
440
442
|
|
|
441
443
|
The test suite and supporting ABNF source documents are maintained separately as public workspace data, so they are not included in the package or canonical repository. Users and contributors who need them can materialize them into a cloned repository with [gh-workspace-data](https://github.com/SorinGFS/gh-workspace-data).
|
|
442
444
|
|
|
445
|
+
Install the project development dependencies:
|
|
446
|
+
|
|
447
|
+
```sh
|
|
448
|
+
npm install
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
Vitest is a development dependency and is not installed for consumers of the published library.
|
|
452
|
+
|
|
443
453
|
Install the GitHub CLI extension once:
|
|
444
454
|
|
|
445
455
|
```sh
|
|
@@ -455,13 +465,13 @@ gh workspace-data load
|
|
|
455
465
|
|
|
456
466
|
The tests are materialized as ordinary local files under `#/public/tests/`, and the supporting documents are available under `#/public/docs/`. Both remain excluded from the canonical Git repository.
|
|
457
467
|
|
|
458
|
-
Run the materialized suite
|
|
468
|
+
Run the materialized suite:
|
|
459
469
|
|
|
460
470
|
```sh
|
|
461
471
|
npm test
|
|
462
472
|
```
|
|
463
473
|
|
|
464
|
-
|
|
474
|
+
`npm test` exits unsuccessfully when any discovered test, hook, or test-module import fails.
|
|
465
475
|
|
|
466
476
|
</details>
|
|
467
477
|
|