Use proper NodeRuntime in the formatter interface

This commit is contained in:
Kirill Bulatov
2023-10-11 12:56:28 +03:00
parent a420d9cdc7
commit a8387b8b19
10 changed files with 71 additions and 20 deletions
@@ -0,0 +1 @@
node_modules/
+29
View File
@@ -0,0 +1,29 @@
{
"name": "prettier_server",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "prettier_server",
"version": "1.0.0",
"dependencies": {
"prettier": "^3.0.3"
}
},
"node_modules/prettier": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
"integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
}
}
}
+12 -9
View File
@@ -1,11 +1,14 @@
{
"name": "prettier_server",
"version": "1.0.0",
"description": "",
"main": "src/index.js",
"scripts": {
"start": "node src/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Zed Industries"
"name": "prettier_server",
"version": "1.0.0",
"description": "",
"main": "src/index.js",
"scripts": {
"start": "node src/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Zed Industries",
"dependencies": {
"prettier": "^3.0"
}
}
@@ -17,6 +17,7 @@ function handleData() {
const length = buffer.readUInt32LE(0);
console.log(length);
console.log(buffer.toString());
if (buffer.length < 4 + length) {
return;
}