Skip to content

Commit

Permalink
ci: Upgrade the VSCode extension to 0.12.2 (#531)
Browse files Browse the repository at this point in the history
* Upgrade the VSCode extention to 0.12.2;
First cut at DEPLOYING.md - needs careful vetting;
"Development" section could use a bit of help to make it
   easier for newcomers to figure out how to modify the extension

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update README.md to describe the deployment process;
Remove DEPLOYING.md (now part of README);
Update `prqlc` version in dependencies;
Updated `version` for the extension itself;
Fix name of `prqlc` in src.compiler.ts

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Mention change from `prql-js` to `prqlc` in Changelog;
Mention Changelog in README

* Update README.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Roos <[email protected]>
  • Loading branch information
3 people authored Jun 11, 2024
1 parent 05a12af commit 2709ab4
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- run: npm ci
- run: npm run compile

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- run: npm ci
- uses: HaaLeo/publish-vscode-extension@v1
with:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ here. Instead see [releases](https://github.com/PRQL/prql-vscode/releases) for a
brief summary of added extension features, extension source code zip archive,
and `prql-vscode-x.x.x.vsix` extension package download.

## 0.12.2 - 2024-06-11

- Bump to 0.12.2
- Change dependency name to `prqlc` (from `prql-js`)

## 0.11.3 - 2024-02-12

- Bump to 0.11.3

## 0.9.0

### Breaking changes
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,26 @@ The `prql.target` extension setting default option value is `Generic`, which wil

You can also disable this PRQL compiler option in vscode extension by setting `prql.target` to `Any`. When `prql.target` is set to `Any`, PRQL compiler will read the target SQL dialect from `.prql` file header as described in [PRQL Language Book](https://prql-lang.org/book/project/target.html). For example, setting `prql.target` to `Any` and adding `prql target:sql.postgres` on the first line of your `.prql` query file will produce SQL for `PostgreSQL` database. Otherwise, `Generic` SQL flavor will be used for the generated SQL.

## Developing
## Deploying the Extension

This repo has the machinery to update the VSCode extension to the Microsoft Marketplace.

When there is a new version of `prqlc` in `npm`, dependabot will PR an update.
Once per day, the _.github/dependabot.yml_ file checks NPM and compares the `dependencies.prqlc` property in _package.json_ to the latest version in NPM. If they differ, dependabot creates a PR for _package.json_.

Once that has been merged, the following manual steps will publish an update for the extension:

- Update the [_CHANGELOG.md_](CHANGELOG.md) file, as needed

- In _package.json_, update the `version` to match. This sets the version number of the extension itself.

- Run `npm install` to update the `package-lock.json`

- Create a new release from Github. This will start a workflow to release the current version to the VS Code Marketplace.

- NB: From time to time, check the `node-version` in the files*.github/workflows/pull-request.yaml* and _.github/workflows/release.yml_. We track Node.js LTS - version 20 in June 2024.

## Developing the Extension

- Clone the repository and install dependencies:

Expand Down
117 changes: 61 additions & 56 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://github.com/prql/prql-vscode.git"
},
"publisher": "prql-lang",
"version": "0.11.4",
"version": "0.12.2",
"icon": "resources/prql-logo.png",
"engines": {
"vscode": "^1.65.0"
Expand Down Expand Up @@ -204,7 +204,7 @@
},
"dependencies": {
"@types/vscode": "^1.90.0",
"prql-js": "^0.12.1",
"prqlc": "^0.12.2",
"shiki": "^0.14.7"
}
}
2 changes: 1 addition & 1 deletion src/compiler.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { workspace, WorkspaceConfiguration } from 'vscode';

import * as prql from 'prql-js';
import * as prql from 'prqlc';
import * as constants from './constants';

export function compile(prqlString: string): string | ErrorMessage[] {
Expand Down

0 comments on commit 2709ab4

Please sign in to comment.