Skip to content

Commit

Permalink
upgrade to latest typescript to solve TS1452: 'resolution-mode' asser…
Browse files Browse the repository at this point in the history
…tions are only supported when is or
  • Loading branch information
Geoffrey Hendrey committed Feb 20, 2024
1 parent ed20e6a commit 1a99da9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"jest": "^29.7.0",
"path-browserify": "^1.0.1",
"typedoc": "^0.25.7",
"typescript": "^5.2.2",
"typescript": "^5.3.3",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion src/CliCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import yaml from 'js-yaml';
import minimist from 'minimist';
import {parseArgsStringToArgv} from 'string-argv';
import {LOG_LEVELS} from "./ConsoleLogger.js";
import repl from 'repl';
import * as repl from 'repl';
import StatedREPL from "./StatedREPL.js";
import jsonata from "jsonata";
import VizGraph from "./VizGraph.js";
Expand Down
7 changes: 4 additions & 3 deletions src/DependencyFinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// limitations under the License.

import last from 'lodash/last.js';
import {default as jsonata, ExprNode} from "jsonata";
import * as jsonata from "jsonata";
import {ExprNode} from "jsonata";

/*
There are cases where we need to generate some AST nodes the JSONata does not generate. Instead of referring to
Expand Down Expand Up @@ -47,7 +48,7 @@ export default class DependencyFinder {
if (typeof program === 'string') {
if(program !== "") {
// Handle the case where program is a string
this.compiledExpression = jsonata(program);
this.compiledExpression = jsonata.default(program);
this.ast = this.compiledExpression.ast();
}
} else {
Expand All @@ -67,7 +68,7 @@ export default class DependencyFinder {
* @param jsonatExpr
*/
async withAstFilterExpression(jsonatExpr:string):Promise<DependencyFinder>{
const filter = jsonata(jsonatExpr);
const filter = jsonata.default(jsonatExpr);
this.ast = await filter.evaluate(this.ast);
return this;
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3760,10 +3760,10 @@ typedoc@^0.25.7:
minimatch "^9.0.3"
shiki "^0.14.7"

typescript@^5.2.2:
version "5.2.2"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz"
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==
typescript@^5.3.3:
version "5.3.3"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==

unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.0"
Expand Down

0 comments on commit 1a99da9

Please sign in to comment.