Skip to content

Commit

Permalink
feat: swtich to npm as default package manager
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 authored and quant-eagle committed Sep 19, 2024
1 parent 085e622 commit e1b116c
Show file tree
Hide file tree
Showing 300 changed files with 45,446 additions and 28,735 deletions.
13 changes: 1 addition & 12 deletions .configurations/configuration.dsc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@ properties:
id: OpenJS.NodeJS.LTS
version: "20.14.0"
source: winget
- resource: NpmDsc/NpmPackage
id: yarn
dependsOn:
- npm
directives:
description: Install Yarn
allowPrerelease: true
settings:
Name: 'yarn'
Global: true
PackageDirectory: '${WinGetConfigRoot}\..\'
- resource: Microsoft.WinGet.DSC/WinGetPackage
directives:
description: Install Python 3.10
Expand Down Expand Up @@ -56,7 +45,7 @@ properties:
includeRecommended: true
components:
- Microsoft.VisualStudio.Workload.VCTools
- resource: YarnDsc/YarnInstall
- resource: NpmDsc/NpmInstall
dependsOn:
- npm
directives:
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ RUN git config --system codespaces-theme.hide-status 1

USER node
RUN npm install -g node-gyp
RUN YARN_CACHE="$(yarn cache dir)" && rm -rf "$YARN_CACHE" && ln -s /vscode-dev/yarn-cache "$YARN_CACHE"
RUN NPM_CACHE="$(npm config get cache)" && rm -rf "$NPM_CACHE" && ln -s /vscode-dev/npm-cache "$NPM_CACHE"
RUN echo 'export DISPLAY="${DISPLAY:-:1}"' | tee -a ~/.bashrc >> ~/.zshrc

USER root
CMD chown node:node /vscode-dev && sudo -u node mkdir -p /vscode-dev/yarn-cache && sleep inf
CMD chown node:node /vscode-dev && sudo -u node mkdir -p /vscode-dev/npm-cache && sleep inf
4 changes: 2 additions & 2 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you already have VS Code and Docker installed, you can click the badge above
4. Press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd> and select **Dev Containers: Clone Repository in Container Volume...**.

> **Tip:** While you can use your local source tree instead, operations like `yarn install` can be slow on macOS or when using the Hyper-V engine on Windows. We recommend using the WSL filesystem on Windows or the "clone repository in container" approach on Windows and macOS instead since it uses "named volume" rather than the local filesystem.
> **Tip:** While you can use your local source tree instead, operations like `npm i` can be slow on macOS or when using the Hyper-V engine on Windows. We recommend using the WSL filesystem on Windows or the "clone repository in container" approach on Windows and macOS instead since it uses "named volume" rather than the local filesystem.
5. Type `https://github.com/microsoft/vscode` (or a branch or PR URL) in the input box and press <kbd>Enter</kbd>.

Expand Down Expand Up @@ -85,7 +85,7 @@ To start working with Code - OSS, follow these steps:
1. In your local VS Code client, open a terminal (<kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>\`</kbd>) and type the following commands:

```bash
yarn install
npm i
bash scripts/code.sh
```

Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

yarn install --network-timeout 180000
yarn electron
npm i
npm run electron
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build/node_modules
coverage/
test_data/
test-results/
yarn-error.log
test-results.xml
vscode.lsif
vscode.db
/.profile-oss
Expand Down
7 changes: 7 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
disturl="https://electronjs.org/headers"
target="30.4.0"
ms_build_id="10073054"
runtime="electron"
build_from_source="true"
legacy-peer-deps="true"
timeout=180000
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.14.0
20.15.1
101 changes: 101 additions & 0 deletions .vscode/extensions/vscode-selfhost-test-provider/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 0 additions & 60 deletions .vscode/extensions/vscode-selfhost-test-provider/yarn.lock

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"files.readonlyInclude": {
"**/node_modules/**/*.*": true,
"**/yarn.lock": true,
"**/package-lock.json": true,
"**/Cargo.lock": true,
"src/vs/workbench/workbench.web.main.css": true,
"src/vs/workbench/workbench.desktop.main.css": true,
Expand Down Expand Up @@ -74,7 +75,6 @@
],
"typescript.tsdk": "node_modules/typescript/lib",
"npm.exclude": "**/extensions/**",
"npm.packageManager": "yarn",
"emmet.excludeLanguages": [],
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.quoteStyle": "single",
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"problemMatcher": []
},
{
"label": "Kill VS Code - Build, Yarn, VS Code - Build",
"label": "Kill VS Code - Build, Npm, VS Code - Build",
"dependsOn": [
"Kill VS Code - Build",
"npm: install",
Expand Down
5 changes: 0 additions & 5 deletions .yarnrc

This file was deleted.

29 changes: 10 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Contributing to Void

Welcome! 👋 This is a guide on how to contribute to Void. We want to make it as easy as possible to contribute, so if you have any questions or comments, reach out via email or discord!
Expand All @@ -8,16 +7,14 @@ There are two main ways to contribute:
- Suggest New Features (discord)
- Build New Features (roadmap)


See the [GitHub Issues](https://github.com/orgs/voideditor/projects/2/views/3) list for a list of the most important features to build, or feel free to create new issues.

We use a [VSCode extension](https://code.visualstudio.com/api/get-started/your-first-extension) to implement most of Void's functionality. Scroll down to see 1. How to build/contribute to the Extension, or 2. How to build/contribute to the full IDE (for more native changes).
We use a [VSCode extension](https://code.visualstudio.com/api/get-started/your-first-extension) to implement most of Void's functionality. Scroll down to see 1. How to build/contribute to the Extension, or 2. How to build/contribute to the full IDE (for more native changes).

For some useful links we've compiled see [`VOID_USEFUL_LINKS.md`](https://github.com/voideditor/void/blob/main/VOID_USEFUL_LINKS.md).



## 1. Building the Extension

Here's how you can start contributing to the Void Extension, where much of our code lives right now:

1. Clone the repository:
Expand All @@ -26,10 +23,10 @@ Here's how you can start contributing to the Void Extension, where much of our c
git clone https://github.com/voideditor/void
```

2. Open the extension folder in VS Code (open it in a new workspace, *don't* just cd into it):
2. Open the extension folder in VS Code (open it in a new workspace, _don't_ just cd into it):

```
/extensions/void
open /extensions/void
```

3. Install dependencies:
Expand All @@ -56,19 +53,19 @@ Now that you're set up, feel free to check out our [Issues](https://github.com/v

Beyond the extension, we very occasionally edit the IDE when we need to access more functionality. If you want to work on the full IDE, please follow the steps below, or see VS Code's full [how to contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute) page.

1. Install all dependencies. Make sure you have node installed.

1. Install all dependencies. Make sure you have yarn installed (`npm install -g yarn`)
```
yarn
npm ci
```

2. In VS Code, press <kbd>Ctrl+Shift+B</kbd> to start the build process - this can take some time. If you're not using VS Code, run `yarn watch` instead.
2. In VS Code, press <kbd>Ctrl+Shift+B</kbd> to start the build process - this can take some time. If you're not using VS Code, run `npm run watch` instead.

3. Run `./scripts/code.sh` in your terminal.

This should open up the built IDE after loading for some time. To see new changes without restarting the build, use <kbd>Ctrl+Shift+P</kbd> and run "Reload Window".

To bundle the IDE, run `yarn gulp vscode-win32-x64`. Here are the full options: vscode-{win32-ia32 | win32-x64 | darwin-x64 | darwin-arm64 | linux-ia32 | linux-x64 | linux-arm}(-min)
To bundle the IDE, run `npm run gulp vscode-win32-x64`. Here are the full options: vscode-{win32-ia32 | win32-x64 | darwin-x64 | darwin-arm64 | linux-ia32 | linux-x64 | linux-arm}(-min)

If you're on Windows, we recommend running the project inside a dev container. VSCode should prompt you to do this automatically.

Expand All @@ -78,11 +75,6 @@ Now that you're set up, feel free to check out our [Issues](https://github.com/v

Here are the most important topics on our Roadmap. More ⭐'s = more important.






## ⭐⭐⭐ Improve diffs.

We define a "diff" as a single green/red pair that denotes a change. Here are improvements to make:
Expand All @@ -93,12 +85,12 @@ We define a "diff" as a single green/red pair that denotes a change. Here are im

3. Make diff highlighting dynamic. Right now when the user edits text, all of the diffs and their highlights are cleared. Instead, we should update the highlighting of the diff. Each diff lives on a range of lines, and all changes inside that range or intersecting with it should update its highlighting.


## ⭐⭐⭐ Build Cursor-style quick edits (ctrl+k).

When the user presses ctrl+k, an input box should appear inline with the code that they were selecting. This is somewhat difficult to do because an extension alone cannot do this, and it requires creating a new component in the IDE. We think you can modify vscode's built-in "codelens" or "zone widget" components, but we are open to alternatives.

## ⭐⭐⭐ Make History work well.

When the user submits a response or presses the apply/accept/reject button, we should add these events to the history, allowing the user to undo/redo them. Right now there is unexpected behavior if the user tries to undo or redo their changes.

## ⭐⭐⭐ Improve Ctrl+L backend.
Expand All @@ -115,7 +107,6 @@ Feel free to build AI features beyond the standard Cursor ones. For example, cre

Eventually, we want to build a convenient API for creating AI tools. The API will provide methods for creating the UI (showing an autocomplete suggestion, or creating a new diff), detecting event changes (like `onKeystroke` or `onFileOpen`), and modifying the user's file-system (storing indexes associated with each file), making it much easier to make your own AI plugin. We plan on building these features further along in timeline, but we wanted to list them for completeness.


## ⭐ One-stars.

⭐ When user presses ctrl+L it should clear the sidebar's state.
Expand All @@ -128,4 +119,4 @@ Eventually, we want to build a convenient API for creating AI tools. The API wil

# Submitting a Pull Request

When you've made changes and want to submit them, please submit a pull request.
When you've made changes and want to submit them, please submit a pull request.
2 changes: 1 addition & 1 deletion build/.cachesalt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-08-14T18:12:43.548Z
2024-09-04T10:21:29.952Z
1 change: 0 additions & 1 deletion build/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.yarnrc
*.js.map
5 changes: 5 additions & 0 deletions build/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
disturl="https://nodejs.org/dist"
runtime="node"
build_from_source="true"
legacy-peer-deps="true"
timeout=180000
Loading

0 comments on commit e1b116c

Please sign in to comment.