Skip to content

Commit

Permalink
Update dependencies, make intern test work in browser
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Jan 8, 2024
1 parent d533344 commit 288a9d5
Show file tree
Hide file tree
Showing 10 changed files with 182 additions and 198 deletions.
8 changes: 8 additions & 0 deletions .ncurc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use strict";

module.exports = {
"reject": [
"chai", // Moved to es6
"@types/chai", // Should match chai
],
};
4 changes: 2 additions & 2 deletions docs/js/benchmark-bundle.min.js

Large diffs are not rendered by default.

31 changes: 2 additions & 29 deletions docs/js/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@ function peg$parse(input, options) {
var peg$savedPos = peg$currPos;
var peg$posDetailsCache = [{ line: 1, column: 1 }];
var peg$maxFailPos = peg$currPos;
var peg$maxFailExpected = [];
var peg$maxFailExpected = options.peg$maxFailExpected || [];
var peg$silentFails = options.peg$silentFails | 0;

var peg$result;

if ("startRule" in options) {
if (options.startRule) {
if (!(options.startRule in peg$startRuleFunctions)) {
throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
}
Expand Down Expand Up @@ -397,33 +397,6 @@ function peg$parse(input, options) {
);
}

var peg$assign = Object.assign || function(t) {
var i, s;
for (i = 1; i < arguments.length; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) {
t[p] = s[p];
}
}
}
return t;
};

function peg$callLibrary(lib, startRule) {
const opts = peg$assign({}, options, {
startRule: startRule,
peg$currPos: peg$currPos,
peg$silentFails: peg$silentFails,
peg$library: true
});
const res = lib.parse(input, opts);
peg$currPos = res.peg$currPos;
peg$maxFailPos = res.peg$maxFailPos;
peg$maxFailExpected = res.peg$maxFailExpected;
return (res.peg$result === res.peg$FAILED) ? peg$FAILED : res.peg$result;
}

function peg$parseliteral() {
var s0, s1, s2;

Expand Down
4 changes: 2 additions & 2 deletions docs/js/test-bundle.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/vendor/peggy/peggy.min.js

Large diffs are not rendered by default.

267 changes: 135 additions & 132 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@
"@rollup/plugin-typescript": "^11.1.5",
"@types/chai": "^4.3.11",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.5",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"chai": "^4.3.10",
"@types/node": "^20.10.7",
"@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0",
"chai": "^4.3.11",
"chai-like": "^1.1.1",
"copyfiles": "^2.4.1",
"eslint": "^8.56.0",
"express": "4.18.2",
"glob": "^10.3.10",
"jest": "^29.7.0",
"rimraf": "^5.0.5",
"rollup": "^4.9.1",
"rollup": "^4.9.4",
"rollup-plugin-ignore": "1.0.10",
"source-map": "^0.8.0-beta.0",
"terser": "^5.26.0",
Expand Down
2 changes: 1 addition & 1 deletion test/unit/compiler/intern.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("utility class Intern", () => {
it("does conversions", () => {
/** @type {Intern<string, number[]>} */
const i = new Intern({
convert: x => [...x].map(y => y.codePointAt(0)),
convert: x => Array.from(x).map(y => y.codePointAt(0)),
});
expect(i.add("abc")).to.equal(0);
expect(i.add("abc")).to.equal(0);
Expand Down
48 changes: 24 additions & 24 deletions web-test/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "Joe Hildebrand <joe-github@cursive.net>",
"license": "MIT",
"devDependencies": {
"puppeteer": "^21.6.1"
"puppeteer": "^21.7.0"
},
"engines": {
"node": ">=16"
Expand Down

0 comments on commit 288a9d5

Please sign in to comment.