lang-feel 0.5.0 → 1.1.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 CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var lezerFeel = require('lezer-feel');
6
4
  var language = require('@codemirror/language');
7
5
  var autocomplete = require('@codemirror/autocomplete');
@@ -89,7 +87,7 @@ const feelLanguage = language.LRLanguage.define({
89
87
  // / A language provider for TypeScript.
90
88
  const unaryTestsLanguage = feelLanguage.configure({ top: 'UnaryTests' });
91
89
  // / Language provider for JSX.
92
- const expressionsLanguage = feelLanguage.configure({ top: 'Expressions' });
90
+ const expressionLanguage = feelLanguage.configure({ top: 'Expression' });
93
91
  const keywords = 'return satisfies then in'.split(' ').map(kw => ({ label: kw, type: 'keyword' }));
94
92
  const dontComplete = [
95
93
  'StringLiteral', 'Name',
@@ -98,7 +96,7 @@ const dontComplete = [
98
96
  // / FEEL support. Includes [snippet](#lang-feel.snippets)
99
97
  // / completion.
100
98
  function feel(config = {}) {
101
- const lang = config.dialect === 'unaryTests' ? unaryTestsLanguage : expressionsLanguage;
99
+ const lang = config.dialect === 'unaryTests' ? unaryTestsLanguage : expressionLanguage;
102
100
  const contextualLang = lang.configure({
103
101
  contextTracker: lezerFeel.trackVariables(config.context)
104
102
  });
@@ -109,7 +107,7 @@ function feel(config = {}) {
109
107
  ]);
110
108
  }
111
109
 
112
- exports.expressionsLanguage = expressionsLanguage;
110
+ exports.expressionLanguage = expressionLanguage;
113
111
  exports.feel = feel;
114
112
  exports.feelLanguage = feelLanguage;
115
113
  exports.snippets = snippets;
@@ -0,0 +1,14 @@
1
+ import { LRLanguage, LanguageSupport } from '@codemirror/language';
2
+ import { Completion } from '@codemirror/autocomplete';
3
+
4
+ declare const feelLanguage: LRLanguage;
5
+ declare const unaryTestsLanguage: LRLanguage;
6
+ declare const expressionLanguage: LRLanguage;
7
+ declare function feel(config?: {
8
+ dialect?: 'expression' | 'unaryTests';
9
+ context?: Record<string, any>;
10
+ }): LanguageSupport;
11
+
12
+ declare const snippets: readonly Completion[];
13
+
14
+ export { expressionLanguage, feel, feelLanguage, snippets, unaryTestsLanguage };
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 expressionsLanguage: LRLanguage;
6
+ declare const expressionLanguage: LRLanguage;
7
7
  declare function feel(config?: {
8
- dialect?: 'expressions' | 'unaryTests';
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 { expressionsLanguage, feel, feelLanguage, snippets, unaryTestsLanguage };
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 expressionsLanguage = /*@__PURE__*/feelLanguage.configure({ top: 'Expressions' });
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 : expressionsLanguage;
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 { expressionsLanguage, feel, feelLanguage, snippets, unaryTestsLanguage };
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.5.0",
3
+ "version": "1.1.0",
4
4
  "description": "FEEL language support for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "all": "run-s lint build test",
@@ -29,29 +29,32 @@
29
29
  "sideEffects": false,
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
- "@codemirror/autocomplete": "^6.4.0",
33
- "@codemirror/language": "^6.4.0",
34
- "@codemirror/state": "^6.2.0",
35
- "@codemirror/view": "^6.7.3",
36
- "@lezer/common": "^1.0.2",
37
- "lezer-feel": "^0.17.0"
32
+ "@codemirror/autocomplete": "^6.9.1",
33
+ "@codemirror/language": "^6.9.1",
34
+ "@codemirror/state": "^6.2.1",
35
+ "@codemirror/view": "^6.21.0",
36
+ "@lezer/common": "^1.1.0",
37
+ "lezer-feel": "^1.2.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@codemirror/buildhelper": "^0.1.16",
41
- "@lezer/lr": "^1.3.3",
42
- "@typescript-eslint/eslint-plugin": "^5.48.2",
43
- "@typescript-eslint/parser": "^5.48.2",
40
+ "@codemirror/buildhelper": "^1.0.0",
41
+ "@lezer/lr": "^1.3.12",
42
+ "@typescript-eslint/eslint-plugin": "^6.7.3",
43
+ "@typescript-eslint/parser": "^6.7.3",
44
44
  "chokidar": "^3.5.3",
45
45
  "chokidar-cli": "^3.0.0",
46
- "eslint": "^8.32.0",
47
- "eslint-plugin-bpmn-io": "^0.16.0",
46
+ "eslint": "^8.50.0",
47
+ "eslint-plugin-bpmn-io": "^1.0.0",
48
48
  "npm-run-all": "^4.1.5",
49
- "typescript": "^4.9.4"
49
+ "typescript": "^5.2.2"
50
50
  },
51
51
  "repository": {
52
52
  "type": "git",
53
53
  "url": "https://github.com/nikku/lang-feel.git"
54
54
  },
55
+ "engines": {
56
+ "node": "*"
57
+ },
55
58
  "files": [
56
59
  "dist"
57
60
  ]