identifier-js 0.1.1 → 0.1.3
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 +14 -4
- package/package.json +1 -1
- package/readme.md +42 -25
|
@@ -45,11 +45,21 @@ jobs:
|
|
|
45
45
|
path: workspace-data
|
|
46
46
|
sparse-checkout: tests/github.com/SorinGFS/identifier-js
|
|
47
47
|
|
|
48
|
-
#
|
|
49
|
-
- name:
|
|
48
|
+
# Check out the extension-owned runtime helper required by materialized dispatchers.
|
|
49
|
+
- name: Check out workspace runtime
|
|
50
|
+
uses: actions/checkout@v7
|
|
51
|
+
with:
|
|
52
|
+
repository: SorinGFS/gh-workspace-data
|
|
53
|
+
ref: v0.4.0
|
|
54
|
+
path: workspace-runtime
|
|
55
|
+
sparse-checkout: src/version-layers.js
|
|
56
|
+
sparse-checkout-cone-mode: false
|
|
57
|
+
|
|
58
|
+
# Reproduce the ordinary workspace layout generated by gh-workspace-data.
|
|
59
|
+
- name: Materialize public tests and runtime
|
|
50
60
|
run: >-
|
|
51
|
-
node -e "require('node:fs').cpSync('workspace-data/tests/github.com/SorinGFS/identifier-js', '#/public/tests', { recursive: true })"
|
|
61
|
+
node -e "const fs = require('node:fs'); fs.cpSync('workspace-data/tests/github.com/SorinGFS/identifier-js', '#/public/tests', { recursive: true }); fs.copyFileSync('workspace-runtime/src/version-layers.js', '#/version-layers.js')"
|
|
52
62
|
|
|
53
|
-
# Execute the materialized
|
|
63
|
+
# Execute the materialized Node.js suite and propagate any failed result.
|
|
54
64
|
- name: Run tests
|
|
55
65
|
run: npm test
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -429,26 +429,12 @@ RFC 9562 lists database keys, filenames, system identifiers, and transaction ide
|
|
|
429
429
|
|
|
430
430
|
</details>
|
|
431
431
|
|
|
432
|
-
##
|
|
432
|
+
## Verification
|
|
433
433
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
The active reference-conversion suite includes 2,646 generated combinations of target/base paths, absent/empty/non-empty target and base queries, and absent/empty/non-empty target fragments across equivalent URI and IRI families.
|
|
437
|
-
|
|
438
|
-
Continuous integration materializes the public test suite and runs it on Node.js 24 and 26 across Ubuntu, Windows, and macOS. The deterministic, single-command layout is designed to remain portable across projects, local environments, and CI runner matrices.
|
|
434
|
+
Tests, benchmarks, and supporting ABNF documents are maintained in [SorinGFS/public-data](https://github.com/SorinGFS/public-data) rather than in the package or canonical repository. The [gh-workspace-data](https://github.com/SorinGFS/gh-workspace-data) extension materializes those concerns together with the shared `#/version-layers.js` runtime required by both dispatchers.
|
|
439
435
|
|
|
440
436
|
<details>
|
|
441
|
-
<summary><strong>
|
|
442
|
-
|
|
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).
|
|
444
|
-
|
|
445
|
-
Install the project development dependencies:
|
|
446
|
-
|
|
447
|
-
```sh
|
|
448
|
-
npm install
|
|
449
|
-
```
|
|
450
|
-
|
|
451
|
-
The suite uses the `node:test` module built into Node.js and does not require a separate test-runner dependency.
|
|
437
|
+
<summary><strong>gh-workspace-data usage</strong></summary>
|
|
452
438
|
|
|
453
439
|
Install the GitHub CLI extension once:
|
|
454
440
|
|
|
@@ -456,36 +442,67 @@ Install the GitHub CLI extension once:
|
|
|
456
442
|
gh extension install SorinGFS/gh-workspace-data
|
|
457
443
|
```
|
|
458
444
|
|
|
459
|
-
|
|
445
|
+
Initialize and load workspace data from the cloned project repository:
|
|
460
446
|
|
|
461
447
|
```sh
|
|
462
448
|
gh workspace-data init
|
|
463
449
|
gh workspace-data load
|
|
464
450
|
```
|
|
465
451
|
|
|
466
|
-
The
|
|
452
|
+
The extension materializes ordinary local files under `#/public/tests/`, `#/public/benchmarks/`, and `#/public/docs/`, while `#/version-layers.js` provides common deterministic version-layer discovery. The generated `#/` namespace remains excluded from the canonical Git repository and npm package.
|
|
453
|
+
|
|
454
|
+
Run `gh workspace-data load` again to refresh materialized data after public-data changes or an extension upgrade.
|
|
455
|
+
|
|
456
|
+
</details>
|
|
457
|
+
|
|
458
|
+
### Tests
|
|
459
|
+
|
|
460
|
+
The active suite contains 3,064 tests covering URI/IRI validation and parsing, scheme-specific hosts, IPv4, IPv6, ports, UUIDs, RFC 3986 resolution examples, empty components, absolute conversion, and relative-reference round trips, including 2,646 generated combinations of target/base paths, query-presence states, and target-fragment states across equivalent URI and IRI families.
|
|
461
|
+
|
|
462
|
+
<details>
|
|
463
|
+
<summary><strong>Test details</strong></summary>
|
|
467
464
|
|
|
468
|
-
|
|
465
|
+
Install package dependencies and run the materialized suite:
|
|
469
466
|
|
|
470
467
|
```sh
|
|
468
|
+
npm install
|
|
471
469
|
npm test
|
|
472
470
|
```
|
|
473
471
|
|
|
474
|
-
`
|
|
472
|
+
The suite uses the `node:test` module built into Node.js and requires no separate test-runner dependency. Its deterministic dispatcher processes eligible version layers, numeric fixtures, and explicit concern entry points in defined order. The materialized `#/public/tests/README.md` documents fixture discovery, version eligibility, ordering, callback configuration, and suite registration.
|
|
473
|
+
|
|
474
|
+
`npm test` exits unsuccessfully when configuration, fixture loading, suite registration, or a test fails. Continuous integration runs the suite on Node.js 24 and 26 across Ubuntu, Windows, and macOS.
|
|
475
475
|
|
|
476
476
|
</details>
|
|
477
477
|
|
|
478
|
-
|
|
478
|
+
### Benchmarks
|
|
479
|
+
|
|
480
|
+
The materialized benchmark suite provides portable, version-aware measurements for every exported function plus isolated package loading, reporting initial-call behavior, warmed latency statistics, integer throughput, workload counts, representative inputs, and environment metadata.
|
|
479
481
|
|
|
480
|
-
|
|
482
|
+
<details>
|
|
483
|
+
<summary><strong>Benchmark details</strong></summary>
|
|
481
484
|
|
|
482
|
-
Run the
|
|
485
|
+
Run the standard workload:
|
|
483
486
|
|
|
484
487
|
```sh
|
|
485
488
|
npm run benchmark
|
|
486
489
|
```
|
|
487
490
|
|
|
488
|
-
|
|
491
|
+
Run a reduced workload with machine-readable output for CI smoke checks or artifacts:
|
|
492
|
+
|
|
493
|
+
```sh
|
|
494
|
+
node ./#/public/benchmarks --quick --json
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
Direct invocation also supports an explicit iteration count; `npm run benchmark` retains the standard 100,000 iterations per sample:
|
|
498
|
+
|
|
499
|
+
```sh
|
|
500
|
+
node ./#/public/benchmarks --iterations 250000
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
The materialized `#/public/benchmarks/README.md` documents concern registration, version eligibility, workload controls, measurement semantics, output fields, and guidance for interpreting results from noisy CI runners. Benchmark values are observations rather than correctness assertions.
|
|
504
|
+
|
|
505
|
+
</details>
|
|
489
506
|
|
|
490
507
|
## Authoritative references
|
|
491
508
|
|