Compare commits

..

14 Commits

Author SHA1 Message Date
Joe Previte
8ed7498b3c fixup: include description ts-expect-error comment 2022-12-06 08:55:24 -07:00
Joe Previte
73b61ecfb6 feat(wrapper): add tests for isChild 2022-12-05 16:11:45 -07:00
Joe Previte
292a63dccd Merge branch 'main' into release/v4.9.0 2022-12-05 15:43:33 -07:00
Pfau, Sascha
f43082e142 fix installing code-server on manjaro image (#5834)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-12-05 15:43:22 -07:00
Geoffrey Huntley
b6adcf50c6 feat(securitytxt): add security.txt (#5827) 2022-12-05 15:43:00 -07:00
Joe Previte
60ab23f008 chore: pin all jobs in build to ubuntu 20.04 2022-12-05 15:41:08 -07:00
Joe Previte
40396cc810 chore: use ubuntu-22.04 for e2e 2022-12-02 15:20:36 -07:00
Joe Previte
0c7a60e407 chore: add notes to changelog 2022-12-02 13:56:17 -07:00
Joe Previte
e701b74952 chore: update prettierignore 2022-12-02 13:56:10 -07:00
Joe Previte
c761199923 chore: pin ubuntu runner in build code-server 2022-12-02 13:48:55 -07:00
Joe Previte
956ed96a2c Revert "fix: add +x to product.json in build-vscode"
This reverts commit fc4d2b532f.
2022-12-02 13:44:13 -07:00
Joe Previte
2b32b10e87 fixup!: fix: keep product.json file permissions in release 2022-12-02 13:42:37 -07:00
Joe Previte
ace09103a2 chore: update package.json bust cache 2022-12-02 11:31:53 -07:00
Joe Previte
f7db2a0dd8 trigger ci 2022-12-02 11:25:57 -07:00
10 changed files with 47 additions and 13 deletions

View File

@@ -24,7 +24,7 @@ concurrency:
jobs:
prettier:
name: Format with Prettier
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Checkout repo
@@ -37,7 +37,7 @@ jobs:
doctoc:
name: Doctoc markdown files
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Checkout repo
@@ -66,7 +66,7 @@ jobs:
lint-helm:
name: Lint Helm chart
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Checkout repo
@@ -97,7 +97,7 @@ jobs:
lint-ts:
name: Lint TypeScript files
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Checkout repo
@@ -141,7 +141,7 @@ jobs:
build:
name: Build code-server
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
timeout-minutes: 30
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -244,7 +244,7 @@ jobs:
# Only run if PR comes from base repo or event is not a PR
# Reason: forks cannot access secrets and this will always fail
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
@@ -295,7 +295,7 @@ jobs:
test-e2e:
name: Run e2e tests
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
timeout-minutes: 25
steps:
- name: Checkout repo
@@ -351,7 +351,7 @@ jobs:
test-e2e-proxy:
name: Run e2e tests behind proxy
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
timeout-minutes: 25
steps:
- name: Checkout repo

View File

@@ -323,7 +323,7 @@ jobs:
tmp=$(mktemp)
jq '.codeServerVersion = "$VERSION"' release/lib/vscode/product.json > "$tmp" && mv "$tmp" release/lib/vscode/product.json
# Ensure it has the same permissions as before
chmod 755 release/lib/vscode/product.json
chmod 644 release/lib/vscode/product.json
- name: Compress release package
run: tar -czf package.tar.gz release

View File

@@ -1,6 +1,7 @@
lib/vscode
lib/vscode-reh-web-linux-x64
release-standalone
release-packages
release
helm-chart
test/scripts

View File

@@ -26,6 +26,9 @@ Code v1.73.0
WIP
known issues: https://github.com/adobe/fetch/pull/318#issuecomment-1306070259
cert won't work for anyone using Ubuntu 22.04
## [4.8.3](https://github.com/coder/code-server/releases/tag/v4.8.3) - 2022-11-07
Code v1.72.1

View File

@@ -96,8 +96,6 @@ main() {
EOF
) > product.json
chmod +x product.json
# Any platform here works since we will do our own packaging. We have to do
# this because we have an NPM package that could be installed on any platform.
# The correct platform dependencies and scripts will be installed as part of

View File

@@ -387,7 +387,7 @@ install_aur() {
if [ ! "${DRY_RUN-}" ]; then
cd "$CACHE_DIR/code-server-aur"
fi
sh_c makepkg -si
sh_c makepkg -si --noconfirm
echo_systemd_postinstall AUR
}

View File

@@ -116,7 +116,8 @@
"ide",
"coder",
"vscode-remote",
"browser-ide"
"browser-ide",
"remote-development"
],
"engines": {
"node": "16"

6
src/browser/security.txt Normal file
View File

@@ -0,0 +1,6 @@
Contact: mailto:security@coder.com
Acknowledgments: https://coder.com/security/thanks
Preferred-Languages: en-US
Canonical: https://coder.com/.well-known/security.txt
Policy: https://coder.com/security/policy
Hiring: https://coder.com/careers

View File

@@ -81,6 +81,13 @@ export const register = async (app: App, args: DefaultedArgs): Promise<Disposabl
return res.redirect(`https://${req.headers.host}${req.originalUrl}`)
}
// Return security.txt.
if (req.originalUrl === "/security.txt" || req.originalUrl === "/.well-known/security.txt") {
const resourcePath = path.resolve(rootPath, "src/browser/security.txt")
res.set("Content-Type", getMediaMime(resourcePath))
return res.send(await fs.readFile(resourcePath))
}
// Return robots.txt.
if (req.originalUrl === "/robots.txt") {
const resourcePath = path.resolve(rootPath, "src/browser/robots.txt")

View File

@@ -0,0 +1,18 @@
import { ChildProcess } from "child_process"
import { ParentProcess, isChild } from "../../../src/node/wrapper"
describe("wrapper", () => {
describe("isChild", () => {
it("should return false for parent process", () => {
const p = new ParentProcess("1")
expect(isChild(p)).toBe(false)
})
})
it("should return false for parent process", () => {
const p = new ChildProcess()
// our ChildProcess isn't exported
// and shouldn't be for a test so surpressing TS error.
// @ts-expect-error - see above
expect(isChild(p)).toBe(false)
})
})