Comparing version
179
package.json
{ | ||
"name": "parjs", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Library for building parsers using combinators.", | ||
"keywords": [ | ||
"parser", | ||
"parsing", | ||
"parser combinator", | ||
"parser-combinator", | ||
"functional", | ||
"typescript", | ||
"text", | ||
"string", | ||
"language", | ||
"combinator", | ||
"parsec", | ||
"fparsec", | ||
"parsimmon" | ||
], | ||
"homepage": "https://github.com/GregRos/parjs", | ||
"bugs": { | ||
"url": "https://github.com/GregRos/parjs/issues" | ||
}, | ||
"repository": "https://github.com/GregRos/parjs", | ||
"homepage": "https://github.com/GregRos/parjs", | ||
"license": "MIT", | ||
"author": "GregRos <work.gregr@gmail.com>", | ||
"contributors": [ | ||
{ | ||
"name": "GregRos", | ||
"email": "work.gregr@gmail.com" | ||
}, | ||
{ | ||
"name": "Mika Vilpas", | ||
"email": "mika.vilpas@gmail.com" | ||
}, | ||
{ | ||
"name": "Maarten", | ||
"email": "digitalheir@users.noreply.github.com" | ||
}, | ||
{ | ||
"name": "Maxime Mangel", | ||
"email": "mangel.maxime@protonmail.com" | ||
}, | ||
{ | ||
"name": "Paul Gowder", | ||
"email": "paultopia@users.noreply.github.com" | ||
}, | ||
{ | ||
"name": "Raidou", | ||
"email": "weirongxu.raidou@gmail.com" | ||
}, | ||
{ | ||
"name": "Xavier Maso", | ||
"email": "xavier.maso@oracle.com" | ||
}, | ||
{ | ||
"name": "sheey11", | ||
"email": "13375959+sheey11@users.noreply.github.com" | ||
}, | ||
{ | ||
"name": "Collider LI", | ||
"email": "lhc199652@gmail.com" | ||
} | ||
], | ||
"sideEffects": false, | ||
"exports": { | ||
@@ -32,5 +92,24 @@ ".": { | ||
}, | ||
"main": "dist/lib/index.js", | ||
"typesVersions": { | ||
"*": { | ||
"combinators": [ | ||
"./dist/lib/combinators.d.ts" | ||
], | ||
"internal": [ | ||
"./dist/lib/internal.d.ts" | ||
] | ||
} | ||
}, | ||
"typings": "dist/lib/index", | ||
"description": "A parser-combinator library for JavaScript.", | ||
"main": "dist/lib/index.js", | ||
"files": [ | ||
"src", | ||
"dist", | ||
"package.json", | ||
"package-lock.json", | ||
"tsconfig.json", | ||
"CHANGELOG.md", | ||
"LICENSE.md", | ||
"README.md" | ||
], | ||
"scripts": { | ||
@@ -50,14 +129,22 @@ "test": "jest --coverage", | ||
}, | ||
"keywords": [ | ||
"parser", | ||
"combinator", | ||
"parsing", | ||
"text", | ||
"string", | ||
"parser combinator", | ||
"parser-combinator", | ||
"functional" | ||
], | ||
"author": "Greg Rosenbaum", | ||
"license": "MIT", | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "yarn run rebuild && lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.{js,css,md,ts,html,htm,yaml,yml,json}": "prettier --write" | ||
}, | ||
"prettier": "./.prettierrc.json", | ||
"nyc": { | ||
"include": [ | ||
"dist/lib/**/*.js" | ||
], | ||
"produce-source-map": true, | ||
"reporter": [ | ||
"lcov", | ||
"text-summary" | ||
], | ||
"sourceMap": true | ||
}, | ||
"dependencies": { | ||
@@ -67,61 +154,31 @@ "char-info": "0.3.2" | ||
"devDependencies": { | ||
"@gregros/eslint-config": "0.4.0", | ||
"@swc/core": "1.3.96", | ||
"@swc/jest": "0.2.29", | ||
"@types/jest": "29.5.8", | ||
"@types/jest": "29.5.12", | ||
"@types/node": "20.9.1", | ||
"@typescript-eslint/eslint-plugin": "6.9.1", | ||
"@typescript-eslint/parser": "6.9.1", | ||
"eslint": "8.54.0", | ||
"eslint-plugin-jest": "27.6.0", | ||
"husky": "^9.0.10", | ||
"@typescript-eslint/eslint-plugin": "^7.7.1", | ||
"@typescript-eslint/parser": "^7.7.1", | ||
"eslint": "8.56.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-jest": "28.2.0", | ||
"husky": "9.0.11", | ||
"jest": "30.0.0-alpha.2", | ||
"lint-staged": "^15.2.2", | ||
"lint-staged": "15.2.2", | ||
"madge": "^6.1.0", | ||
"npm-run-all": "4.1.5", | ||
"prettier": "3.0.3", | ||
"prettier": "3.2.5", | ||
"prettier-plugin-jsdoc": "1.3.0", | ||
"prettier-plugin-organize-imports": "3.2.4", | ||
"prettier-plugin-packagejson": "2.5.0", | ||
"shelljs": "0.8.5", | ||
"shx": "0.3.4", | ||
"ts-node": "10.9.1", | ||
"typedoc": "0.25.3", | ||
"typedoc": "0.25.13", | ||
"typedoc-plugin-internal-external": "2.2.0", | ||
"typescript": "5.2.2" | ||
"typescript": "5.3.3" | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"combinators": [ | ||
"./dist/lib/combinators.d.ts" | ||
], | ||
"internal": [ | ||
"./dist/lib/internal.d.ts" | ||
] | ||
} | ||
}, | ||
"nyc": { | ||
"produce-source-map": true, | ||
"include": [ | ||
"dist/lib/**/*.js" | ||
], | ||
"reporter": [ | ||
"lcov", | ||
"text-summary" | ||
], | ||
"sourceMap": true | ||
}, | ||
"sideEffects": false, | ||
"files": [ | ||
"src", | ||
"dist", | ||
"package.json", | ||
"package-lock.json", | ||
"tsconfig.json", | ||
"CHANGELOG.md", | ||
"LICENSE.md", | ||
"README.md" | ||
], | ||
"packageManager": "yarn@4.1.1", | ||
"lint-staged": { | ||
"*.{js,css,md,ts,html,htm,yaml,yml,json}": "prettier --write" | ||
"engines": { | ||
"node": "^18.13.0 || ^20.9.0" | ||
} | ||
} |
@@ -113,6 +113,4 @@ # Parjs | ||
Dealing with failure is hard, whether you’re realizing you can never be a father, or whether you’re a parser combinator library. You need to be able to signal syntax errors to the user, but also be capable of parsing alternative expressions. | ||
`parjs` handles failure by using the SHF or 😕😬💀 system. It recognizes three kinds of failures: | ||
`parjs` handles it by using the SHF or 😕😬💀 system, which I just made up. It recognizes three kinds of failures: | ||
- 😕 **S**oft failures — A parser quickly says it’s not applicable to the input. Used to parse alternative inputs. | ||
@@ -414,4 +412,4 @@ - 😬 **H**ard failures — Parsing failed unexpectedly. Can only be handled by special combinators. | ||
* Returns a parser that succeeds if there is no more input. | ||
* @param result Optionally, the result the parser will yield. Defaults to | ||
* undefined. | ||
* | ||
* @param result Optionally, the result the parser will yield. Defaults to undefined. | ||
*/ | ||
@@ -418,0 +416,0 @@ export function eof<T>(result?: T): Parjser<T> { |
@@ -14,16 +14,16 @@ import type { Parjser } from "./parjser"; | ||
: Args extends [infer A, infer B, infer C, infer D, ...infer Rest] | ||
? A | B | C | D | union<Rest> | ||
: Args extends [infer A, infer B, infer C, ...infer Rest] | ||
? A | B | C | union<Rest> | ||
: Args extends [infer A, infer B, ...infer Rest] | ||
? A | B | union<Rest> | ||
: Args extends [infer A, ...infer Rest] | ||
? A | union<Rest> | ||
: never; | ||
? A | B | C | D | union<Rest> | ||
: Args extends [infer A, infer B, infer C, ...infer Rest] | ||
? A | B | C | union<Rest> | ||
: Args extends [infer A, infer B, ...infer Rest] | ||
? A | B | union<Rest> | ||
: Args extends [infer A, ...infer Rest] | ||
? A | union<Rest> | ||
: never; | ||
export type getParsedType<T extends ImplicitParjser<unknown>> = T extends RegExp | ||
? string[] | ||
: T extends string | ||
? T | ||
: T extends Parjser<infer U> | ||
? U | ||
: never; | ||
? T | ||
: T extends Parjser<infer U> | ||
? U | ||
: never; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
710926
0.38%0
-100%24
9.09%430
-0.46%