Skip to content

Commit

Permalink
Upgrade to node v14
Browse files Browse the repository at this point in the history
Recent VS Code versions ship with electron 13, which is built from node 14.
This just affects the docker environment we run tests in and the node type definitions.
  • Loading branch information
J-Fields committed Oct 20, 2021
1 parent 163d1bf commit f118620
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build/Dockerfile
@@ -1,4 +1,4 @@
FROM node:12
FROM node:14

ARG DEBIAN_FRONTEND=noninteractive

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -1148,7 +1148,7 @@
"@types/glob": "7.2.0",
"@types/lodash": "4.14.175",
"@types/mocha": "9.0.0",
"@types/node": "12.20.33",
"@types/node": "14.17.27",
"@types/parsimmon": "1.10.6",
"@types/sinon": "10.0.4",
"@types/source-map-support": "0.5.4",
Expand Down
4 changes: 2 additions & 2 deletions src/platform/browser/fs.ts
Expand Up @@ -80,7 +80,7 @@ export async function unlink(path: string): Promise<void> {
await vscode.workspace.fs.delete(vscode.Uri.parse(path));
}

export async function readFileAsync(path: string, encoding: string): Promise<string> {
export async function readFileAsync(path: string, encoding: BufferEncoding): Promise<string> {
const ret = await vscode.workspace.fs.readFile(vscode.Uri.parse(path));
return ret.toString();
}
Expand All @@ -92,7 +92,7 @@ export async function mkdirAsync(path: string, options: any): Promise<void> {
export async function writeFileAsync(
path: string,
content: string,
encoding: string
encoding: BufferEncoding
): Promise<void> {
return vscode.workspace.fs.writeFile(vscode.Uri.parse(path), Buffer.from(content));
}
Expand Down
8 changes: 4 additions & 4 deletions src/platform/node/fs.ts
Expand Up @@ -90,20 +90,20 @@ export async function unlink(path: string): Promise<void> {
fs.unlinkSync(path);
}

export async function readFileAsync(path: string, encoding: string): Promise<string> {
export async function readFileAsync(path: string, encoding: BufferEncoding): Promise<string> {
return promisify(fs.readFile)(path, encoding);
}

export async function mkdirAsync(path: string, options: any): Promise<void> {
return promisify(fs.mkdir)(path, options);
await promisify(fs.mkdir)(path, options);
}

export async function writeFileAsync(
path: string,
content: string,
encoding: string
encoding: BufferEncoding
): Promise<void> {
return promisify(fs.writeFile)(path, content, encoding);
await promisify(fs.writeFile)(path, content, encoding);
}

export async function accessAsync(path: string, mode: number) {
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Expand Up @@ -3,7 +3,7 @@


"@babel/code-frame@^7.0.0":
version "7.10.7"
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==
dependencies:
Expand Down Expand Up @@ -233,10 +233,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256"
integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==

"@types/node@12.20.33":
version "12.20.33"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.33.tgz#24927446e8b7669d10abacedd16077359678f436"
integrity sha512-5XmYX2GECSa+CxMYaFsr2mrql71Q4EvHjKS+ox/SiwSdaASMoBIWE6UmZqFO+VX1jIcsYLStI4FFoB6V7FeIYw==
"@types/node@14.17.27":
version "14.17.27"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.27.tgz#5054610d37bb5f6e21342d0e6d24c494231f3b85"
integrity sha512-94+Ahf9IcaDuJTle/2b+wzvjmutxXAEXU6O81JHblYXUg2BDG+dnBy7VxIPHKAyEEDHzCMQydTJuWvrE+Aanzw==

"@types/parse-json@^4.0.0":
version "4.0.0"
Expand Down

0 comments on commit f118620

Please sign in to comment.