Skip to content

Add server #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -825,10 +825,12 @@
"target": "**/vs/server/**",
"restrictions": [
"vs/nls",
"**/vs/code/**/{common,server,browser,node,electron-sandbox,electron-browser}/**",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Why do we add these two entries in here?

"**/vs/base/**/{common,node}/**",
"**/vs/base/parts/**/{common,node}/**",
"**/vs/platform/**/{common,node}/**",
"**/vs/workbench/**/{common,node}/**",
"**/vs/workbench/workbench.web.api",
"**/vs/server/**",
"*" // node modules
]
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ node_modules/
extensions/**/dist/
/out*/
/extensions/**/out/
src/vs/server
# @coder: The server directory is omitted upstream.
# src/vs/server
resources/server
build/node_modules
coverage/
Expand Down
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.formatOnSave": true,
},
"typescript.format.insertSpaceAfterConstructor": false,
"javascript.format.insertSpaceAfterConstructor": false,
"javascript.format.insertSpaceBeforeFunctionParenthesis": false,
"typescript.format.insertSpaceBeforeFunctionParenthesis": false,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
Comment on lines +87 to +92
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓Guessing you didn't add this, but do we know why we do this?

"typescript.tsc.autoDetect": "off",
"notebook.experimental.useMarkdownRenderer": true,
"testing.autoRun.mode": "rerun",
Expand Down
14 changes: 13 additions & 1 deletion build/hygiene.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ const copyrightHeaderLines = [
' *--------------------------------------------------------------------------------------------*/',
];

/**
* @remark While this helps delineate Coder's additions to the upstream project,
* this notice should be examined within the context of the application.
* Code from both maintainers often overlaps.
*/
const coderCopyrightHeaderLines = [
'/*---------------------------------------------------------------------------------------------',
' * Copyright (c) Coder Technologies. All rights reserved.',
' * Licensed under the MIT License. See License.txt in the project root for license information.',
' *--------------------------------------------------------------------------------------------*/',
];

function hygiene(some, linting = true) {
const gulpeslint = require('gulp-eslint');
const tsfmt = require('typescript-formatter');
Expand Down Expand Up @@ -62,7 +74,7 @@ function hygiene(some, linting = true) {
const lines = file.__lines;

for (let i = 0; i < copyrightHeaderLines.length; i++) {
if (lines[i] !== copyrightHeaderLines[i]) {
if (lines[i] !== copyrightHeaderLines[i] && lines[i] !== coderCopyrightHeaderLines[i]) {
console.error(file.relative + ': Missing or bad copyright statement');
errorCount++;
break;
Expand Down
2 changes: 1 addition & 1 deletion build/lib/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function fromLocal(extensionPath: string, forWeb: boolean): Stream {
if (isWebPacked) {
input = updateExtensionPackageJSON(input, (data: any) => {
delete data.scripts;
delete data.dependencies;
// https://github.com/cdr/code-server/pull/2041#issuecomment-685910322
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

delete data.devDependencies;
if (data.main) {
data.main = data.main.replace('/out/', /dist/);
Expand Down
2 changes: 2 additions & 0 deletions build/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ function streamToPromise(stream) {
}
exports.streamToPromise = streamToPromise;
function getElectronVersion() {
// NOTE@coder: Fix version due to .yarnrc removal.
return process.versions.node;
Comment on lines +272 to +273
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓This seems like a temp fix. Should we open an issue to fix later?

const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
const target = /^target "(.*)"$/m.exec(yarnrc)[1];
return target;
Expand Down
4 changes: 0 additions & 4 deletions build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"version": "1.0.0",
"license": "MIT",
"devDependencies": {
"@azure/cosmos": "^3.9.3",
"@azure/storage-blob": "^12.4.0",
"@types/ansi-colors": "^3.2.0",
"@types/azure": "0.9.19",
"@types/byline": "^4.2.32",
Expand Down Expand Up @@ -37,7 +35,6 @@
"@typescript-eslint/experimental-utils": "~2.13.0",
"@typescript-eslint/parser": "^3.3.0",
"applicationinsights": "1.0.8",
"azure-storage": "^2.1.0",
"byline": "^5.0.0",
"colors": "^1.4.0",
"commander": "^7.0.0",
Expand All @@ -50,7 +47,6 @@
"mime": "^1.4.1",
"mkdirp": "^1.0.4",
"p-limit": "^3.1.0",
"plist": "^3.0.1",
"source-map": "0.6.1",
"typescript": "^4.4.0-dev.20210607",
"vsce": "1.48.0",
Expand Down
Loading