qaboard
qaboard copied to clipboard
Bump express from 4.17.2 to 4.18.2 in /webapp
Bumps express from 4.17.2 to 4.18.2.
Release notes
Sourced from express's releases.
4.18.2
- Fix regression routing a large stack in a single route
- deps: [email protected]
- deps: [email protected]
- perf: remove unnecessary object clone
- deps: [email protected]
4.18.1
- Fix hanging on large stack of sync routes
4.18.0
- Add "root" option to
res.download
- Allow
options
withoutfilename
inres.download
- Deprecate string and non-integer arguments to
res.status
- Fix behavior of
null
/undefined
asmaxAge
inres.cookie
- Fix handling very large stacks of sync middleware
- Ignore
Object.prototype
values in settings throughapp.set
/app.get
- Invoke
default
with same arguments as types inres.format
- Support proper 205 responses using
res.send
- Use
http-errors
forres.format
error- deps: [email protected]
- Fix error message for json parse whitespace in
strict
- Fix internal error when inflated body exceeds limit
- Prevent loss of async hooks context
- Prevent hanging when request already read
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Add
priority
option- Fix
expires
option to reject invalid dates- deps: [email protected]
- Replace internal
eval
usage withFunction
constructor- Use instance methods on
process
to check for listeners- deps: [email protected]
- Remove set content headers that break response
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Prevent loss of async hooks context
- deps: [email protected]
- deps: [email protected]
- Fix emitted 416 error missing headers property
- Limit the headers removed for 304 response
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
... (truncated)
Changelog
Sourced from express's changelog.
4.18.2 / 2022-10-08
- Fix regression routing a large stack in a single route
- deps: [email protected]
- deps: [email protected]
- perf: remove unnecessary object clone
- deps: [email protected]
4.18.1 / 2022-04-29
- Fix hanging on large stack of sync routes
4.18.0 / 2022-04-25
- Add "root" option to
res.download
- Allow
options
withoutfilename
inres.download
- Deprecate string and non-integer arguments to
res.status
- Fix behavior of
null
/undefined
asmaxAge
inres.cookie
- Fix handling very large stacks of sync middleware
- Ignore
Object.prototype
values in settings throughapp.set
/app.get
- Invoke
default
with same arguments as types inres.format
- Support proper 205 responses using
res.send
- Use
http-errors
forres.format
error- deps: [email protected]
- Fix error message for json parse whitespace in
strict
- Fix internal error when inflated body exceeds limit
- Prevent loss of async hooks context
- Prevent hanging when request already read
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Add
priority
option- Fix
expires
option to reject invalid dates- deps: [email protected]
- Replace internal
eval
usage withFunction
constructor- Use instance methods on
process
to check for listeners- deps: [email protected]
- Remove set content headers that break response
- deps: [email protected]
- deps: [email protected]
- deps: [email protected]
- Prevent loss of async hooks context
- deps: [email protected]
- deps: [email protected]
... (truncated)
Commits
8368dc1
4.18.261f4049
docs: replace Freenode with Libera Chatbb7907b
build: [email protected]f56ce73
build: [email protected]24b3dc5
deps: [email protected]689d175
deps: [email protected]340be0f
build: [email protected]33e8dc3
docs: use Node.js name style644f646
build: [email protected]ecd7572
build: [email protected]- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) -
@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language -
@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language -
@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language -
@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the Security Alerts page.
@dayo09
They say that fs does not consider ssh support. It's safe to use vscode.workspace.fs instead of fs to support our extension on ssh on wheels.
Could you provide reference URLs if any? Thanks!
@hyunsik-yoon As you can see below, it's MS vscode's recommendation to use their api for filesystem approaches.
vscode/index.d.ts>vscode.workspace.fs
/**
* A {@link FileSystem file system} instance that allows to interact with local and remote
* files, e.g. `vscode.workspace.fs.readDirectory(someUri)` allows to retrieve all entries
* of a directory or `vscode.workspace.fs.stat(anotherUri)` returns the meta data for a
* file.
*/
export const fs: FileSystem;
From vscode api guide
Look out for usages of the fs node module for file system operations. If possible, use the vscode.workspace.fs API, which delegates to the appropriate file system provider.
From their release note
Call to Action: If your extension is currently using the fs module from Node.js, consider migrating to the new vscode.workspace.fs API
I've investigated as I don't know how different it is.
as-is (nodejs-api)
Buffer.from(): https://nodejs.org/dist/latest-v10.x/docs/api/buffer.html#buffer_class_method_buffer_from_string_encoding writeFile(): https://nodejs.org/dist/latest-v10.x/docs/api/fs.html#fs_fs_writefile_file_data_options_callback
- file:
<string> | <Buffer> | <URL> | <integer> filename or file descriptor
- data:
<string> | <Buffer> | <TypedArray> | <DataView>
const writeBytes = Buffer.from('Hello Node.js'); // Buffer.from(): nodejs api
const data = new Uint8Array(writeBytes);
fs.writeFile('message.txt', data, (err) => {
if (err) throw err;
console.log('The file has been saved!');
});
to-be (vscode-api)
fs: https://code.visualstudio.com/api/references/vscode-api#FileSystem uri: https://code.visualstudio.com/api/references/vscode-api#Uri
const good = URI.file('/coding/c#/project1');
good.scheme === 'file';
good.path === '/coding/c#/project1';
good.fragment === '';
const bad = URI.parse('file://' + '/coding/c#/project1');
bad.scheme === 'file';
bad.path === '/coding/c'; // path is now broken
bad.fragment === '/project1';
writeFile
- uri:
Uri
. The uri of the file. - content:
Uint8Array
. The new content of the file.
const writeBytes = Buffer.from('Hello vscode'); // Buffer.from(): nodejs api
// someUri: Uri of vscode-api, used like `Uri.file('message.txt')`
// writeBytes: class Buffer -> Uint8Array
await vscode.workspace.fs.writeFile(someUri, writeBytes); // writeFile: fs of vscode-api
vscode fs api doesn't take string as param. nodejs api does so it looks easier. It's good to support util classes to wrap vscode fs api.
@YongseopKim Yes, if you use fs.promises.writeFile
, then it's rather similar to vscode.workspace.fs.writeFile
. The differences are
-
fs.promises.writeFile
returns promise whilevscode.workspace.fs.writeFile
returns Thenable. -
fs.promises.writeFile
takes string whilevscode.workspace.fs.writeFile
takes Uint8Array, as you mentioned.
It looks like a good idea to provide a utility wrapping the Uint8Array conversion. :-D
Q. fs.promises.writeFile
is a kind of api of vscode?
@YongseopKim Nope, it's a basic fs module. They just support promises
version of their functions.
NOTE: vscode.workspace.fs
doesn't support synchronous functions.
https://github.com/microsoft/vscode/issues/84175#issuecomment-551445383
readFileSync() - currently using node's fs.readFileSync() Our design/architecture prohibits anything sync here. This will not happen.
It seems that they internally decided not to support sync functions for their apis, for whatever reason.
NOTE: vscode.workspace.fs is too slow
I tested the function latency.
As vscode.workspace.fs
is asynchronouse function, I wrapped the statSync with promise.
- vscode.workspace.fs: 1721 ms
- Promise + fs.statSync: 9.92 ms
console.time("1");
console.timeLog("1", "Promise statSync start")
const p = new Promise((resolve, reject)=>{
fs.statSync("/home/dayo/git/ONE-vscode/res/modelDir/truediv/model.cfg")
resolve("DONE")
});
p.then(()=>{
// 9.928955078125 ms
console.timeLog("1", "Promise statSync end")
})
console.time("2");
console.timeLog("2", "vscode.workspace.fs start");
vscode.workspace.fs
.stat(
vscode.Uri.file(
"/home/dayo/git/ONE-vscode/res/modelDir/truediv/model.cfg"
)
)
.then(
(stat) => {
// 1.721s
console.timeLog("2", "vscode.workspace.fs end");
},
(error) => console.log(error)
);