jssm 5.75.0 → 5.76.2
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 +49 -37
- package/README.md +3 -3
- package/dist/es6/jssm-dot.js +1 -1
- package/dist/es6/jssm.js +2 -1
- package/dist/es6/jssm_types.d.ts +9 -6
- package/dist/es6/jssm_util.d.ts +9 -1
- package/dist/es6/jssm_util.js +17 -1
- package/dist/es6/version.js +1 -1
- package/dist/jssm.es5.cjs.js +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/jest-dragon.config.js +33 -0
- package/jssm_types.d.ts +9 -6
- package/jssm_util.d.ts +9 -1
- package/package.json +13 -9
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
module.exports = {
|
|
3
|
+
|
|
4
|
+
testEnvironment : 'node',
|
|
5
|
+
|
|
6
|
+
moduleFileExtensions : ['js', 'ts'],
|
|
7
|
+
coveragePathIgnorePatterns : ["/node_modules/", "/src/ts/tests/"],
|
|
8
|
+
testMatch : ['**/*.maximal.ts'],
|
|
9
|
+
|
|
10
|
+
transform : { '^.+\\.ts$': 'ts-jest' },
|
|
11
|
+
|
|
12
|
+
verbose : false,
|
|
13
|
+
collectCoverage : true,
|
|
14
|
+
coverageDirectory : "coverage/ksd/",
|
|
15
|
+
|
|
16
|
+
coverageThreshold : {
|
|
17
|
+
global : {
|
|
18
|
+
branches : 0,
|
|
19
|
+
functions : 0,
|
|
20
|
+
lines : 0,
|
|
21
|
+
statements : 0,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
collectCoverageFrom: ["src/ts/**/{!(jssm-dot),}.{js,ts}"],
|
|
26
|
+
|
|
27
|
+
reporters: [
|
|
28
|
+
['default', {}],
|
|
29
|
+
['jest-json-reporter2', { outputDir: './coverage/ksd', outputFile: 'metrics.json', fullOutput: false }],
|
|
30
|
+
// ['jest-json-reporter2', { outputDir: './coverage/ksd', outputFile: 'extended-metrics.json', fullOutput: true }],
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
};
|
package/jssm_types.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
declare type StateType = string;
|
|
2
2
|
declare type JssmSuccess = {
|
|
3
3
|
success: true;
|
|
4
|
-
};
|
|
4
|
+
}; /** Composite type indicating success as part of a result */
|
|
5
5
|
declare type JssmFailure = {
|
|
6
6
|
success: false;
|
|
7
7
|
error: any;
|
|
8
|
-
};
|
|
8
|
+
}; /** Composite type indicating an error, and why, as part of a result */
|
|
9
9
|
declare type JssmIncomplete = {
|
|
10
10
|
success: 'incomplete';
|
|
11
|
-
};
|
|
12
|
-
declare type JssmResult = JssmSuccess | JssmFailure | JssmIncomplete;
|
|
11
|
+
}; /** Composite type indicating that a result isn't finished */
|
|
12
|
+
declare type JssmResult = JssmSuccess | JssmFailure | JssmIncomplete; /** Composite type composing whether or not a result was successful */
|
|
13
13
|
declare type JssmColor = string;
|
|
14
14
|
declare type JssmPermitted = 'required' | 'disallowed';
|
|
15
15
|
declare type JssmPermittedOpt = 'required' | 'disallowed' | 'optional';
|
|
16
16
|
declare type JssmArrow = '->' | '<-' | '<->' | '<=->' | '<~->' | '=>' | '<=' | '<=>' | '<-=>' | '<~=>' | '~>' | '<~' | '<~>' | '<-~>' | '<=~>';
|
|
17
|
+
/**
|
|
18
|
+
* A type teaching Typescript the various supported shapes for nodes, mostly inherited from GraphViz
|
|
19
|
+
*/
|
|
17
20
|
declare type JssmShape = "box" | "polygon" | "ellipse" | "oval" | "circle" | "point" | "egg" | "triangle" | "plaintext" | "plain" | "diamond" | "trapezium" | "parallelogram" | "house" | "pentagon" | "hexagon" | "septagon" | "octagon" | "doublecircle" | "doubleoctagon" | "tripleoctagon" | "invtriangle" | "invtrapezium" | "invhouse" | "Mdiamond" | "Msquare" | "Mcircle" | "rect" | "rectangle" | "square" | "star" | "none" | "underline" | "cylinder" | "note" | "tab" | "folder" | "box3d" | "component" | "promoter" | "cds" | "terminator" | "utr" | "primersite" | "restrictionsite" | "fivepoverhang" | "threepoverhang" | "noverhang" | "assembly" | "signature" | "insulator" | "ribosite" | "rnastab" | "proteasesite" | "proteinstab" | "rpromoter" | "rarrow" | "larrow" | "lpromoter" | "record";
|
|
18
21
|
declare type JssmArrowDirection = 'left' | 'right' | 'both';
|
|
19
22
|
declare type JssmArrowKind = 'none' | 'legal' | 'main' | 'forced';
|
|
@@ -252,7 +255,7 @@ declare type HookComplexResult<mDT> = {
|
|
|
252
255
|
state?: StateType;
|
|
253
256
|
data?: mDT;
|
|
254
257
|
};
|
|
255
|
-
declare type HookResult<mDT> = true | false | undefined | void | HookComplexResult<mDT>;
|
|
258
|
+
declare type HookResult<mDT> = true | false | undefined | void | HookComplexResult<mDT>; /** Documents whether a hook succeeded, either with a primitive or a reference to the hook complex object */
|
|
256
259
|
declare type HookContext<mDT> = {
|
|
257
260
|
data: mDT;
|
|
258
261
|
};
|
|
@@ -261,4 +264,4 @@ declare type PostHookHandler<mDT> = (hook_context: HookContext<mDT>) => void;
|
|
|
261
264
|
declare type JssmErrorExtendedInfo = {
|
|
262
265
|
requested_state?: StateType | undefined;
|
|
263
266
|
};
|
|
264
|
-
export { JssmColor, JssmTransition, JssmTransitions, JssmTransitionList, JssmTransitionRule, JssmArrow, JssmArrowKind, JssmArrowDirection, JssmGenericConfig, JssmGenericState, JssmGenericMachine, JssmParseTree, JssmCompileSe, JssmCompileSeStart, JssmCompileRule, JssmPermitted, JssmPermittedOpt, JssmResult, JssmStateDeclaration, JssmStateDeclarationRule, JssmLayout, JssmParseFunctionType, JssmMachineInternalState, JssmErrorExtendedInfo, FslDirection, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult };
|
|
267
|
+
export { JssmColor, JssmShape, JssmTransition, JssmTransitions, JssmTransitionList, JssmTransitionRule, JssmArrow, JssmArrowKind, JssmArrowDirection, JssmGenericConfig, JssmGenericState, JssmGenericMachine, JssmParseTree, JssmCompileSe, JssmCompileSeStart, JssmCompileRule, JssmPermitted, JssmPermittedOpt, JssmResult, JssmStateDeclaration, JssmStateDeclarationRule, JssmLayout, JssmParseFunctionType, JssmMachineInternalState, JssmErrorExtendedInfo, FslDirection, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult };
|
package/jssm_util.d.ts
CHANGED
|
@@ -49,4 +49,12 @@ declare const hook_name: (from: string, to: string) => string;
|
|
|
49
49
|
*
|
|
50
50
|
*/
|
|
51
51
|
declare const named_hook_name: (from: string, to: string, action: string) => string;
|
|
52
|
-
|
|
52
|
+
/*******
|
|
53
|
+
*
|
|
54
|
+
* Creates a Mulberry32 random generator. Used by the randomness test suite.
|
|
55
|
+
*
|
|
56
|
+
* Sourced from `bryc` at StackOverflow: https://stackoverflow.com/a/47593316/763127
|
|
57
|
+
*
|
|
58
|
+
*/
|
|
59
|
+
declare const make_mulberry_rand: (a?: number | undefined) => () => number;
|
|
60
|
+
export { seq, arr_uniq_p, histograph, weighted_histo_key, weighted_rand_select, weighted_sample_select, array_box_if_string, hook_name, named_hook_name, make_mulberry_rand };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jssm",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.76.2",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=10.0.0"
|
|
6
6
|
},
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
"browser": "dist/jssm.es5.iife.js",
|
|
29
29
|
"types": "./jssm.d.ts",
|
|
30
30
|
"scripts": {
|
|
31
|
-
"jest": "jest -c jest-stoch.config.js --color --verbose
|
|
31
|
+
"jest-stoch": "jest -c jest-stoch.config.js --color --verbose",
|
|
32
|
+
"jest-dragon": "jest -c jest-dragon.config.js --color --verbose",
|
|
33
|
+
"jest-spec": "jest -c jest-spec.config.js --color --verbose",
|
|
34
|
+
"jest": "npm run jest-spec",
|
|
32
35
|
"test": "npm run make && npm run jest",
|
|
33
36
|
"clean": "rm -rf dist && rm -rf docs && cd coverage && rm -rf cloc && cd .. && rm -f src/ts/jssm-dot.ts && rm -f src/ts/version.ts && rm -f *.d.ts && mkdir dist && mkdir docs && cd coverage && mkdir cloc && cd ..",
|
|
34
37
|
"peg": "rm -f src/ts/jssm-dot.js && pegjs src/ts/jssm-dot.peg && node src/buildjs/fixparser.js && rm src/ts/jssm-dot.js",
|
|
@@ -49,7 +52,7 @@
|
|
|
49
52
|
"min_iife": "mv dist/jssm.es5.iife.js dist/jssm.es5.iife.nonmin.js && terser dist/jssm.es5.iife.nonmin.js > dist/jssm.es5.iife.js",
|
|
50
53
|
"min_cjs": "mv dist/jssm.es5.cjs.js dist/jssm.es5.cjs.nonmin.js && terser dist/jssm.es5.cjs.nonmin.js > dist/jssm.es5.cjs.js",
|
|
51
54
|
"site": "cp src/site/* docs/ && cp -r src/assets docs/assets/",
|
|
52
|
-
"docs": "typedoc src/ts/jssm.ts --options typedoc-options.js",
|
|
55
|
+
"docs": "typedoc src/ts/jssm.ts src/ts/jssm_types.ts src/ts/jssm_constants.ts src/ts/jssm_error.ts src/ts/jssm_util.ts src/ts/version.ts --options typedoc-options.js",
|
|
53
56
|
"cloc": "cloc --quiet ./src/** --exclude-list-file=./.clocignore --3 --json --out=./coverage/cloc/report_wt.json && cloc --quiet ./src/** --exclude-list-file=./.clocignore --exclude-dir=tests --3 --json --out=./coverage/cloc/report_nt.json && node ./src/buildjs/cloc_report.js",
|
|
54
57
|
"readme": "rm -f ./README.md && node ./src/buildjs/make_readme.js",
|
|
55
58
|
"changelog": "rm -f CHANGELOG.md && rm -f ./src/doc_md/CHANGELOG.md && better_git_changelog -b && cp CHANGELOG.* ./src/doc_md/"
|
|
@@ -102,10 +105,10 @@
|
|
|
102
105
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
103
106
|
"@rollup/plugin-replace": "^4.0.0",
|
|
104
107
|
"@types/jest": "^27.0.2",
|
|
105
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
106
|
-
"@typescript-eslint/parser": "^
|
|
108
|
+
"@typescript-eslint/eslint-plugin": "^5.30.4",
|
|
109
|
+
"@typescript-eslint/parser": "^5.30.4",
|
|
107
110
|
"benny": "^3.7.1",
|
|
108
|
-
"cloc": "^2.
|
|
111
|
+
"cloc": "^2.10.0",
|
|
109
112
|
"coveralls": "^3.0.11",
|
|
110
113
|
"eslint": "^7.32.0",
|
|
111
114
|
"eslint-plugin-fp": "^2.3.0",
|
|
@@ -123,13 +126,14 @@
|
|
|
123
126
|
"terser": "^5.13.1",
|
|
124
127
|
"text_audit": "^0.9.3",
|
|
125
128
|
"ts-jest": "^27.0.7",
|
|
126
|
-
"typedoc": "^0.22.
|
|
127
|
-
"typescript": "^4.
|
|
129
|
+
"typedoc": "^0.22.18",
|
|
130
|
+
"typescript": "^4.7.4",
|
|
128
131
|
"xml2js": "^0.4.23"
|
|
129
132
|
},
|
|
130
133
|
"dependencies": {
|
|
131
134
|
"better_git_changelog": "^1.6.1",
|
|
132
135
|
"circular_buffer_js": "^1.10.0",
|
|
133
|
-
"reduce-to-639-1": "^1.0.4"
|
|
136
|
+
"reduce-to-639-1": "^1.0.4",
|
|
137
|
+
"typedoc-plugin-missing-exports": "^0.23.0"
|
|
134
138
|
}
|
|
135
139
|
}
|