lang-feel 0.4.0 → 1.0.0
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/dist/index.cjs +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/package.json +13 -13
package/dist/index.cjs
CHANGED
|
@@ -89,7 +89,7 @@ const feelLanguage = language.LRLanguage.define({
|
|
|
89
89
|
// / A language provider for TypeScript.
|
|
90
90
|
const unaryTestsLanguage = feelLanguage.configure({ top: 'UnaryTests' });
|
|
91
91
|
// / Language provider for JSX.
|
|
92
|
-
const
|
|
92
|
+
const expressionLanguage = feelLanguage.configure({ top: 'Expression' });
|
|
93
93
|
const keywords = 'return satisfies then in'.split(' ').map(kw => ({ label: kw, type: 'keyword' }));
|
|
94
94
|
const dontComplete = [
|
|
95
95
|
'StringLiteral', 'Name',
|
|
@@ -98,7 +98,7 @@ const dontComplete = [
|
|
|
98
98
|
// / FEEL support. Includes [snippet](#lang-feel.snippets)
|
|
99
99
|
// / completion.
|
|
100
100
|
function feel(config = {}) {
|
|
101
|
-
const lang = config.dialect === 'unaryTests' ? unaryTestsLanguage :
|
|
101
|
+
const lang = config.dialect === 'unaryTests' ? unaryTestsLanguage : expressionLanguage;
|
|
102
102
|
const contextualLang = lang.configure({
|
|
103
103
|
contextTracker: lezerFeel.trackVariables(config.context)
|
|
104
104
|
});
|
|
@@ -109,7 +109,7 @@ function feel(config = {}) {
|
|
|
109
109
|
]);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
exports.
|
|
112
|
+
exports.expressionLanguage = expressionLanguage;
|
|
113
113
|
exports.feel = feel;
|
|
114
114
|
exports.feelLanguage = feelLanguage;
|
|
115
115
|
exports.snippets = snippets;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ import { Completion } from '@codemirror/autocomplete';
|
|
|
3
3
|
|
|
4
4
|
declare const feelLanguage: LRLanguage;
|
|
5
5
|
declare const unaryTestsLanguage: LRLanguage;
|
|
6
|
-
declare const
|
|
6
|
+
declare const expressionLanguage: LRLanguage;
|
|
7
7
|
declare function feel(config?: {
|
|
8
|
-
dialect?: '
|
|
8
|
+
dialect?: 'expression' | 'unaryTests';
|
|
9
9
|
context?: Record<string, any>;
|
|
10
10
|
}): LanguageSupport;
|
|
11
11
|
|
|
12
12
|
declare const snippets: readonly Completion[];
|
|
13
13
|
|
|
14
|
-
export {
|
|
14
|
+
export { expressionLanguage, feel, feelLanguage, snippets, unaryTestsLanguage };
|
package/dist/index.js
CHANGED
|
@@ -85,7 +85,7 @@ const feelLanguage = /*@__PURE__*/LRLanguage.define({
|
|
|
85
85
|
// / A language provider for TypeScript.
|
|
86
86
|
const unaryTestsLanguage = /*@__PURE__*/feelLanguage.configure({ top: 'UnaryTests' });
|
|
87
87
|
// / Language provider for JSX.
|
|
88
|
-
const
|
|
88
|
+
const expressionLanguage = /*@__PURE__*/feelLanguage.configure({ top: 'Expression' });
|
|
89
89
|
const keywords = /*@__PURE__*/'return satisfies then in'.split(' ').map(kw => ({ label: kw, type: 'keyword' }));
|
|
90
90
|
const dontComplete = [
|
|
91
91
|
'StringLiteral', 'Name',
|
|
@@ -94,7 +94,7 @@ const dontComplete = [
|
|
|
94
94
|
// / FEEL support. Includes [snippet](#lang-feel.snippets)
|
|
95
95
|
// / completion.
|
|
96
96
|
function feel(config = {}) {
|
|
97
|
-
const lang = config.dialect === 'unaryTests' ? unaryTestsLanguage :
|
|
97
|
+
const lang = config.dialect === 'unaryTests' ? unaryTestsLanguage : expressionLanguage;
|
|
98
98
|
const contextualLang = lang.configure({
|
|
99
99
|
contextTracker: trackVariables(config.context)
|
|
100
100
|
});
|
|
@@ -105,4 +105,4 @@ function feel(config = {}) {
|
|
|
105
105
|
]);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
export {
|
|
108
|
+
export { expressionLanguage, feel, feelLanguage, snippets, unaryTestsLanguage };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lang-feel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "FEEL language support for the CodeMirror code editor",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"all": "run-s lint build test",
|
|
@@ -29,24 +29,24 @@
|
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@codemirror/autocomplete": "^6.
|
|
33
|
-
"@codemirror/language": "^6.
|
|
34
|
-
"@codemirror/state": "^6.2.
|
|
35
|
-
"@codemirror/view": "^6.
|
|
36
|
-
"@lezer/common": "^1.0.
|
|
37
|
-
"lezer-feel": "^0.
|
|
32
|
+
"@codemirror/autocomplete": "^6.8.1",
|
|
33
|
+
"@codemirror/language": "^6.8.0",
|
|
34
|
+
"@codemirror/state": "^6.2.1",
|
|
35
|
+
"@codemirror/view": "^6.14.0",
|
|
36
|
+
"@lezer/common": "^1.0.3",
|
|
37
|
+
"lezer-feel": "^1.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@codemirror/buildhelper": "^0.1.16",
|
|
41
|
-
"@lezer/lr": "^1.3.
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
43
|
-
"@typescript-eslint/parser": "^5.
|
|
41
|
+
"@lezer/lr": "^1.3.3",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
|
43
|
+
"@typescript-eslint/parser": "^5.61.0",
|
|
44
44
|
"chokidar": "^3.5.3",
|
|
45
45
|
"chokidar-cli": "^3.0.0",
|
|
46
|
-
"eslint": "^8.
|
|
47
|
-
"eslint-plugin-bpmn-io": "^0.
|
|
46
|
+
"eslint": "^8.44.0",
|
|
47
|
+
"eslint-plugin-bpmn-io": "^1.0.0",
|
|
48
48
|
"npm-run-all": "^4.1.5",
|
|
49
|
-
"typescript": "^
|
|
49
|
+
"typescript": "^5.1.6"
|
|
50
50
|
},
|
|
51
51
|
"repository": {
|
|
52
52
|
"type": "git",
|