Skip to content

Commit

Permalink
Upgrade to node-pty 1.0 (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell authored Aug 9, 2023
1 parent a08c356 commit e8542cb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x

- name: Cache node_modules
id: cache-node_modules
Expand Down
30 changes: 15 additions & 15 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"xterm"
],
"dependencies": {
"node-pty": "^0.10.1",
"node-pty": "^1.0.0",
"tiny-decoders": "^7.0.1"
},
"devDependencies": {
Expand Down
8 changes: 5 additions & 3 deletions test/run-pty.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function fakeTerminal({ pid }) {
handleFlowControl: false,
onData: () => notCalled("onData") || { dispose: () => undefined },
onExit: () => notCalled("onExit") || { dispose: () => undefined },
on: () => notCalled("on"),
clear: () => notCalled("clear"),
pause: () => notCalled("pause"),
resume: () => notCalled("resume"),
resize: () => notCalled("resize"),
Expand Down Expand Up @@ -1152,7 +1152,9 @@ describe("parse json", () => {
test("invalid json syntax", () => {
expect(testJsonError("invalid-json-syntax.json")).toMatchInlineSnapshot(`
Failed to read command descriptions file as JSON:
Unexpected token ] in JSON at position 91
Unexpected token ']', ..."kend"] },
]
" is not valid JSON
`);
});

Expand Down Expand Up @@ -1200,7 +1202,7 @@ describe("parse json", () => {
expect(testJsonError("invalid-regex.json")).toMatchInlineSnapshot(`
Failed to read command descriptions file as JSON:
At root[0]["status"]["{}"]:
Invalid regular expression: /{}/: Lone quantifier brackets
Invalid regular expression: /{}/u: Lone quantifier brackets
`);
});

Expand Down

0 comments on commit e8542cb

Please sign in to comment.