Skip to content

Commit 38b8f53

Browse files
authored
Add SDK package and make the repo multi package (#17)
* Add SDK package and introduce lerna * switch from npm to yarn
1 parent 2f03dd6 commit 38b8f53

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+7246
-168
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/push.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Node.js CI
1+
name: VSCode Extensions CI
22

33
on:
44
push:
@@ -14,7 +14,7 @@ jobs:
1414
matrix:
1515
os: [windows-latest, macos-latest]
1616
node-version: [14.x]
17-
vscode-version: [minimum, stable, insiders]
17+
vscode-version: [stable, insiders]
1818

1919
env:
2020
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
@@ -26,14 +26,30 @@ jobs:
2626
uses: actions/setup-node@v3
2727
with:
2828
node-version: ${{ matrix.node-version }}
29+
cache: "yarn"
2930

30-
- run: npm ci
31-
- run: npm run vscode:prepublish
31+
- run: yarn install --immutable
3232

33-
- name: Tests
33+
- name: Building packages
34+
run: yarn run build
35+
36+
- name: Tests (OSX)
3437
uses: GabrielBB/xvfb-action@v1
3538
if: matrix.os != 'windows-latest'
3639
env:
3740
NODE_OPTIONS: "--max-old-space-size=8192"
3841
with:
39-
run: npm test
42+
run: yarn test
43+
44+
- name: Tests (Windows)
45+
if: matrix.os == 'windows-latest'
46+
run: yarn test
47+
env:
48+
NODE_OPTIONS: "--max-old-space-size=8192"
49+
50+
- name: Integration Tests
51+
run: yarn run test:integ
52+
env:
53+
DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }}
54+
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
55+
DATABRICKS_CLUSTER_ID: ${{ secrets.DATABRICKS_CLUSTER_ID }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@ dist/
44
out/
55
.DS_Store
66
*.vsix
7+
.pnp.*
8+
.yarn/*
9+
!.yarn/patches
10+
!.yarn/plugins
11+
!.yarn/releases
12+
!.yarn/sdks
13+
!.yarn/versions

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.2.1.cjs

Lines changed: 786 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--ignore-engines true

.yarnrc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
nodeLinker: node-modules
2+
3+
plugins:
4+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
5+
spec: "@yarnpkg/plugin-workspace-tools"
6+
7+
yarnPath: .yarn/releases/yarn-3.2.1.cjs

README.md

Lines changed: 15 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -5,91 +5,25 @@
55
| Build ([main branch](https://github.com/databricks/databricks-vscode/commits/main)) | [![GitHub CI Status](https://github.com/databricks/databricks-vscode/actions/workflows/push.yml/badge.svg?branch=main)](https://github.com/databricks/databricks-vscode/actions/workflows/push.yml) [![Coverage](https://img.shields.io/codecov/c/github/databricks/databricks-vscode/main.svg)](https://codecov.io/gh/databricks/databricks-vscode/branch/main) [![LGTM Grade](https://img.shields.io/lgtm/grade/javascript/github/databricks/databricks-vscode)](https://lgtm.com/projects/g/databricks/databricks-vscode/) |
66
| [Marketplace](https://marketplace.visualstudio.com/items?itemName=databricks.databricks-vscode) | [![Marketplace Version](https://img.shields.io/vscode-marketplace/v/databricks.databricks-vscode.svg) ![Marketplace Downloads](https://img.shields.io/vscode-marketplace/d/databricks.databricks-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=databricks.databricks-vscode) |
77

8-
The Databricks extension for VSCode allows you to develop for the Databricks Lakehouse platform from VSCode.
8+
## Introduction
99

10-
The extension is available from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/itemdetails?itemName=databricks.databricks-vscode).
10+
This repository contains the source code for Databricks extensions for VSCode.
1111

12-
This is an open source project because we want you to be involved. We love issues, feature requests, code reviews, pull
13-
requests or any positive contribution. See [CONTRIBUTING.md](CONTRIBUTING.md).
14-
15-
## Features
16-
17-
<mark>TODO</mark>
18-
19-
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
20-
21-
For example if there is an image subfolder under your extension project workspace:
22-
23-
\!\[feature X\]\(images/feature-x.png\)
24-
25-
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
26-
27-
## Requirements
28-
29-
<mark>TODO</mark>
30-
31-
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
32-
33-
## Extension Settings
34-
35-
<mark>TODO</mark>
36-
37-
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
38-
39-
For example:
40-
41-
This extension contributes the following settings:
42-
43-
- `myExtension.enable`: enable/disable this extension
44-
- `myExtension.thing`: set to `blah` to do something
45-
46-
## Known Issues
47-
48-
<mark>TODO</mark>
12+
Currently, we have the following packages:
4913

50-
Calling out known issues can help limit users opening duplicate issues against your extension.
14+
- [databricks-vscode](https://github.com/databricks/databricks-vscode/tree/main/packages/databricks-vscode)
15+
The VSCode extension for Databraicks published to the VSCode marketplace.
16+
- [databricks-sdk-js](https://github.com/databricks/databricks-vscode/tree/main/packages/databricks-sdk-js)
17+
JavaScript and TypeScript SDK for the Databricks REST API.
5118

52-
## Release Notes
19+
### Getting Started
5320

54-
<mark>TODO</mark>
21+
Prepare yarn:
5522

56-
Users appreciate release notes as you update your extension.
23+
```
24+
npm install -g yarn@2
25+
yarn install
26+
```
5727

58-
### 1.0.0
59-
60-
Initial release of ...
61-
62-
### 1.0.1
63-
64-
Fixed issue #.
65-
66-
### 1.1.0
67-
68-
Added features X, Y, and Z.
69-
70-
## License
71-
72-
The **Databricks extension for Visual Studio Code** is distributed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
73-
74-
---
75-
76-
## Following extension guidelines
77-
78-
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
79-
80-
- [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)
81-
82-
## Working with Markdown
83-
84-
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
85-
86-
- Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
87-
- Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
88-
- Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
89-
90-
### For more information
91-
92-
- [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
93-
- [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
94-
95-
**Enjoy!**
28+
This is an open source project because we want you to be involved. We love issues, feature requests, code reviews, pull
29+
requests or any positive contribution. See [CONTRIBUTING.md](CONTRIBUTING.md).

package.json

Lines changed: 19 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,29 @@
11
{
2-
"name": "databricks",
3-
"displayName": "Databricks for Visual Studio Code",
4-
"description": "IDE support for Databricks",
5-
"publisher": "databricks",
6-
"license": "Apache-2.0",
2+
"name": "databricks-vscode",
73
"version": "0.0.1",
8-
"engines": {
9-
"vscode": "^1.68.0"
10-
},
11-
"categories": [
12-
"Data Science",
13-
"Machine Learning"
14-
],
15-
"keywords": [
16-
"spark",
17-
"databricks",
18-
"machine learning",
19-
"ml",
20-
"data science",
21-
"ds",
22-
"lakehouse"
4+
"private": true,
5+
"workspaces": [
6+
"packages/databricks-sdk-js",
7+
"packages/databricks-vscode"
238
],
24-
"preview": true,
25-
"badges": [],
26-
"icon": "images/databricks-logo.png",
27-
"galleryBanner": {
28-
"theme": "light"
9+
"engines": {
10+
"node": ">=16.0",
11+
"yarn": ">=3.2.0"
2912
},
30-
"homepage": "https://https://github.com/databricks/databricks-vscode/blob/main/README.md",
31-
"bugs": {
32-
"url": "https://github.com/databricks/databricks-vscode/issues"
13+
"scripts": {
14+
"test": "yarn workspaces foreach run test --if-present",
15+
"test:integ": "yarn workspaces foreach run test:integ --if-present",
16+
"build": "yarn workspaces foreach run build",
17+
"clean": "yarn workspaces foreach run clean"
3318
},
3419
"repository": {
3520
"type": "git",
36-
"url": "https://github.com/databricks/databricks-vscode.git"
37-
},
38-
"activationEvents": [
39-
"onCommand:databricks.helloWorld"
40-
],
41-
"main": "./dist/extension.js",
42-
"contributes": {
43-
"commands": [
44-
{
45-
"command": "databricks.helloWorld",
46-
"title": "Hello World"
47-
}
48-
]
21+
"url": "git+https://github.com/databricks/databricks-vscode.git"
4922
},
50-
"scripts": {
51-
"vscode:prepublish": "npm run package",
52-
"vscode:package": "vsce package",
53-
"compile": "webpack",
54-
"watch": "webpack --watch",
55-
"package": "webpack --mode production --devtool hidden-source-map",
56-
"compile-tests": "tsc -p . --outDir out",
57-
"watch-tests": "tsc -p . -w --outDir out",
58-
"pretest": "npm run compile-tests && npm run compile && npm run lint",
59-
"fix": "prettier . --write",
60-
"lint": "eslint src --ext ts && prettier . -c",
61-
"test": "node ./out/test/runTest.js"
23+
"license": "Apache-2.0",
24+
"bugs": {
25+
"url": "https://github.com/databricks/databricks-vscode/issues"
6226
},
63-
"devDependencies": {
64-
"@types/glob": "^7.2.0",
65-
"@types/mocha": "^9.1.1",
66-
"@types/node": "16.x",
67-
"@types/vscode": "^1.68.0",
68-
"@typescript-eslint/eslint-plugin": "^5.27.0",
69-
"@typescript-eslint/parser": "^5.27.0",
70-
"@vscode/test-electron": "^2.1.3",
71-
"eslint": "^8.16.0",
72-
"eslint-config-prettier": "^8.5.0",
73-
"glob": "^8.0.3",
74-
"mocha": "^10.0.0",
75-
"prettier": "^2.7.1",
76-
"ts-loader": "^9.3.0",
77-
"typescript": "^4.7.2",
78-
"vsce": "^2.9.1",
79-
"webpack": "^5.72.1",
80-
"webpack-cli": "^4.9.2"
81-
}
27+
"homepage": "https://github.com/databricks/databricks-vscode#readme",
28+
"packageManager": "yarn@3.2.1"
8229
}
File renamed without changes.

0 commit comments

Comments
 (0)