@witchcraft/expressit 0.2.2 → 0.3.1
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/README.md +1 -2
- package/dist/Lexer.d.ts +99 -94
- package/dist/Lexer.d.ts.map +1 -1
- package/dist/Lexer.js +221 -574
- package/dist/Parser.d.ts +26 -26
- package/dist/Parser.d.ts.map +1 -1
- package/dist/Parser.js +106 -116
- package/dist/ast/builders/array.js +7 -8
- package/dist/ast/builders/condition.d.ts +1 -1
- package/dist/ast/builders/condition.d.ts.map +1 -1
- package/dist/ast/builders/condition.js +2 -1
- package/dist/ast/builders/delim.d.ts +2 -2
- package/dist/ast/builders/delim.d.ts.map +1 -1
- package/dist/ast/builders/error.d.ts +2 -2
- package/dist/ast/builders/error.d.ts.map +1 -1
- package/dist/ast/builders/expression.d.ts +2 -2
- package/dist/ast/builders/expression.d.ts.map +1 -1
- package/dist/ast/builders/expression.js +4 -8
- package/dist/ast/builders/group.d.ts +1 -1
- package/dist/ast/builders/group.d.ts.map +1 -1
- package/dist/ast/builders/group.js +8 -11
- package/dist/ast/builders/pos.d.ts +2 -2
- package/dist/ast/builders/pos.d.ts.map +1 -1
- package/dist/ast/builders/token.d.ts +2 -2
- package/dist/ast/builders/token.d.ts.map +1 -1
- package/dist/ast/builders/token.js +1 -1
- package/dist/ast/builders/type.d.ts +2 -2
- package/dist/ast/builders/type.d.ts.map +1 -1
- package/dist/ast/builders/variable.d.ts +3 -3
- package/dist/ast/builders/variable.d.ts.map +1 -1
- package/dist/ast/builders/variable.js +5 -6
- package/dist/ast/createConditionNode.d.ts +1 -1
- package/dist/ast/createConditionNode.d.ts.map +1 -1
- package/dist/ast/createConditionNode.js +1 -2
- package/dist/ast/createGroupNode.d.ts +1 -1
- package/dist/ast/createGroupNode.d.ts.map +1 -1
- package/dist/ast/createToken.d.ts +2 -2
- package/dist/ast/createToken.d.ts.map +1 -1
- package/dist/ast/createToken.js +2 -2
- package/dist/ast/error.d.ts +2 -2
- package/dist/ast/error.d.ts.map +1 -1
- package/dist/ast/error.js +1 -0
- package/dist/ast/handlers.d.ts +23 -23
- package/dist/ast/handlers.d.ts.map +1 -1
- package/dist/ast/handlers.js +23 -26
- package/dist/examples/ParserWithSqlSupport.d.ts +5 -5
- package/dist/examples/ParserWithSqlSupport.d.ts.map +1 -1
- package/dist/examples/ParserWithSqlSupport.js +22 -28
- package/dist/examples/ShortcutContextParser.js +2 -5
- package/dist/index.js +2 -2
- package/dist/internal/ExpressitError.d.ts +2 -2
- package/dist/internal/ExpressitError.d.ts.map +1 -1
- package/dist/internal/ExpressitError.js +7 -10
- package/dist/internal/checkParserOpts.js +21 -22
- package/dist/internal/escapeVariableOrPrefix.js +1 -1
- package/dist/internal/parseParserOptions.js +3 -4
- package/dist/package.json.js +2 -60
- package/dist/types/ast.d.ts +60 -58
- package/dist/types/ast.d.ts.map +1 -1
- package/dist/types/ast.js +26 -27
- package/dist/types/autocomplete.d.ts +23 -21
- package/dist/types/autocomplete.d.ts.map +1 -1
- package/dist/types/autocomplete.js +24 -21
- package/dist/types/errors.d.ts +12 -10
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +8 -7
- package/dist/types/index.js +2 -2
- package/dist/types/parser.d.ts +3 -3
- package/dist/types/parser.d.ts.map +1 -1
- package/dist/utils/extractTokens.js +4 -5
- package/dist/utils/generateParentsMap.js +7 -8
- package/dist/utils/getCursorInfo.js +5 -3
- package/dist/utils/getOppositeDelimiter.d.ts +2 -2
- package/dist/utils/getOppositeDelimiter.d.ts.map +1 -1
- package/dist/utils/getOppositeDelimiter.js +1 -1
- package/dist/utils/getSurroundingErrors.js +2 -3
- package/dist/utils/isBracket.js +1 -1
- package/dist/utils/isDelimiter.d.ts +2 -2
- package/dist/utils/isDelimiter.d.ts.map +1 -1
- package/dist/utils/isDelimiter.js +1 -1
- package/dist/utils/isNode.js +1 -1
- package/dist/utils/isParen.d.ts +2 -2
- package/dist/utils/isParen.d.ts.map +1 -1
- package/dist/utils/isParen.js +1 -1
- package/dist/utils/isQuote.d.ts +2 -2
- package/dist/utils/isQuote.d.ts.map +1 -1
- package/dist/utils/isQuote.js +1 -1
- package/dist/utils/isToken.js +1 -1
- package/dist/utils/prettyAst.js +10 -11
- package/package.json +19 -20
- package/src/Lexer.ts +100 -90
- package/src/Parser.ts +68 -68
- package/src/ast/builders/condition.ts +3 -3
- package/src/ast/builders/delim.ts +4 -4
- package/src/ast/builders/error.ts +3 -3
- package/src/ast/builders/expression.ts +4 -8
- package/src/ast/builders/group.ts +2 -4
- package/src/ast/builders/pos.ts +3 -3
- package/src/ast/builders/token.ts +3 -3
- package/src/ast/builders/type.ts +2 -2
- package/src/ast/builders/variable.ts +5 -5
- package/src/ast/createConditionNode.ts +2 -2
- package/src/ast/createGroupNode.ts +4 -4
- package/src/ast/createToken.ts +6 -6
- package/src/ast/error.ts +2 -2
- package/src/ast/handlers.ts +20 -20
- package/src/examples/ParserWithSqlSupport.ts +12 -6
- package/src/internal/ExpressitError.ts +6 -6
- package/src/internal/checkParserOpts.ts +13 -13
- package/src/internal/escapeVariableOrPrefix.ts +1 -1
- package/src/types/ast.ts +101 -96
- package/src/types/autocomplete.ts +26 -22
- package/src/types/errors.ts +18 -13
- package/src/types/parser.ts +3 -3
- package/src/utils/extractTokens.ts +1 -1
- package/src/utils/getCursorInfo.ts +2 -2
- package/src/utils/getOppositeDelimiter.ts +3 -3
- package/src/utils/getSurroundingErrors.ts +4 -4
- package/src/utils/isDelimiter.ts +3 -3
- package/src/utils/isParen.ts +2 -2
- package/src/utils/isQuote.ts +2 -2
- package/src/utils/prettyAst.ts +3 -3
|
@@ -2,15 +2,14 @@ import "@alanscodelog/utils/types";
|
|
|
2
2
|
import { isNode } from "./isNode.js";
|
|
3
3
|
import { AST_TYPE } from "../types/ast.js";
|
|
4
4
|
function generateParentsMap(ast) {
|
|
5
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
6
5
|
const recursiveMap = arguments[1];
|
|
7
6
|
const map = recursiveMap ?? /* @__PURE__ */ new Map();
|
|
8
7
|
const self = generateParentsMap;
|
|
9
8
|
if (ast.type === AST_TYPE.VARIABLE) {
|
|
10
9
|
if (ast.prefix) map.set(ast.prefix, ast);
|
|
11
|
-
if (
|
|
12
|
-
if (
|
|
13
|
-
if (
|
|
10
|
+
if (ast.quote?.left) map.set(ast.quote.left, ast);
|
|
11
|
+
if (ast.quote?.right) map.set(ast.quote.right, ast);
|
|
12
|
+
if (ast.quote?.flags) map.set(ast.quote.flags, ast);
|
|
14
13
|
map.set(ast.value, ast);
|
|
15
14
|
} else if (ast.type === AST_TYPE.CONDITION) {
|
|
16
15
|
if (ast.operator) map.set(ast.operator, ast);
|
|
@@ -19,8 +18,8 @@ function generateParentsMap(ast) {
|
|
|
19
18
|
if (isNode(ast.property)) self(ast.property, map);
|
|
20
19
|
}
|
|
21
20
|
if (ast.propertyOperator) map.set(ast.propertyOperator, ast);
|
|
22
|
-
if (
|
|
23
|
-
if (
|
|
21
|
+
if (ast.sep?.left) map.set(ast.sep.left, ast);
|
|
22
|
+
if (ast.sep?.right) map.set(ast.sep.right, ast);
|
|
24
23
|
map.set(ast.value, ast);
|
|
25
24
|
if (isNode(ast.value)) self(ast.value, map);
|
|
26
25
|
} else if (ast.type === AST_TYPE.EXPRESSION) {
|
|
@@ -34,8 +33,8 @@ function generateParentsMap(ast) {
|
|
|
34
33
|
map.set(ast.prefix, ast);
|
|
35
34
|
if (isNode(ast.prefix)) self(ast.prefix, map);
|
|
36
35
|
}
|
|
37
|
-
if (
|
|
38
|
-
if (
|
|
36
|
+
if (ast.paren?.left) map.set(ast.paren.left, ast);
|
|
37
|
+
if (ast.paren?.right) map.set(ast.paren.right, ast);
|
|
39
38
|
map.set(ast.expression, ast);
|
|
40
39
|
if (isNode(ast.expression)) self(ast.expression, map);
|
|
41
40
|
} else if (ast.type === AST_TYPE.ARRAY) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { isArray } from "@alanscodelog/utils/isArray
|
|
2
|
-
import { unreachable } from "@alanscodelog/utils/unreachable
|
|
1
|
+
import { isArray } from "@alanscodelog/utils/isArray";
|
|
2
|
+
import { unreachable } from "@alanscodelog/utils/unreachable";
|
|
3
3
|
import { extractTokens } from "./extractTokens.js";
|
|
4
|
+
import "../types/ast.js";
|
|
5
|
+
import "../types/autocomplete.js";
|
|
4
6
|
function getCursorInfo(input, ast, index) {
|
|
5
7
|
const tokens = isArray(ast) ? ast : extractTokens(ast);
|
|
6
8
|
if (input.length < index || index < 0) {
|
|
@@ -37,7 +39,7 @@ function getCursorInfo(input, ast, index) {
|
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
if (token.start >= index) {
|
|
40
|
-
info.next
|
|
42
|
+
info.next ??= token;
|
|
41
43
|
if (token.valid && !info.valid.next) {
|
|
42
44
|
info.valid.next = token;
|
|
43
45
|
break;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { generateParentsMap } from "./generateParentsMap.js";
|
|
2
|
-
import { type AnyToken, type
|
|
2
|
+
import { type AnyToken, type TokenDelimiter } from "../types/ast.js";
|
|
3
3
|
/**
|
|
4
4
|
* Given a delimiter token, returns it's opposite pair, or undefined if the type passed was not a delimiter token (so you can pass any type without checking).
|
|
5
5
|
*/
|
|
6
|
-
export declare function getOppositeDelimiter(token: AnyToken, parentsMap: ReturnType<typeof generateParentsMap>): AnyToken<
|
|
6
|
+
export declare function getOppositeDelimiter(token: AnyToken, parentsMap: ReturnType<typeof generateParentsMap>): AnyToken<TokenDelimiter> | undefined;
|
|
7
7
|
//# sourceMappingURL=getOppositeDelimiter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOppositeDelimiter.d.ts","sourceRoot":"","sources":["../../src/utils/getOppositeDelimiter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAMjE,OAAO,EAAE,KAAK,QAAQ,EAAiE,KAAK,
|
|
1
|
+
{"version":3,"file":"getOppositeDelimiter.d.ts","sourceRoot":"","sources":["../../src/utils/getOppositeDelimiter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAMjE,OAAO,EAAE,KAAK,QAAQ,EAAiE,KAAK,cAAc,EAAqB,MAAM,iBAAiB,CAAA;AAEtJ;;GAEG;AACH,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,QAAQ,EACf,UAAU,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,GAC/C,QAAQ,CAAC,cAAc,CAAC,GAAG,SAAS,CAuBtC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TOKEN_TYPE } from "../types/ast.js";
|
|
2
2
|
function getSurroundingErrors(tokens, token) {
|
|
3
|
-
var _a, _b;
|
|
4
3
|
if (token.at) {
|
|
5
4
|
return [];
|
|
6
5
|
}
|
|
@@ -8,11 +7,11 @@ function getSurroundingErrors(tokens, token) {
|
|
|
8
7
|
let iNext = tokens[i] === token.next ? i : i + 1;
|
|
9
8
|
let iPrev = tokens[i] === token.next ? i - 1 : i;
|
|
10
9
|
const errors = [];
|
|
11
|
-
while (
|
|
10
|
+
while (tokens[iNext]?.valid === false) {
|
|
12
11
|
errors.push(tokens[iNext]);
|
|
13
12
|
iNext++;
|
|
14
13
|
}
|
|
15
|
-
while (
|
|
14
|
+
while (tokens[iPrev]?.valid === false) {
|
|
16
15
|
errors.push(tokens[iPrev]);
|
|
17
16
|
iPrev--;
|
|
18
17
|
}
|
package/dist/utils/isBracket.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TOKEN_TYPE } from "../types/ast.js";
|
|
2
2
|
function isBracket(token) {
|
|
3
|
-
return [TOKEN_TYPE.BRACKETL, TOKEN_TYPE.BRACKETR].includes(token
|
|
3
|
+
return [TOKEN_TYPE.BRACKETL, TOKEN_TYPE.BRACKETR].includes(token?.type);
|
|
4
4
|
}
|
|
5
5
|
export {
|
|
6
6
|
isBracket
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type AnyToken, type
|
|
1
|
+
import { type AnyToken, type TokenDelimiter } from "../types/ast.js";
|
|
2
2
|
/**
|
|
3
3
|
* Returns whether token is a delimiter type (including if it's an expanded operator separator).
|
|
4
4
|
*/
|
|
5
|
-
export declare function isDelimiter(token?: AnyToken): token is AnyToken<
|
|
5
|
+
export declare function isDelimiter(token?: AnyToken): token is AnyToken<TokenDelimiter>;
|
|
6
6
|
//# sourceMappingURL=isDelimiter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isDelimiter.d.ts","sourceRoot":"","sources":["../../src/utils/isDelimiter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAc,KAAK,
|
|
1
|
+
{"version":3,"file":"isDelimiter.d.ts","sourceRoot":"","sources":["../../src/utils/isDelimiter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAc,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhF;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,IAAI,QAAQ,CAAC,cAAc,CAAC,CAY/E"}
|
package/dist/utils/isNode.js
CHANGED
package/dist/utils/isParen.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type AnyToken, type
|
|
2
|
-
export declare function isParen(token?: AnyToken): token is AnyToken<
|
|
1
|
+
import { type AnyToken, type TokenParen } from "../types/ast.js";
|
|
2
|
+
export declare function isParen(token?: AnyToken): token is AnyToken<TokenParen>;
|
|
3
3
|
//# sourceMappingURL=isParen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isParen.d.ts","sourceRoot":"","sources":["../../src/utils/isParen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAc,KAAK,
|
|
1
|
+
{"version":3,"file":"isParen.d.ts","sourceRoot":"","sources":["../../src/utils/isParen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAc,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAG5E,wBAAgB,OAAO,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,IAAI,QAAQ,CAAC,UAAU,CAAC,CAEvE"}
|
package/dist/utils/isParen.js
CHANGED
package/dist/utils/isQuote.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AnyToken, type
|
|
1
|
+
import { type AnyToken, type TokenQuote } from "../types/ast.js";
|
|
2
2
|
/** Returns if the token is a quote token. This includes regex delimiters. */
|
|
3
|
-
export declare function isQuote(token?: AnyToken): token is AnyToken<
|
|
3
|
+
export declare function isQuote(token?: AnyToken): token is AnyToken<TokenQuote>;
|
|
4
4
|
//# sourceMappingURL=isQuote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isQuote.d.ts","sourceRoot":"","sources":["../../src/utils/isQuote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAc,KAAK,
|
|
1
|
+
{"version":3,"file":"isQuote.d.ts","sourceRoot":"","sources":["../../src/utils/isQuote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAc,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5E,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,IAAI,QAAQ,CAAC,UAAU,CAAC,CAEvE"}
|
package/dist/utils/isQuote.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TOKEN_TYPE } from "../types/ast.js";
|
|
2
2
|
function isQuote(token) {
|
|
3
|
-
return [TOKEN_TYPE.BACKTICK, TOKEN_TYPE.DOUBLEQUOTE, TOKEN_TYPE.SINGLEQUOTE, TOKEN_TYPE.REGEX].includes(token
|
|
3
|
+
return [TOKEN_TYPE.BACKTICK, TOKEN_TYPE.DOUBLEQUOTE, TOKEN_TYPE.SINGLEQUOTE, TOKEN_TYPE.REGEX].includes(token?.type);
|
|
4
4
|
}
|
|
5
5
|
export {
|
|
6
6
|
isQuote
|
package/dist/utils/isToken.js
CHANGED
package/dist/utils/prettyAst.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as color from "@alanscodelog/utils/colors
|
|
2
|
-
import { isBlank } from "@alanscodelog/utils/isBlank
|
|
1
|
+
import * as color from "@alanscodelog/utils/colors";
|
|
2
|
+
import { isBlank } from "@alanscodelog/utils/isBlank";
|
|
3
3
|
import "@alanscodelog/utils/types";
|
|
4
|
-
import { unreachable } from "@alanscodelog/utils/unreachable
|
|
4
|
+
import { unreachable } from "@alanscodelog/utils/unreachable";
|
|
5
5
|
import { isToken } from "./isToken.js";
|
|
6
6
|
import { AST_TYPE, TOKEN_TYPE } from "../types/ast.js";
|
|
7
7
|
const defaultColors = {
|
|
@@ -21,7 +21,6 @@ const toRows = (rows, opts) => {
|
|
|
21
21
|
];
|
|
22
22
|
};
|
|
23
23
|
function prettyAst(ast, { indent = " ", children = "├╴", last = "└╴", branch = "│", quote = "" } = {}, colors = {}) {
|
|
24
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
25
24
|
const opts = { indent, children, last, branch, quote };
|
|
26
25
|
const c = colors ? { ...defaultColors, ...colors } : disableColors;
|
|
27
26
|
const pos = `${c.position}(${ast.start}, ${ast.end})${c.reset}`;
|
|
@@ -46,10 +45,10 @@ function prettyAst(ast, { indent = " ", children = "├╴", last = "└╴",
|
|
|
46
45
|
const header = `${c.info}${ast.operator === void 0}${c.reset}`;
|
|
47
46
|
const not = ast.operator ? prettyAst_(ast.operator, opts, c, ___, `(negation)`) : "";
|
|
48
47
|
const property = ast.property ? prettyAst_(ast.property, opts, c, ___, `(property)`) : "";
|
|
49
|
-
const sepL =
|
|
48
|
+
const sepL = ast.sep?.left ? prettyAst_(ast.sep.left, opts, c, ___, `(separator)`) : "";
|
|
50
49
|
const op = ast.propertyOperator ? prettyAst_(ast.propertyOperator, opts, c, ___, `(property operator)`) : "";
|
|
51
|
-
const sepR =
|
|
52
|
-
const isRegex = ast.value.type === AST_TYPE.VARIABLE &&
|
|
50
|
+
const sepR = ast.sep?.right ? prettyAst_(ast.sep.right, opts, c, ___, `(separator)`) : "";
|
|
51
|
+
const isRegex = ast.value.type === AST_TYPE.VARIABLE && ast.value.quote?.left.type === TOKEN_TYPE.REGEX;
|
|
53
52
|
const isArray = ast.value.type === AST_TYPE.ARRAY;
|
|
54
53
|
const variable = prettyAst_(ast.value, opts, c, __L, `(${property ? "value" : "variable/alone"}${isRegex ? " - regex" : isArray ? "- array" : ""})`);
|
|
55
54
|
return [
|
|
@@ -60,10 +59,10 @@ ${__}`);
|
|
|
60
59
|
}
|
|
61
60
|
if (ast.type === AST_TYPE.VARIABLE) {
|
|
62
61
|
const prefix = ast.prefix ? prettyAst_(ast.prefix, opts, c, ___, `(value prefix)`) : "";
|
|
63
|
-
const left =
|
|
64
|
-
const value = prettyAst_(ast.value, opts, c, !ast.quote ? __L : !
|
|
65
|
-
const right =
|
|
66
|
-
const flags =
|
|
62
|
+
const left = ast.quote?.left ? prettyAst_(ast.quote.left, opts, c, ___, "") : "";
|
|
63
|
+
const value = prettyAst_(ast.value, opts, c, !ast.quote ? __L : !ast.quote?.right ? __L : ___, "");
|
|
64
|
+
const right = ast.quote?.right ? prettyAst_(ast.quote.right, opts, c, !ast.quote?.flags ? __L : ___, "") : "";
|
|
65
|
+
const flags = ast.quote?.flags ? prettyAst_(ast.quote.flags, opts, c, __L, "(flags)") : "";
|
|
67
66
|
return [
|
|
68
67
|
`VARIABLE ${pos}${extra}`,
|
|
69
68
|
...toRows([prefix, left, value, right, flags], opts)
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@witchcraft/expressit",
|
|
3
3
|
"description": "A blazing fast, customizable, error-tolerant expression parser that creates safe to eval expressions + a few other goodies like autocomplete.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"build:types": "tsc --emitDeclarationOnly -p tsconfig.types.json",
|
|
65
65
|
"lint:eslint": "eslint \"{src,tests,bin}/**/*.{cjs,js,ts}\" \"*.{cjs,js,ts}\" --max-warnings=1 --report-unused-disable-directives",
|
|
66
66
|
"lint:types": "tsc --noEmit --pretty",
|
|
67
|
-
"lint:commits": "commitlint --from
|
|
67
|
+
"lint:commits": "commitlint --from-last-tag --to HEAD --verbose",
|
|
68
68
|
"lint:imports": "madge --circular --extensions ts ./src",
|
|
69
69
|
"lint": "npm run lint:types && npm run lint:eslint",
|
|
70
70
|
"coverage": "vitest --exclude '.direnv/**/*' --coverage",
|
|
@@ -85,35 +85,35 @@
|
|
|
85
85
|
"prepare": "husky && npm run build"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@alanscodelog/utils": "^
|
|
88
|
+
"@alanscodelog/utils": "^6.0.1"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@alanscodelog/commitlint-config": "^3.0.1",
|
|
92
|
-
"@alanscodelog/eslint-config": "5.0.
|
|
93
|
-
"@alanscodelog/semantic-release-config": "^5.0.
|
|
94
|
-
"@alanscodelog/tsconfigs": "^
|
|
92
|
+
"@alanscodelog/eslint-config": "5.0.4",
|
|
93
|
+
"@alanscodelog/semantic-release-config": "^5.0.4",
|
|
94
|
+
"@alanscodelog/tsconfigs": "^6.0.0",
|
|
95
95
|
"@commitlint/cli": "^19.6.1",
|
|
96
|
-
"@electric-sql/pglite": "^0.
|
|
97
|
-
"@types/node": "^
|
|
98
|
-
"@vitest/coverage-v8": "^
|
|
96
|
+
"@electric-sql/pglite": "^0.3.4",
|
|
97
|
+
"@types/node": "^24.0.13",
|
|
98
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
99
99
|
"concurrently": "^9.1.0",
|
|
100
100
|
"cross-env": "^7.0.3",
|
|
101
|
-
"drizzle-kit": "^0.
|
|
102
|
-
"drizzle-orm": "^0.
|
|
101
|
+
"drizzle-kit": "^0.31.0",
|
|
102
|
+
"drizzle-orm": "^0.44.3",
|
|
103
103
|
"fast-glob": "^3.3.1",
|
|
104
104
|
"http-server": "^14.1.1",
|
|
105
105
|
"husky": "^9.1.7",
|
|
106
106
|
"indexit": "2.1.0-beta.3",
|
|
107
107
|
"madge": "^8.0.0",
|
|
108
108
|
"onchange": "^7.1.0",
|
|
109
|
-
"semantic-release": "^24.2.
|
|
109
|
+
"semantic-release": "^24.2.7",
|
|
110
110
|
"ts-node": "^10.9.1",
|
|
111
|
-
"typedoc": "0.
|
|
112
|
-
"typescript": "~5.
|
|
113
|
-
"vite": "^
|
|
114
|
-
"vite-plugin-externalize-deps": "^0.
|
|
111
|
+
"typedoc": "0.28.7",
|
|
112
|
+
"typescript": "~5.8.3",
|
|
113
|
+
"vite": "^7.1.3",
|
|
114
|
+
"vite-plugin-externalize-deps": "^0.9.0",
|
|
115
115
|
"vite-tsconfig-paths": "^5.1.4",
|
|
116
|
-
"vitest": "^
|
|
116
|
+
"vitest": "^3.1.1"
|
|
117
117
|
},
|
|
118
118
|
"author": "Alan <alanscodelog@gmail.com>",
|
|
119
119
|
"repository": "https://github.com/witchcraftjs/expressit",
|
|
@@ -143,12 +143,11 @@
|
|
|
143
143
|
},
|
|
144
144
|
"browserslist": "defaults and supports es6-module,maintained node versions",
|
|
145
145
|
"engines": {
|
|
146
|
-
"node": ">=
|
|
146
|
+
"node": ">=20.0.0"
|
|
147
147
|
},
|
|
148
148
|
"@comments": {
|
|
149
149
|
"scripts": {
|
|
150
150
|
"test": "Runs `lint:types` before (so that flags can be passed to the test command) so that we can test type assertions. See expect_type function in @alanscodelog/utils.",
|
|
151
|
-
"lint:commits": "Lints all unpushed commits in the active branch.",
|
|
152
151
|
"prepare": "Needed so that if we pull the package from git it will get built and installed properly.",
|
|
153
152
|
"actions:debug": "For debugging github build action locally with nektos/act. Requires act and docker. Note: Cache will never work locally because of https://github.com/nektos/act/issues/285"
|
|
154
153
|
}
|