From b52c1dc48c56e9600c2456308820d075da98832f Mon Sep 17 00:00:00 2001 From: Matt Bailey Date: Tue, 21 Feb 2023 10:27:42 +0000 Subject: [PATCH 01/18] Release v2.0.2 (#621) * Update CHANGELOG.md * Update package.json --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38d9f7f4..cfc33130 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +#### 2.0.2 Maintenance Release + +- Typescript definition: fix return type of evaluate method (PR #615) + #### 2.0.1 Maintenance Release - Small update to pick up README changes with 2.0.0 changes diff --git a/package.json b/package.json index b9ad6ffa..eb6230e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stedi/jsonata", - "version": "2.0.1", + "version": "2.0.2", "description": "JSON query and transformation language", "module": "jsonata.js", "main": "jsonata.js", From d8bb5abeecc3c07fd5f1d22802aab7e32d946b9a Mon Sep 17 00:00:00 2001 From: Benjamin Steele Date: Fri, 17 Mar 2023 08:41:36 -0600 Subject: [PATCH 02/18] Fix regex termination lexer (#623) --- src/parser.js | 16 +++++++++++++++- test/implementation-tests.js | 31 +++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/parser.js b/src/parser.js index adb525ad..629ff82c 100644 --- a/src/parser.js +++ b/src/parser.js @@ -76,9 +76,23 @@ const parser = (() => { var depth = 0; var pattern; var flags; + + var isClosingSlash = function (position) { + if (path.charAt(position) === '/' && depth === 0) { + var backslashCount = 0; + while (path.charAt(position - (backslashCount + 1)) === '\\') { + backslashCount++; + } + if (backslashCount % 2 === 0) { + return true; + } + } + return false; + }; + while (position < length) { var currentChar = path.charAt(position); - if (currentChar === '/' && path.charAt(position - 1) !== '\\' && depth === 0) { + if (isClosingSlash(position)) { // end of regex found pattern = path.substring(start, position); if (pattern === '') { diff --git a/test/implementation-tests.js b/test/implementation-tests.js index 4d85f1e7..115fa699 100644 --- a/test/implementation-tests.js +++ b/test/implementation-tests.js @@ -749,7 +749,38 @@ describe("Tests that are specific to a Javascript runtime", () => { }); }); + describe("empty regex: Escaped termination", function() { + it("should throw error", function() { + expect(function() { + var expr = jsonata("/\\/"); + expr.evaluate(); + }) + .to.throw() + .to.deep.contain({ position: 3, code: "S0302" }); + }); + }); + + describe("empty regex: Escaped termination", function() { + it("should throw error", function() { + expect(function() { + var expr = jsonata("/\\\\\\/"); + expr.evaluate(); + }) + .to.throw() + .to.deep.contain({ position: 5, code: "S0302" }); + }); + }); + describe("Functions - $match", function() { + describe('$match("test escape \\\\", /\\\\/)', function() { + it("should find \\", async function() { + var expr = jsonata('$match("test escape \\\\", /\\\\/)'); + var result = await expr.evaluate(); + var expected = { match: "\\", index: 12, groups: []}; + expect(result).to.deep.equal(expected); + }); + }); + describe('$match("ababbabbcc",/ab/)', function() { it("should return result object", async function() { var expr = jsonata('$match("ababbabbcc",/ab/)'); From b52b67eb504945b86fc16eebc1aee077af1482d0 Mon Sep 17 00:00:00 2001 From: Chris Johnson <107486286+cjohnsonpayit@users.noreply.github.com> Date: Thu, 13 Apr 2023 15:51:20 -0500 Subject: [PATCH 03/18] Fix typo in predicate.md See title --- docs/predicate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/predicate.md b/docs/predicate.md index 380d4afb..4a518a03 100644 --- a/docs/predicate.md +++ b/docs/predicate.md @@ -31,7 +31,7 @@ At any step in a location path, the selected items can be filtered using a predi ## Singleton array and value equivalence -Within a JSONata expression or subexpression, any value (which is not itself an array) and an array containing just that value are deemed to be equivalent. This allows the language to be composable such that location paths that extract a single value from and object and location paths that extract multiple values from arrays can both be used as inputs to other expressions without needing to use different syntax for the two forms. +Within a JSONata expression or subexpression, any value (which is not itself an array) and an array containing just that value are deemed to be equivalent. This allows the language to be composable such that location paths that extract a single value from an object and location paths that extract multiple values from arrays can both be used as inputs to other expressions without needing to use different syntax for the two forms. Consider the following examples: From ff16e9460956442ec0210d2e2c4d82ff5422dabf Mon Sep 17 00:00:00 2001 From: Dishant Kaushik Date: Mon, 17 Apr 2023 10:27:59 -0400 Subject: [PATCH 04/18] - Added options as parameters for jsonata - Converted lhs into an array of ExprNode (optional with empty array) --- jsonata.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jsonata.d.ts b/jsonata.d.ts index e71583a4..257aac07 100644 --- a/jsonata.d.ts +++ b/jsonata.d.ts @@ -2,9 +2,14 @@ // Project: https://github.com/jsonata-js/jsonata // Definitions by: Nick and Michael M. Tiller -declare function jsonata(str: string): jsonata.Expression; +declare function jsonata(str: string, options?: jsonata.JsonataOptions): jsonata.Expression; declare namespace jsonata { + interface JsonataOptions { + recover?: boolean, + RegexEngine?: RegExp + } + interface ExprNode { type: string; value?: any; @@ -15,7 +20,7 @@ declare namespace jsonata { steps?: ExprNode[]; expressions?: ExprNode[]; stages?: ExprNode[]; - lhs?: ExprNode; + lhs?: ExprNode[]; rhs?: ExprNode; } From 1d6cea937466490bf3969040903e00eaec82b329 Mon Sep 17 00:00:00 2001 From: Matt Bailey Date: Tue, 18 Apr 2023 12:02:54 +0100 Subject: [PATCH 05/18] Release v2.0.3 (#634) * Update package.json * Update CHANGELOG.md --- CHANGELOG.md | 7 ++++++- package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfc33130..12e7d3c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ +#### 2.0.3 Maintenance Release + +- Fix regex termination lexer (PR https://github.com/jsonata-js/jsonata/pull/623) +- Fix TypeScript definition (PR https://github.com/jsonata-js/jsonata/pull/633) + #### 2.0.2 Maintenance Release -- Typescript definition: fix return type of evaluate method (PR #615) +- Typescript definition: fix return type of evaluate method (PR https://github.com/jsonata-js/jsonata/pull/615) #### 2.0.1 Maintenance Release diff --git a/package.json b/package.json index eb6230e6..1488009c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stedi/jsonata", - "version": "2.0.2", + "version": "2.0.3", "description": "JSON query and transformation language", "module": "jsonata.js", "main": "jsonata.js", From 4ea9402bda9a310095b76627711364b4326026fb Mon Sep 17 00:00:00 2001 From: James Taylor Date: Mon, 12 Jun 2023 17:35:07 +0100 Subject: [PATCH 06/18] Update overview.md The developerWorks video does not exist anymore :( --- docs/overview.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/overview.md b/docs/overview.md index 86bfc870..cb2ae9e4 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -19,4 +19,3 @@ JSONata is a lightweight query and transformation language for JSON data. Inspir ## Find out more * Introduction at [London Node User Group meetup](https://www.youtube.com/watch?v=TDWf6R8aqDo) -* IBM developerWorks [Tech Talk](https://www.youtube.com/watch?v=ZRtlkIj0uDY) From 766d78fe994f41444799d01d27544e781bcae9a9 Mon Sep 17 00:00:00 2001 From: Alex Woodgate Date: Sat, 5 Aug 2023 17:02:39 +0100 Subject: [PATCH 07/18] Add upper/lower presentation format for am/pm in fromMillis Signed-off-by: Alex Woodgate --- src/datetime.js | 7 +++++++ .../function-fromMillis/formatDateTime.json | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/datetime.js b/src/datetime.js index 00d80eab..01217658 100644 --- a/src/datetime.js +++ b/src/datetime.js @@ -904,6 +904,13 @@ const dateTime = (function () { if (offset === 0 && markerSpec.presentation2 === 't') { componentValue = 'Z'; } + } else if (markerSpec.component === 'P') { + // ยง9.8.4.7 Formatting Other Components + // Formatting P for am/pm + // getDateTimeFragment() always returns am/pm lower case so check for UPPER here + if (markerSpec.names === tcase.UPPER) { + componentValue = componentValue.toUpperCase(); + } } return componentValue; }; diff --git a/test/test-suite/groups/function-fromMillis/formatDateTime.json b/test/test-suite/groups/function-fromMillis/formatDateTime.json index 96e1962d..c08a9eaf 100644 --- a/test/test-suite/groups/function-fromMillis/formatDateTime.json +++ b/test/test-suite/groups/function-fromMillis/formatDateTime.json @@ -539,6 +539,22 @@ "2018-10-21T13:05:00.000Z" ] }, + { + "function": "#fromMillis", + "category": "Upper case AM/PM presentation", + "description": "am/pm presentation should be set to uppercase AM", + "expr": "$fromMillis(1521801216617, '[F], [D]/[M]/[Y] [h]:[m]:[s] [PN]')", + "data": {}, + "result": "friday, 23/3/2018 10:33:36 AM" + }, + { + "function": "#fromMillis", + "category": "Lower case AM/PM presentation", + "description": "am/pm presentation should be set to lowercase am", + "expr": "$fromMillis(1521801216617, '[F], [D]/[M]/[Y] [h]:[m]:[s] [Pn]')", + "data": {}, + "result": "friday, 23/3/2018 10:33:36 am" + }, { "function": "#fromMillis", "category": "error", From 1b608defcc8e8a643169d4747ec33412c3ea5f11 Mon Sep 17 00:00:00 2001 From: tolutaua Date: Sat, 22 Jul 2023 07:47:42 -0600 Subject: [PATCH 08/18] Update construction.md --- docs/construction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/construction.md b/docs/construction.md index 4705ee5d..81a42d58 100644 --- a/docs/construction.md +++ b/docs/construction.md @@ -44,7 +44,7 @@ __Examples__ ## Object constructors -In a similar manner to the way arrays can be constructed, JSON objects can also be constructed in the output. At any point in a location path where a field reference is expected, a pair of braces `{}` containing key/value pairs separated by commas, with each key and value separated by a colon: `{key1: value2, key2:value2}`. The keys and values can either be literals or can be expressions. The key must either be a string or an expression that evaluates to a string. +In a similar manner to the way arrays can be constructed, JSON objects can also be constructed in the output. At any point in a location path where a field reference is expected, a pair of braces `{}` containing key/value pairs separated by commas, with each key and value separated by a colon: `{key1: value1, key2:value2}`. The keys and values can either be literals or can be expressions. The key must either be a string or an expression that evaluates to a string. When an object constructor follows an expression that selects multiple values, the object constructor will create a single object that contains a key/value pair for each of those context values. If an array of objects is required (one for each context value), then the object constructor should immediately follow the dot '.' operator. From 0fcdda8d967109aee2ebdde48ff2988f5bfc6713 Mon Sep 17 00:00:00 2001 From: uw4 <62463897+uw4@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:15:38 +0200 Subject: [PATCH 09/18] Added overview of languages implementing JSONata --- docs/overview.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/overview.md b/docs/overview.md index cb2ae9e4..3c0aa762 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -16,6 +16,19 @@ JSONata is a lightweight query and transformation language for JSON data. Inspir * Install the module from [NPM](https://www.npmjs.com/package/jsonata) * Fork the repo on [GitHub](https://github.com/jsonata-js/jsonata) +## Implementations of JSONata + +|Language|Link|Notes|Jsonata version| +|---|---|---|---| +|C|https://github.com/qlyoung/jsonata-c|Runs JSONata in embedded JS engine|1.8.3| +|Go|https://github.com/blues/jsonata-go|Native implementation|1.5.4| +|Go|https://github.com/yxuco/gojsonata|Native implementation| | +|Java|https://github.com/IBM/JSONata4Java|Native implementation| | +|Java|https://github.com/dashjoin/jsonata-java|Native port of reference|2.0.3| +|.NET|https://github.com/mikhail-barg/jsonata.net.native|Native implementation|1.8.5| +|Python|https://github.com/qlyoung/pyjsonata|API bindings based on C bindings|1.8.3| +|Rust|https://github.com/johanventer/jsonata-rust|Implementation work in progress| | + ## Find out more * Introduction at [London Node User Group meetup](https://www.youtube.com/watch?v=TDWf6R8aqDo) From 0073634708f966bdedd4e75e584f32a73c4d5cce Mon Sep 17 00:00:00 2001 From: uw4 <62463897+uw4@users.noreply.github.com> Date: Mon, 4 Sep 2023 11:08:33 +0200 Subject: [PATCH 10/18] Update docs/overview.md Looks good Co-authored-by: Matt Bailey --- docs/overview.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/overview.md b/docs/overview.md index 3c0aa762..361e4a3a 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -18,7 +18,9 @@ JSONata is a lightweight query and transformation language for JSON data. Inspir ## Implementations of JSONata -|Language|Link|Notes|Jsonata version| +The following are known implementations of JSONata in addition to the primary implementation in JavaScript in the above repo. + +|Language|Link|Notes|JSONata version| |---|---|---|---| |C|https://github.com/qlyoung/jsonata-c|Runs JSONata in embedded JS engine|1.8.3| |Go|https://github.com/blues/jsonata-go|Native implementation|1.5.4| From 41d19888617b881f55755fde9e48952f411eb991 Mon Sep 17 00:00:00 2001 From: Yeremenko23 <89029413+Yeremenko23@users.noreply.github.com> Date: Sun, 22 Oct 2023 15:55:23 +0300 Subject: [PATCH 11/18] Update sorting-grouping.md --- docs/sorting-grouping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sorting-grouping.md b/docs/sorting-grouping.md index 85f1c24b..8c7e0ae6 100644 --- a/docs/sorting-grouping.md +++ b/docs/sorting-grouping.md @@ -12,7 +12,7 @@ Arrays contain an ordered collection of values. If you need to re-order the val 2. Using the [order-by](path-operators#order-by-) operator. -The [order-by](path-operators#order-by-) operator is a convenient syntax that can used directly in a path expression to sort the result sequences in ascending or descending order. The [`$sort()`](array-functions#sort) function requires more syntax to be written, but is more flexible and supports custom comparator functions. +The [order-by](path-operators#order-by-) operator is a convenient syntax that can be used directly in a path expression to sort the result sequences in ascending or descending order. The [`$sort()`](array-functions#sort) function requires more syntax to be written, but is more flexible and supports custom comparator functions. ## Grouping From 889fd451606fcda9af5d92dbb25b20e40a02b918 Mon Sep 17 00:00:00 2001 From: Scott Robinson Date: Fri, 17 Nov 2023 15:37:31 -0600 Subject: [PATCH 12/18] Fixed broken link for chain operator --- docs/regex.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/regex.md b/docs/regex.md index 2bed89ed..91c59607 100644 --- a/docs/regex.md +++ b/docs/regex.md @@ -31,7 +31,7 @@ Regexes are often used in query predicates (filter expressions) when selecting o `path.to.object[stringProperty ~> /regex/]` -The `~>` is the [chain operator](control-operators#chain), and its use here implies that the result of `/regex/` is a function. We'll see below that this is in fact the case. +The `~>` is the [chain operator](other-operators#-chain), and its use here implies that the result of `/regex/` is a function. We'll see below that this is in fact the case. __Examples__ From 67cd4b534b55e9720fb2943f4afd43dfd5c5e7f0 Mon Sep 17 00:00:00 2001 From: Zack Kanter Date: Sat, 2 Dec 2023 08:43:16 -0500 Subject: [PATCH 13/18] Add new Rust implementation jsonata-rs is an actively-developed fork of jsonata-rust. --- docs/overview.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/overview.md b/docs/overview.md index 361e4a3a..a087678a 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -30,6 +30,7 @@ The following are known implementations of JSONata in addition to the primary im |.NET|https://github.com/mikhail-barg/jsonata.net.native|Native implementation|1.8.5| |Python|https://github.com/qlyoung/pyjsonata|API bindings based on C bindings|1.8.3| |Rust|https://github.com/johanventer/jsonata-rust|Implementation work in progress| | +|Rust|https://github.com/Stedi/jsonata-rs|Actively-developed fork of jsonata-rust| | ## Find out more From 12f3821888fa4618a2c1963a53625a59ea4351ba Mon Sep 17 00:00:00 2001 From: Steve Groom Date: Wed, 13 Dec 2023 07:41:07 +0000 Subject: [PATCH 14/18] Update numeric-operators.md spelling --- docs/numeric-operators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/numeric-operators.md b/docs/numeric-operators.md index 41263a38..ca9582f5 100644 --- a/docs/numeric-operators.md +++ b/docs/numeric-operators.md @@ -13,7 +13,7 @@ __Example__ `5 + 2` => `7` -## `-` (Substraction/Negation) +## `-` (Subtraction/Negation) The subtraction operator subtracts the RHS value from the LHS value to produce the numerical difference It is an error if either operand is not a number. From 2f673894a810768a850b2a3bf36829702ee419e5 Mon Sep 17 00:00:00 2001 From: andrew-coleman Date: Tue, 27 Feb 2024 09:11:11 +0000 Subject: [PATCH 15/18] Prevent access to __proto__ Signed-off-by: andrew-coleman --- src/jsonata.js | 10 +++++++++- test/implementation-tests.js | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/jsonata.js b/src/jsonata.js index 43aa61a9..ce9b5c13 100644 --- a/src/jsonata.js +++ b/src/jsonata.js @@ -1293,6 +1293,13 @@ var jsonata = (function() { } for(var ii = 0; ii < matches.length; ii++) { var match = matches[ii]; + if (match && match.isPrototypeOf(result)) { + throw { + code: "D1010", + stack: (new Error()).stack, + position: expr.position + }; + } // evaluate the update value for each match var update = await evaluate(expr.update, match, environment); // update must be an object @@ -1539,7 +1546,7 @@ var jsonata = (function() { if (typeof err.token == 'undefined' && typeof proc.token !== 'undefined') { err.token = proc.token; } - err.position = proc.position; + err.position = proc.position || err.position; } throw err; } @@ -1972,6 +1979,7 @@ var jsonata = (function() { "T1007": "Attempted to partially apply a non-function. Did you mean ${{{token}}}?", "T1008": "Attempted to partially apply a non-function", "D1009": "Multiple key definitions evaluate to same key: {{value}}", + "D1010": "Attempted to access the Javascript object prototype", // Javascript specific "T1010": "The matcher function argument passed to function {{token}} does not return the correct object structure", "T2001": "The left side of the {{token}} operator must evaluate to a number", "T2002": "The right side of the {{token}} operator must evaluate to a number", diff --git a/test/implementation-tests.js b/test/implementation-tests.js index 115fa699..c7f022af 100644 --- a/test/implementation-tests.js +++ b/test/implementation-tests.js @@ -955,6 +955,26 @@ describe("Tests that are specific to a Javascript runtime", () => { }); }); }); + describe("Expressions that attempt to pollute the object prototype", function() { + it("should throw an error with __proto__", async function() { + const expr = jsonata('{} ~> | __proto__ | {"is_admin": true} |'); + expect( + expr.evaluate() + ).to.eventually.be.rejected.to.deep.contain({ + position: 7, + code: "D1010", + }); + }); + it("should throw an error with __lookupGetter__", async function() { + const expr = jsonata('{} ~> | __lookupGetter__("__proto__")() | {"is_admin": true} |'); + expect( + expr.evaluate() + ).to.eventually.be.rejected.to.deep.contain({ + position: 7, + code: "D1010", + }); + }); + }); }); describe("Test that yield platform specific results", () => { From eb5ea96592d372b2a50cb0a031bdd69089be5868 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 29 Feb 2024 00:54:29 +0000 Subject: [PATCH 16/18] Check for constructor property --- src/jsonata.js | 2 +- test/implementation-tests.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/jsonata.js b/src/jsonata.js index ce9b5c13..845ce25d 100644 --- a/src/jsonata.js +++ b/src/jsonata.js @@ -1293,7 +1293,7 @@ var jsonata = (function() { } for(var ii = 0; ii < matches.length; ii++) { var match = matches[ii]; - if (match && match.isPrototypeOf(result)) { + if (match && (match.isPrototypeOf(result) || match instanceof Object.constructor)) { throw { code: "D1010", stack: (new Error()).stack, diff --git a/test/implementation-tests.js b/test/implementation-tests.js index c7f022af..8d8951d7 100644 --- a/test/implementation-tests.js +++ b/test/implementation-tests.js @@ -974,6 +974,15 @@ describe("Tests that are specific to a Javascript runtime", () => { code: "D1010", }); }); + it("should throw an error with constructor", async function() { + const expr = jsonata('{} ~> | constructor | {"is_admin": true} |'); + expect( + expr.evaluate() + ).to.eventually.be.rejected.to.deep.contain({ + position: 7, + code: "D1010", + }); + }); }); }); From 1b9df0c671be73fca0629e73642a006c5d95c40d Mon Sep 17 00:00:00 2001 From: andrew-coleman Date: Thu, 29 Feb 2024 16:51:28 +0000 Subject: [PATCH 17/18] Release v2.0.4 Signed-off-by: andrew-coleman --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12e7d3c8..1880ccbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +#### 2.0.4 Maintenance Release + +- Prevent writing to the object prototype or constructor (PR https://github.com/jsonata-js/jsonata/pull/676) +- Add upper/lower presentation format for am/pm in fromMillis (PR https://github.com/jsonata-js/jsonata/pull/644) +- Various documentation additions and corrections + #### 2.0.3 Maintenance Release - Fix regex termination lexer (PR https://github.com/jsonata-js/jsonata/pull/623) diff --git a/package.json b/package.json index 1488009c..1d5a0ff5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stedi/jsonata", - "version": "2.0.3", + "version": "2.0.4", "description": "JSON query and transformation language", "module": "jsonata.js", "main": "jsonata.js", From 1e98f794d92265ead57ded4f0ff4547d49a6837d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Duvieusart=20De=CC=81ry?= Date: Tue, 5 Mar 2024 11:13:21 -0500 Subject: [PATCH 18/18] feat: add test workflow --- .github/workflows/test.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..5edb0ac6 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,16 @@ +name: Test JSONata +on: + push: + branches: [stedi-main] + pull_request: + branches: [stedi-main] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + - run: npm install + - run: npm test