@cosyte/script-utils 0.1.4 → 0.1.5
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/CHANGELOG.md +6 -0
- package/catalog.json +5 -5
- package/internal-refs.js +32 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f5e1a1f: The internal-refs phase rule lets two kinds of ordinary prose through. `phase` as the second half of a compound word is no longer a hit (`connect-phase socket`, `two-phase state`, `read-phase timeout`), and neither is `phase` or `phases` followed by `where`, `are`, `was`, `were`, `during` or `at` (`All 5 phases are defined`, `Connection lifecycle phase where the error occurred`). A phase named beside those words is still a hit (`shipped in phase 2`, `Phase 3 was where it failed`, `Phase-L`), and both guards' passages are in the rule's self-test floor, so every run proves them. The catalog is regenerated from each library's current package.json: the terminology, deid and synth descriptions take the serial comma, the cli record carries cli's current description, and cli's engines are `>=22.0.0`.
|
|
8
|
+
|
|
3
9
|
## 0.1.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/catalog.json
CHANGED
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
{
|
|
117
117
|
"name": "@cosyte/terminology",
|
|
118
118
|
"slug": "terminology",
|
|
119
|
-
"description": "Terminology engine for US healthcare code systems in Node.js and TypeScript: FHIR $translate, $lookup, $validate-code and $expand over code systems, value sets and maps you supply.",
|
|
119
|
+
"description": "Terminology engine for US healthcare code systems in Node.js and TypeScript: FHIR $translate, $lookup, $validate-code, and $expand over code systems, value sets, and maps you supply.",
|
|
120
120
|
"line": "0.1",
|
|
121
121
|
"engines": {
|
|
122
122
|
"node": ">=22.0.0"
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
{
|
|
143
143
|
"name": "@cosyte/deid",
|
|
144
144
|
"slug": "deid",
|
|
145
|
-
"description": "Healthcare de-identification for Node.js and TypeScript: applies a HIPAA Safe Harbor policy to HL7 v2, C-CDA, FHIR R4, X12, NCPDP Telecom and DICOM, fails closed, and emits a value-free manifest.",
|
|
145
|
+
"description": "Healthcare de-identification for Node.js and TypeScript: applies a HIPAA Safe Harbor policy to HL7 v2, C-CDA, FHIR R4, X12, NCPDP Telecom, and DICOM, fails closed, and emits a value-free manifest.",
|
|
146
146
|
"line": "0.1",
|
|
147
147
|
"engines": {
|
|
148
148
|
"node": ">=22.0.0"
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
{
|
|
156
156
|
"name": "@cosyte/synth",
|
|
157
157
|
"slug": "synth",
|
|
158
|
-
"description": "Deterministic, seedable synthetic healthcare test fixtures for Node.js and TypeScript: HL7 v2, FHIR R4 and US Core, C-CDA, X12, NCPDP and ASTM, spec-clean by construction and never real PHI.",
|
|
158
|
+
"description": "Deterministic, seedable synthetic healthcare test fixtures for Node.js and TypeScript: HL7 v2, FHIR R4 and US Core, C-CDA, X12, NCPDP, and ASTM, spec-clean by construction and never real PHI.",
|
|
159
159
|
"line": "0.1",
|
|
160
160
|
"engines": {
|
|
161
161
|
"node": ">=22.0.0"
|
|
@@ -181,10 +181,10 @@
|
|
|
181
181
|
{
|
|
182
182
|
"name": "@cosyte/cli",
|
|
183
183
|
"slug": "cli",
|
|
184
|
-
"description": "The
|
|
184
|
+
"description": "The Cosyte command line for Node.js and TypeScript: one command over HL7 v2, FHIR R4, X12, ASTM, NCPDP, C-CDA, DICOM, and MLLP, with HL7 v2 to FHIR conversion from transform, code mapping from terminology, and the cosyte-mcp MCP server for agents. Value-free diagnostics and a documented exit-code contract.",
|
|
185
185
|
"line": "0.1",
|
|
186
186
|
"engines": {
|
|
187
|
-
"node": ">=22.0.0
|
|
187
|
+
"node": ">=22.0.0"
|
|
188
188
|
},
|
|
189
189
|
"repository": "https://github.com/cosyte/cli",
|
|
190
190
|
"docs": "https://docs.cosyte.com/cli",
|
package/internal-refs.js
CHANGED
|
@@ -230,10 +230,28 @@ const PHASE_NOT_CLINICAL =
|
|
|
230
230
|
"(?<!study )(?<!clinical )(?<!trial )(?<!acute )(?<!chronic )(?<!luteal )(?<!follicular )" +
|
|
231
231
|
"(?<!liquid )(?<!gas )";
|
|
232
232
|
|
|
233
|
-
/**
|
|
233
|
+
/**
|
|
234
|
+
* Lookbehind that drops `phase` as the second half of a compound word.
|
|
235
|
+
*
|
|
236
|
+
* `connect-phase socket`, `two-phase state` and `read-phase timeout` describe a protocol, not a
|
|
237
|
+
* roadmap: a letter and a hyphen in front of `phase` make it part of an adjective. Only the
|
|
238
|
+
* characters BEFORE the word are read, so `Phase-L` (the hyphen after it) is still a hit, and so is
|
|
239
|
+
* a phase after a digit and a hyphen.
|
|
240
|
+
*/
|
|
241
|
+
const PHASE_NOT_COMPOUND = "(?<![A-Za-z]-)";
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Lookahead that drops the clinical-study field-name tails, the trial roman numerals, and the
|
|
245
|
+
* words that make `phase` a noun in a sentence rather than the name of one.
|
|
246
|
+
*
|
|
247
|
+
* `All 5 phases are defined`, `the lifecycle phase where the error occurred`, `the phase was`, `the
|
|
248
|
+
* phases were`, `the phase during which` and `the phase at which` say what a phase is. A roadmap
|
|
249
|
+
* phase is named by what follows the word, and none of these words names one.
|
|
250
|
+
*/
|
|
234
251
|
const PHASE_NOT_FIELD =
|
|
235
252
|
"(?!of\\b|with\\b|in\\b|out\\b|the\\b|and\\b|is\\b|for\\b|to\\b|identifier\\b|start\\b|end\\b|" +
|
|
236
|
-
"evaluability\\b|number\\b|
|
|
253
|
+
"evaluability\\b|number\\b|where\\b|are\\b|was\\b|were\\b|during\\b|at\\b|" +
|
|
254
|
+
"(?:I{1,3}|IV)\\s+(?:trial|stud|clinical|oncolog))";
|
|
237
255
|
|
|
238
256
|
/**
|
|
239
257
|
* Imaging vocabulary that follows `slice` in reference material rather than in our jargon.
|
|
@@ -340,7 +358,8 @@ export function compileCanonicalRules(resolved) {
|
|
|
340
358
|
name: "phase or wave language",
|
|
341
359
|
patterns: [
|
|
342
360
|
new RegExp(
|
|
343
|
-
`\\b(?:roadmap phases?\\b[ ]?[A-Za-z0-9]*|${PHASE_NOT_CLINICAL}phases?[ -]
|
|
361
|
+
`\\b(?:roadmap phases?\\b[ ]?[A-Za-z0-9]*|${PHASE_NOT_CLINICAL}${PHASE_NOT_COMPOUND}phases?[ -]` +
|
|
362
|
+
`${PHASE_NOT_FIELD}` +
|
|
344
363
|
`[A-Za-z0-9]+[a-z]?\\b|wave \\d+\\b|the \\w+ and final phase\\b|` +
|
|
345
364
|
`documentation residual\\b|${ORDINAL} (?:slice|wave)\\b)`,
|
|
346
365
|
"gi",
|
|
@@ -350,12 +369,22 @@ export function compileCanonicalRules(resolved) {
|
|
|
350
369
|
"Phase 5b closes it (Phase W, Phase-L and the thirteenth slice landed earlier, in wave 2)",
|
|
351
370
|
// The plural, which ten of the eleven per-repository copies matched (`phases?[ -]`).
|
|
352
371
|
"Phases 1 to 6 shipped together",
|
|
372
|
+
// What the two guards must still catch: a phase named next to a compound word, and a
|
|
373
|
+
// phase named before the words that make a bare `phase` a noun.
|
|
374
|
+
"The connect-phase socket shipped in phase 2",
|
|
375
|
+
"Phase 3 was where the error occurred",
|
|
353
376
|
],
|
|
354
377
|
negatives: [
|
|
355
378
|
"CSP-1 Study Phase Identifier, CSP-2 Study Phase Start Date/Time, CSP-3 Study Phase End " +
|
|
356
379
|
"Date/Time, CSP-4 Study Phase Evaluability; a Phase III oncology trial and a Phase II " +
|
|
357
380
|
"study; the acute phase reactant; the adapter stays in phase with the source system " +
|
|
358
381
|
"and is out of phase",
|
|
382
|
+
// The compound-word guard: `phase` as the second half of an adjective.
|
|
383
|
+
"The connect-phase socket, the two-phase state and the read-phase timeout",
|
|
384
|
+
// The sentence guard: `phase` as a noun followed by what it is, not by its name.
|
|
385
|
+
"All 5 phases are defined; Connection lifecycle phase where the error occurred; the " +
|
|
386
|
+
"phase was open, the phases were closed, and a phase during which and a phase at which " +
|
|
387
|
+
"the socket failed",
|
|
359
388
|
],
|
|
360
389
|
},
|
|
361
390
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosyte/script-utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Zero-dependency helpers for the repo-local gate scripts in @cosyte/* repos.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"access": "public"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"vitest": "4.1.
|
|
101
|
+
"vitest": "4.1.12"
|
|
102
102
|
},
|
|
103
103
|
"scripts": {
|
|
104
104
|
"build": "node ../../scripts/pack-emdash-gate.mjs",
|