Archived
1
0

Implement fs module (#3)

* Implements the fs module

* Add stats object

* Add not implemented to createWriteStream

* Update mkdtemp to use tmp dir

* Unexport Stats

* Add client web socket for commands and restructure
This commit is contained in:
Kyle Carberry
2019-01-14 14:58:34 -06:00
parent da27bc0f04
commit a328204d80
68 changed files with 10467 additions and 2274 deletions

1
scripts/dummy.js Normal file
View File

@ -0,0 +1 @@
// This is for ignoring CSS and images when running tests with Jest.

View File

@ -0,0 +1,42 @@
import { exec } from "child_process";
import { existsSync, readdirSync } from "fs";
import { join, resolve } from "path";
import { logger, field } from "../packages/logger";
/**
* Install dependencies for a single package.
*/
const doInstall = (pkg: string, path: string): void => {
logger.info(`Installing "${pkg}" dependencies...`);
exec("yarn", {
cwd: path,
maxBuffer: 1024 * 1024 * 10,
}, (error, stdout, stderr) => {
if (error) {
logger.error(
`Failed to install "${pkg}" dependencies`,
field("error", error),
field("stdout", stdout),
field("stderr", stderr),
);
process.exit(1);
}
logger.info(`Successfully grabbed \"${pkg}\" dependencies!`);
});
};
/**
* Install dependencies for all packages.
*/
const handlePackages = (dir: string): void => {
readdirSync(dir).forEach((pkg) => {
const pkgDir = join(dir, pkg);
const pkgJsonPath = join(pkgDir, "package.json");
if (existsSync(pkgJsonPath)) {
doInstall(pkg, pkgDir);
}
});
};
handlePackages(resolve(__dirname, "..", "packages"));

3
scripts/test-setup.js Normal file
View File

@ -0,0 +1,3 @@
global.requestAnimationFrame = (cb) => {
setTimeout(cb, 0);
};

32
scripts/vscode.css.patch Normal file
View File

@ -0,0 +1,32 @@
diff --git a/src/vs/base/browser/ui/iconLabel/iconlabel.css b/src/vs/base/browser/ui/iconLabel/iconlabel.css
index 651843fcc9..aa31b52cb9 100644
--- a/src/vs/base/browser/ui/iconLabel/iconlabel.css
+++ b/src/vs/base/browser/ui/iconLabel/iconlabel.css
@@ -32,6 +32,7 @@
.monaco-icon-label > .monaco-icon-label-description-container {
overflow: hidden; /* this causes the label/description to shrink first if decorations are enabled */
text-overflow: ellipsis;
+ margin-right: auto;
}
.monaco-icon-label > .monaco-icon-label-description-container > .label-name {
@@ -39,6 +40,12 @@
white-space: pre; /* enable to show labels that include multiple whitespaces */
}
+.monaco-icon-label > .decorations-wrapper {
+ display: flex;
+ flex-direction: row;
+ padding-right: 12px;
+}
+
.monaco-icon-label > .monaco-icon-label-description-container > .label-description {
opacity: .7;
margin-left: 0.5em;
@@ -56,6 +63,5 @@
font-size: 90%;
font-weight: 600;
padding: 0 12px 0 5px;
- margin-left: auto;
text-align: center;
}

8653
scripts/vscode.patch Normal file

File diff suppressed because it is too large Load Diff