diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 101fa9bd38a1..9b68d4e8e25a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,4 @@ -// Dev Container for Rust, website, prql-js and prqlc-python +// Dev Container for Rust, website, prqlc-js and prqlc-python { "image": "ghcr.io/prql/prql-devcontainer-base:latest", "features": { @@ -17,7 +17,7 @@ "customizations": { "vscode": { "extensions": [ - // Keep in sync with Taskfile.yml + // Keep in sync with Taskfile.yaml "prql-lang.prql-vscode", "rust-lang.rust-analyzer", "mitsuhiko.insta", diff --git a/.github/actions/build-python/action.yaml b/.github/actions/build-python/action.yaml index 6231c5d1e9d6..addaf0e81ff1 100644 --- a/.github/actions/build-python/action.yaml +++ b/.github/actions/build-python/action.yaml @@ -22,7 +22,7 @@ runs: --arg package_name ${{ inputs.package }} '.packages[] | select(.name == $package_name) | .manifest_path')" >>"$GITHUB_OUTPUT" shell: bash - # There's benefit from caching here, because the maturin action uses a container. + # There's no benefit from caching here, because the maturin action uses a container. - uses: PyO3/maturin-action@v1 if: inputs.target == 'source' with: diff --git a/.github/workflows/build-devcontainer.yaml b/.github/workflows/build-devcontainer.yaml index 915a52c62221..392cb1fb24aa 100644 --- a/.github/workflows/build-devcontainer.yaml +++ b/.github/workflows/build-devcontainer.yaml @@ -43,7 +43,7 @@ jobs: - name: Prep args run: | - echo "cargo_crates=$(yq -r '.vars.cargo_crates' Taskfile.yml)" >>"$GITHUB_ENV" + echo "cargo_crates=$(yq -r '.vars.cargo_crates' Taskfile.yaml)" >>"$GITHUB_ENV" - name: Build uses: docker/build-push-action@v5 diff --git a/.github/workflows/build-web.yaml b/.github/workflows/build-web.yaml index 95c86f10f6c5..35ba8c40e73d 100644 --- a/.github/workflows/build-web.yaml +++ b/.github/workflows/build-web.yaml @@ -36,7 +36,6 @@ jobs: - uses: baptiste0928/cargo-install@v3 with: crate: mdbook-admonish - - uses: baptiste0928/cargo-install@v3 with: crate: wasm-pack @@ -49,7 +48,6 @@ jobs: cache-dependency-path: "**/package-lock.json" - run: ./.github/workflows/scripts/set_version.sh - - name: 💰 Cache uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d84139adf320..9c406596e936 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -111,7 +111,7 @@ jobs: append_body: true files: ${{ steps.build-artifact.outputs.artifact-name }} - winget-release: + publish-winget: runs-on: ubuntu-latest needs: build-prqlc if: github.event_name == 'release' @@ -315,15 +315,16 @@ jobs: with: # `*` covers target & OS pattern: ${{ matrix.package }}-*-release + merge-multiple: true - name: Publish to PyPI uses: PyO3/maturin-action@v1 env: MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} with: command: upload - args: --skip-existing **/*{.whl,.tar.gz} + args: --skip-existing * - publish-prql-js: + publish-js: runs-on: ubuntu-latest steps: - name: 📂 Checkout code @@ -338,6 +339,15 @@ jobs: node-version: "20.x" registry-url: "https://registry.npmjs.org" + - run: ./.github/workflows/scripts/set_version.sh + - name: 💰 Cache + uses: Swatinem/rust-cache@v2 + with: + prefix-key: ${{ env.version }} + # Share key with the `build-web` job + shared-key: web + save-if: false + # This is only required in order to have `cross-env` installed, since `npx # cross-env` doesn't seem to work in CI (https://github.com/PRQL/prql/pull/3728) - run: npm install diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 535396e97a2b..ed967f216d3e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -76,11 +76,11 @@ jobs: - .github/workflows/test-dotnet.yaml devcontainer-push: - .devcontainer/**/*Dockerfile - - Taskfile.yml + - Taskfile.yaml devcontainer-build: - .devcontainer/**/*Dockerfile - .github/workflows/build-devcontainer.yaml - - Taskfile.yml + - Taskfile.yaml grammars: - grammars/** elixir: @@ -119,7 +119,7 @@ jobs: - web/book/** - .github/workflows/test-rust.yaml taskfile: - - Taskfile.yml + - Taskfile.yaml web: - "web/**" - ".github/workflows/build-web.yaml" diff --git a/.mega-linter.yaml b/.mega-linter.yaml index 5efd3bf6913f..ddfd1c779e4c 100644 --- a/.mega-linter.yaml +++ b/.mega-linter.yaml @@ -33,6 +33,8 @@ DISABLE_ERRORS_LINTERS: - JSON_JSONLINT - MAKEFILE_CHECKMAKE - MARKDOWN_MARKDOWN_LINK_CHECK + # Prevents us from starting a new library, since it raises an error on unpublished libraries. Can remove after publishing... + - REPOSITORY_DUSTILOCK - SPELL_MISSPELL # Disabled for now, as @max-sixty didn't know whether "Unable to locate the # project file. A project file (tsconfig.json or tsconfig.eslint.json) is diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 7840139a18bd..055092314440 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,6 @@ { "recommendations": [ - // Keep in sync with Taskfile.yml + // Keep in sync with Taskfile.yaml "prql-lang.prql-vscode", "rust-lang.rust-analyzer", "mitsuhiko.insta", diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a7589bdea5f..72c37652f73e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,13 @@ **New Contributors**: +## 0.12.2 — 2024-06-10 + +0.12.2 is a very small release which renames `prql-js` to `prqlc-js` to match +our standard naming scheme. Within node the package is imported as `prqlc`. + +It also fixes a mistake in the `prqlc-python` release pipeline. + ## 0.12.1 — 2024-06-09 0.12.1 is a tiny hotfix release which fixes how intra-prql crate dependencies @@ -318,7 +325,7 @@ This release has 155 commits from 9 contributors. Selected changes: - Rename some of the internal crates, and refactored their paths in the repo. (@aljazerzen, #3683). -- Add a `justfile` for developers who prefer that above our `Taskfile.yml` +- Add a `justfile` for developers who prefer that above our `Taskfile.yaml` (@aljazerzen, #3681) **New Contributors**: diff --git a/Cargo.lock b/Cargo.lock index 5eb2cd3c4fd9..76be73930caf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1030,7 +1030,7 @@ dependencies = [ [[package]] name = "compile-files" -version = "0.12.2" +version = "0.12.3" dependencies = [ "prqlc", ] @@ -2268,7 +2268,7 @@ dependencies = [ [[package]] name = "lutra" -version = "0.12.2" +version = "0.12.3" dependencies = [ "anyhow", "arrow 49.0.0", @@ -2285,7 +2285,7 @@ dependencies = [ [[package]] name = "lutra-python" -version = "0.12.2" +version = "0.12.3" dependencies = [ "arrow 49.0.0", "itertools 0.12.1", @@ -2346,7 +2346,7 @@ dependencies = [ [[package]] name = "mdbook-prql" -version = "0.12.2" +version = "0.12.3" dependencies = [ "ansi-to-html", "anstream", @@ -3016,7 +3016,7 @@ dependencies = [ [[package]] name = "prql" -version = "0.12.2" +version = "0.12.3" dependencies = [ "prqlc", "rustler", @@ -3024,14 +3024,14 @@ dependencies = [ [[package]] name = "prql-compiler" -version = "0.12.2" +version = "0.12.3" dependencies = [ "prqlc", ] [[package]] name = "prql-compiler-macros" -version = "0.12.2" +version = "0.12.3" dependencies = [ "prqlc", "syn 2.0.66", @@ -3039,25 +3039,15 @@ dependencies = [ [[package]] name = "prql-java" -version = "0.12.2" +version = "0.12.3" dependencies = [ "jni", "prqlc", ] -[[package]] -name = "prql-js" -version = "0.12.2" -dependencies = [ - "console_error_panic_hook", - "prqlc", - "wasm-bindgen", - "wasm-bindgen-test", -] - [[package]] name = "prqlc" -version = "0.12.2" +version = "0.12.3" dependencies = [ "anstream", "anyhow", @@ -3114,7 +3104,7 @@ dependencies = [ [[package]] name = "prqlc-ast" -version = "0.12.2" +version = "0.12.3" dependencies = [ "chumsky", "enum-as-inner", @@ -3129,16 +3119,26 @@ dependencies = [ [[package]] name = "prqlc-c" -version = "0.12.2" +version = "0.12.3" dependencies = [ "libc", "prqlc", "serde_json", ] +[[package]] +name = "prqlc-js" +version = "0.12.3" +dependencies = [ + "console_error_panic_hook", + "prqlc", + "wasm-bindgen", + "wasm-bindgen-test", +] + [[package]] name = "prqlc-parser" -version = "0.12.2" +version = "0.12.3" dependencies = [ "chumsky", "insta", @@ -3153,7 +3153,7 @@ dependencies = [ [[package]] name = "prqlc-python" -version = "0.12.2" +version = "0.12.3" dependencies = [ "insta", "prqlc", diff --git a/Cargo.toml b/Cargo.toml index 3c62f280eddd..702a48e35891 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ repository = "https://github.com/PRQL/prql" # This isn't tested since `cargo-msrv` doesn't support workspaces; instead we # test `metadata.msrv` in `prqlc` rust-version = "1.70.0" -version = "0.12.2" +version = "0.12.3" [profile.release] # Optimize for binary size in releases of all crates, diff --git a/README.md b/README.md index 53e3939349c9..c5d2febb6967 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ To stay in touch with PRQL: - [pyprql Docs](https://pyprql.readthedocs.io) — the pyprql documentation, the Python bindings to PRQL, including Jupyter magic. - [PRQL VS Code extension](https://marketplace.visualstudio.com/items?itemName=prql-lang.prql-vscode) -- [prql-js](https://www.npmjs.com/package/prql-js) — JavaScript bindings for +- [prqlc-js](https://www.npmjs.com/package/prqlc) — JavaScript bindings for PRQL. ## Repo organization diff --git a/Taskfile.yml b/Taskfile.yaml similarity index 99% rename from Taskfile.yml rename to Taskfile.yaml index 70f599bff334..a334a151c2c9 100644 --- a/Taskfile.yml +++ b/Taskfile.yaml @@ -384,8 +384,8 @@ tasks: # The next two tasks are not used for either: # - the Dockerfile (installing brew takes forever) # so the Dockerfile simply installs hugo & nodejs directly -# - the "desktop setup" - it uses other tasks in the Taskfile.yml -# They remain in the Taskfile.yml as a hint if they should ever be needed +# - the "desktop setup" - it uses other tasks in the Taskfile.yaml +# They remain in the Taskfile.yaml as a hint if they should ever be needed # install-hugo: # cmds: diff --git a/lutra/Taskfile.yml b/lutra/Taskfile.yaml similarity index 91% rename from lutra/Taskfile.yml rename to lutra/Taskfile.yaml index 8e789ef6d747..80c7e840fbee 100644 --- a/lutra/Taskfile.yml +++ b/lutra/Taskfile.yaml @@ -14,7 +14,9 @@ tasks: - cmd: cargo run --package lutra -- execute example-project fmt: - desc: Format prqlc source files + desc: + Format prqlc source files (Duplicates `pre-commit` checks, but some + developers prefer to use this directly.) cmds: - cmd: | # remove trailing whitespace diff --git a/lutra/bindings/python/Taskfile.yaml b/lutra/bindings/python/Taskfile.yaml index c99fb9a1e063..be2973abd855 100644 --- a/lutra/bindings/python/Taskfile.yaml +++ b/lutra/bindings/python/Taskfile.yaml @@ -5,6 +5,8 @@ vars: venv_dir: "../../../target/venv" tasks: + # (Duplicates `pre-commit` checks, but some developers prefer to use this + # directly.) fmt: desc: "Format" cmds: diff --git a/lutra/lutra/Cargo.toml b/lutra/lutra/Cargo.toml index deeea3ec0ff6..5b4799ed5433 100644 --- a/lutra/lutra/Cargo.toml +++ b/lutra/lutra/Cargo.toml @@ -30,7 +30,7 @@ connector_arrow = {version = "0.4.1", features = ["src_sqlite"]} env_logger = "0.10.2" itertools = {workspace = true} log = {workspace = true} -prqlc = {path = "../../prqlc/prqlc", version = "0.12.2", default-features = false} +prqlc = {path = "../../prqlc/prqlc", version = "0.12.3", default-features = false} rusqlite = {version = "0.31.0", features = ["bundled"]} walkdir = "2.5.0" diff --git a/prqlc/Taskfile.yaml b/prqlc/Taskfile.yaml index 8b286e384629..5b001d36ee16 100644 --- a/prqlc/Taskfile.yaml +++ b/prqlc/Taskfile.yaml @@ -8,13 +8,13 @@ includes: vars: packages_core: -p prqlc-ast -p prqlc-parser -p prqlc packages_addon: -p prql-compiler-macros -p compile-files - packages_bindings: -p prql -p prql-java -p prql-js -p prqlc-c -p prqlc-python + packages_bindings: -p prql -p prql-java -p prqlc-js -p prqlc-c -p prqlc-python tasks: fmt: desc: - Format prqlc source files. Duplicates `pre-commit` checks, but some - developers prefer to use this directly. + Format prqlc source files. (Duplicates `pre-commit` checks, but some + developers prefer to use this directly.) cmds: - cmd: | # remove trailing whitespace diff --git a/prqlc/bindings/elixir/native/prql/Cargo.toml b/prqlc/bindings/elixir/native/prql/Cargo.toml index 368de75d71a6..e1f3965bce39 100644 --- a/prqlc/bindings/elixir/native/prql/Cargo.toml +++ b/prqlc/bindings/elixir/native/prql/Cargo.toml @@ -20,5 +20,5 @@ doc = false # See Readme for details on Mac [target.'cfg(not(any(target_family="wasm", target_os = "macos")))'.dependencies] -prqlc = {path = "../../../../prqlc", default-features = false, version = "0.12.2" } +prqlc = {path = "../../../../prqlc", default-features = false, version = "0.12.3" } rustler = "0.32.1" diff --git a/prqlc/bindings/js/Cargo.toml b/prqlc/bindings/js/Cargo.toml index 99a711e52342..f029fdc7cd7a 100644 --- a/prqlc/bindings/js/Cargo.toml +++ b/prqlc/bindings/js/Cargo.toml @@ -1,6 +1,6 @@ [package] description = "Javascript bindings for prqlc" -name = "prql-js" +name = "prqlc-js" publish = false edition.workspace = true @@ -11,9 +11,9 @@ version.workspace = true [lib] crate-type = ["cdylib", "rlib"] +doc = false doctest = false test = false -doc = false [features] default = ["console_error_panic_hook"] @@ -27,9 +27,9 @@ wasm-bindgen = "0.2.92" # for development, but requires all the `std::fmt` and `std::panicking` # infrastructure, so isn't great for code size when deploying.", on testing with # `--no-default-features`, -# `prql/target/wasm32-unknown-unknown/release/prql_js.wasm` is 7.416MB vs +# `prql/target/wasm32-unknown-unknown/release/prqlc_js.wasm` is 7.416MB vs # 7.408MB. Maybe because we're already including lots of that with other library -# features? Even running `wasm-opt prql_js.wasm` makes similarly sized files of +# features? Even running `wasm-opt prqlc_js.wasm` makes similarly sized files of # 5.7M. Feel free to try removing this as part of reducing code size (would be # good to have a much smaller code size...). console_error_panic_hook = {version = "0.1.7", optional = true} @@ -55,7 +55,7 @@ exactly = 2 file = "package-lock.json" replace = '$1"{{version}}"' search = ''' -(\s+"prql-js", +(\s+"prqlc", \s+"version": )"[\d\.]+"''' [[package.metadata.release.pre-release-replacements]] diff --git a/prqlc/bindings/js/README.md b/prqlc/bindings/js/README.md index 0d77688b7f4e..4a53c01ff462 100644 --- a/prqlc/bindings/js/README.md +++ b/prqlc/bindings/js/README.md @@ -1,11 +1,11 @@ -# prql-js +# prqlc-js JavaScript bindings for [`prqlc`](https://github.com/PRQL/prql/). ## Installation ```sh -npm install prql-js +npm install prqlc ``` ## Usage @@ -29,29 +29,29 @@ function rq_to_sql(rq_json: string): string; Direct usage ```javascript -const prqljs = require("prql-js"); +const prqlc = require("prqlc"); -const sql = prqljs.compile(`from employees | select first_name`); +const sql = prqlc.compile(`from employees | select first_name`); console.log(sql); ``` Options ```javascript -const opts = new prql.CompileOptions(); +const opts = new prqlc.CompileOptions(); opts.target = "sql.mssql"; opts.format = false; opts.signature_comment = false; -const sql = prqljs.compile(`from employees | take 10`, opts); +const sql = prqlc.compile(`from employees | take 10`, opts); console.log(sql); ``` Template literal ```javascript -const prqljs = require("prql-js"); -const prql = (string) => prqljs.compile(string[0] || ""); +const prqlc = require("prqlc"); +const prql = (string) => prqlc.compile(string[0] || ""); const sql = prql`from employees | select first_name`; console.log(sql); @@ -60,8 +60,8 @@ console.log(sql); Template literal with newlines ```javascript -const prqljs = require("prql-js"); -const prql = (string) => prqljs.compile(string[0] || ""); +const prqlc = require("prqlc"); +const prql = (string) => prqlc.compile(string[0] || ""); const sql = prql` from employees @@ -91,7 +91,7 @@ console.log(sql); ### From a framework or a bundler ```typescript -import compile from "prql-js/dist/bundler"; +import compile from "prqlc/dist/bundler"; const sql = compile(`from employees | select first_name`); console.log(sql); @@ -165,7 +165,7 @@ code hasn't changed, which can be slow. For a lower-latency dev loop, pass `--profile=dev` to `npm install` for a faster, less optimized build. ```sh -npm install prql-js --profile=dev +npm install prqlc --profile=dev ``` ## Notes diff --git a/prqlc/bindings/js/package-lock.json b/prqlc/bindings/js/package-lock.json index 09b097e08770..6210489220e4 100644 --- a/prqlc/bindings/js/package-lock.json +++ b/prqlc/bindings/js/package-lock.json @@ -1,12 +1,12 @@ { - "name": "prql-js", - "version": "0.12.2", + "name": "prqlc", + "version": "0.12.3", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "prql-js", - "version": "0.12.2", + "name": "prqlc", + "version": "0.12.3", "license": "Apache-2.0", "devDependencies": { "chai": "^5.0.0", diff --git a/prqlc/bindings/js/package.json b/prqlc/bindings/js/package.json index 875b76639fff..09bfe054a7d2 100644 --- a/prqlc/bindings/js/package.json +++ b/prqlc/bindings/js/package.json @@ -1,5 +1,5 @@ { - "browser": "dist/web/prql_js.js", + "browser": "dist/web/prqlc_js.js", "description": "JavaScript bindings for prqlc", "devDependencies": { "chai": "^5.0.0", @@ -12,15 +12,15 @@ ], "license": "Apache-2.0", "author": "PRQL team", - "main": "dist/node/prql_js.js", - "name": "prql-js", + "main": "dist/node/prqlc_js.js", + "name": "prqlc", "bugs": { "url": "https://github.com/PRQL/prql/issues" }, "homepage": "https://prql-lang.org/", "repository": { "type": "git", - "url": "https://github.com/PRQL/prql", + "url": "git+https://github.com/PRQL/prql.git", "directory": "prqlc/bindings/js" }, "keywords": [ @@ -34,6 +34,6 @@ "prepare": "npm run build", "test": "mocha tests" }, - "types": "dist/node/prql_js.d.ts", - "version": "0.12.2" + "types": "dist/node/prqlc_js.d.ts", + "version": "0.12.3" } diff --git a/prqlc/bindings/js/tests/test_all.mjs b/prqlc/bindings/js/tests/test_all.mjs index 8619dc3648a8..669ccd29ba4f 100644 --- a/prqlc/bindings/js/tests/test_all.mjs +++ b/prqlc/bindings/js/tests/test_all.mjs @@ -1,6 +1,6 @@ import assert from "assert"; import { expect } from "chai"; -import prql from "../dist/node/prql_js.js"; +import prqlc from "../dist/node/prqlc_js.js"; const employee_prql = `from employees join salaries (==emp_no) @@ -24,10 +24,10 @@ join managers=employees (==emp_no) derive mng_name = s"managers.first_name || ' ' || managers.last_name" select {mng_name, managers.gender, salary_avg, salary_sd}`; -describe("prql-js", () => { +describe("prqlc-js", () => { describe("compile", () => { it("should return valid sql from valid prql", () => { - const sql = prql.compile(employee_prql); + const sql = prqlc.compile(employee_prql); assert( sql.trim().toLowerCase().startsWith("with") || sql.trim().toLowerCase().startsWith("select"), @@ -36,17 +36,17 @@ describe("prql-js", () => { it("should throw an error on invalid prql", () => { expect(() => - prql.compile("Mississippi has four Ss and four Is."), + prqlc.compile("Mississippi has four Ss and four Is."), ).to.throw("Error"); }); it("should compile to dialect", () => { - const opts = new prql.CompileOptions(); + const opts = new prqlc.CompileOptions(); opts.target = "sql.mssql"; opts.format = false; opts.signature_comment = false; - const res = prql.compile("from a | take 10", opts); + const res = prqlc.compile("from a | take 10", opts); assert.equal( res, "SELECT * FROM a ORDER BY (SELECT NULL) OFFSET 0 ROWS FETCH FIRST 10 ROWS ONLY", @@ -54,12 +54,12 @@ describe("prql-js", () => { }); it("CompileOptions should be preferred and should ignore target in header", () => { - const opts = new prql.CompileOptions(); + const opts = new prqlc.CompileOptions(); opts.target = "sql.mssql"; opts.format = false; opts.signature_comment = true; - const res = prql.compile( + const res = prqlc.compile( "prql target:sql.sqlite\nfrom a | take 10", opts, ); @@ -74,34 +74,34 @@ describe("prql-js", () => { describe("prql_to_pl", () => { it("should return valid json from valid prql", () => { - JSON.parse(prql.prql_to_pl(employee_prql)); + JSON.parse(prqlc.prql_to_pl(employee_prql)); }); it("should throw an error on invalid prql", () => { - expect(() => prql.prql_to_pl("Answer: T-H-A-T!")).to.throw("Error"); + expect(() => prqlc.prql_to_pl("Answer: T-H-A-T!")).to.throw("Error"); }); }); describe("CompileOptions", () => { it("should be able to create from constructor", () => { - const opts = new prql.CompileOptions(); + const opts = new prqlc.CompileOptions(); opts.target = "sql.sqlite"; assert.equal(opts.target, "sql.sqlite"); }); it("should fallback to the target in header", () => { - const opts = new prql.CompileOptions(); + const opts = new prqlc.CompileOptions(); opts.target = "sql.any"; - const res = prql.compile("prql target:sql.mssql\nfrom a | take 1", opts); + const res = prqlc.compile("prql target:sql.mssql\nfrom a | take 1", opts); assert(res.includes("1 ROWS ONLY")); }); }); describe("get_targets", () => { it("return a list of targets", () => { - const targets = new prql.get_targets(); + const targets = new prqlc.get_targets(); assert(targets.length > 0); assert(targets.includes("sql.sqlite")); }); @@ -110,7 +110,7 @@ describe("prql-js", () => { describe("compile error", () => { it("should contain json", () => { try { - prql.compile("from x | select a | select b"); + prqlc.compile("from x | select a | select b"); } catch (error) { const errorMessages = JSON.parse(error.message).inner; @@ -122,7 +122,7 @@ describe("prql-js", () => { it("should contain error code", () => { try { - prql.compile("let a = (from x)"); + prqlc.compile("let a = (from x)"); } catch (error) { const errorMessages = JSON.parse(error.message).inner; diff --git a/prqlc/prql-compiler-macros/Cargo.toml b/prqlc/prql-compiler-macros/Cargo.toml index 723dec1303e5..6455b405ddf4 100644 --- a/prqlc/prql-compiler-macros/Cargo.toml +++ b/prqlc/prql-compiler-macros/Cargo.toml @@ -14,7 +14,7 @@ proc_macro = true test = false [dependencies] -prqlc = {path = "../prqlc", default-features = false, version = "0.12.2" } +prqlc = {path = "../prqlc", default-features = false, version = "0.12.3" } syn = "2.0.66" [package.metadata.release] diff --git a/prqlc/prql-compiler/Cargo.toml b/prqlc/prql-compiler/Cargo.toml index dd3bd7e021aa..7b03a0c6ed23 100644 --- a/prqlc/prql-compiler/Cargo.toml +++ b/prqlc/prql-compiler/Cargo.toml @@ -14,7 +14,7 @@ version.workspace = true metadata.msrv = "1.70.0" [dependencies] -prqlc = {path = "../prqlc", version = "0.12.2", default-features = false} +prqlc = {path = "../prqlc", version = "0.12.3", default-features = false} [lib] doctest = false diff --git a/prqlc/prqlc-parser/Cargo.toml b/prqlc/prqlc-parser/Cargo.toml index d8c734a536c3..bf3ada2266ce 100644 --- a/prqlc/prqlc-parser/Cargo.toml +++ b/prqlc/prqlc-parser/Cargo.toml @@ -12,7 +12,7 @@ version.workspace = true doctest = false [dependencies] -prqlc-ast = {path = "../prqlc-ast", version = "0.12.2" } +prqlc-ast = {path = "../prqlc-ast", version = "0.12.3" } serde = {workspace = true} serde_yaml = {workspace = true, optional = true} semver = {version = "1.0.23", features = ["serde"]} diff --git a/prqlc/prqlc/Cargo.toml b/prqlc/prqlc/Cargo.toml index 5929c462d2d7..3e2d651ad40e 100644 --- a/prqlc/prqlc/Cargo.toml +++ b/prqlc/prqlc/Cargo.toml @@ -40,8 +40,8 @@ test-dbs = ["anyhow", "duckdb", "glob", "rusqlite", "tokio"] test-dbs-external = ["anyhow", "duckdb", "glob", "mysql", "pg_bigdecimal", "postgres", "rusqlite", "tiberius", "tokio", "tokio-util"] [dependencies] -prqlc-ast = {path = "../prqlc-ast", version = "0.12.2" } -prqlc-parser = {path = "../prqlc-parser", version = "0.12.2" } +prqlc-ast = {path = "../prqlc-ast", version = "0.12.3" } +prqlc-parser = {path = "../prqlc-parser", version = "0.12.3" } anstream = {version = "0.6.14", features = ["auto"]} ariadne = "0.4.1" diff --git a/prqlc/prqlc/README.md b/prqlc/prqlc/README.md index 3203d2fa42e9..3f7b1deafc7c 100644 --- a/prqlc/prqlc/README.md +++ b/prqlc/prqlc/README.md @@ -28,7 +28,7 @@ WHERE has_dog ``` -A PRQL query can be executed with CLI tools compatible with SQL,, such as +A PRQL query can be executed with CLI tools compatible with SQL, such as [DuckDB CLI](https://duckdb.org/docs/api/cli.html). ```sh diff --git a/prqlc/prqlc/src/cli/docs_generator.rs b/prqlc/prqlc/src/cli/docs_generator.rs index 7a6fbeaa1124..db8f6f011a43 100644 --- a/prqlc/prqlc/src/cli/docs_generator.rs +++ b/prqlc/prqlc/src/cli/docs_generator.rs @@ -404,7 +404,7 @@ mod tests { - Generated with [prqlc](https://prql-lang.org/) 0.12.2. + Generated with [prqlc](https://prql-lang.org/) 0.12.3. ----- stderr ----- "###); diff --git a/prqlc/prqlc/tests/integration/sql.rs b/prqlc/prqlc/tests/integration/sql.rs index 02fb126aeda0..6006353b7d10 100644 --- a/prqlc/prqlc/tests/integration/sql.rs +++ b/prqlc/prqlc/tests/integration/sql.rs @@ -4336,7 +4336,7 @@ fn prql_version() { "#).unwrap(),@r###" SELECT *, - '0.12.2' AS y + '0.12.3' AS y FROM x "###); @@ -4348,7 +4348,7 @@ fn shortest_prql_version() { assert_snapshot!(compile(r#"[{version = prql.version}]"#).unwrap(),@r###" WITH table_0 AS ( SELECT - '0.12.2' AS version + '0.12.3' AS version ) SELECT version diff --git a/web/Taskfile.yaml b/web/Taskfile.yaml index 2c857990dbd5..bd3d479253cc 100644 --- a/web/Taskfile.yaml +++ b/web/Taskfile.yaml @@ -42,6 +42,7 @@ tasks: - npm run dev fmt: + # (Duplicates `pre-commit` checks, but some developers prefer to use this directly.) cmds: - cmd: | prettier --write . \ diff --git a/web/book/src/project/bindings/README.md b/web/book/src/project/bindings/README.md index 2bbfc40517ae..2c88e7fae914 100644 --- a/web/book/src/project/bindings/README.md +++ b/web/book/src/project/bindings/README.md @@ -17,7 +17,7 @@ Supported bindings require: [core compile functions](https://docs.rs/prqlc/latest/prqlc/#functions). - Test coverage for these functions. - A published package to the language's standard package repository. -- A script in `Taskfile.yml` to bootstrap a development environment. +- A script in `Taskfile.yaml` to bootstrap a development environment. - Any dev tools, such as a linter & formatter, in pre-commit or MegaLinter. The currently supported bindings are: diff --git a/web/book/src/project/contributing/development.md b/web/book/src/project/contributing/development.md index e271aa46914d..f6b4a8df7c92 100644 --- a/web/book/src/project/contributing/development.md +++ b/web/book/src/project/contributing/development.md @@ -54,7 +54,7 @@ since it relies on `brew`. - [Install Task](https://taskfile.dev/installation/). - Then run the `setup-dev` task. This runs commands from our - [Taskfile.yml](https://github.com/PRQL/prql/blob/main/Taskfile.yml), + [Taskfile.yaml](https://github.com/PRQL/prql/blob/main/Taskfile.yaml), installing dependencies with `cargo`, `brew`, `npm` & `pip`, and suggests some VS Code extensions. @@ -84,8 +84,8 @@ since it relies on `brew`. book, or some release artifacts, we'll need some additional tools. But we won't need those immediately, and the error messages on what's missing should be clear when we attempt those things. When we hit them, the - [Taskfile.yml](https://github.com/PRQL/prql/blob/main/Taskfile.yml) will be a - good source to copy & paste instructions from. + [Taskfile.yaml](https://github.com/PRQL/prql/blob/main/Taskfile.yaml) will be + a good source to copy & paste instructions from. ### Option 3: Use a Dev Container diff --git a/web/book/src/project/target.md b/web/book/src/project/target.md index 20a19c3936a1..e5051e3b7111 100644 --- a/web/book/src/project/target.md +++ b/web/book/src/project/target.md @@ -80,7 +80,7 @@ echo 'prql target:sql.generic PRQL allows specifying a version of the language in the PRQL header, like: ```prql -prql version:"0.12.2" +prql version:"0.12.3" from employees ``` diff --git a/web/book/tests/documentation/snapshots/documentation__book__project__target__version__1.snap b/web/book/tests/documentation/snapshots/documentation__book__project__target__version__1.snap index 8cc3ce78fa59..d7db4cc063b1 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__project__target__version__1.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__project__target__version__1.snap @@ -4,7 +4,7 @@ expression: "[{version = prql.version}]\n" --- WITH table_0 AS ( SELECT - '0.12.2' AS version + '0.12.3' AS version ) SELECT version diff --git a/web/playground/package-lock.json b/web/playground/package-lock.json index 94e3acdd53dd..a957022545d9 100644 --- a/web/playground/package-lock.json +++ b/web/playground/package-lock.json @@ -1,12 +1,12 @@ { "name": "prql-playground", - "version": "0.12.2", + "version": "0.12.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "prql-playground", - "version": "0.12.2", + "version": "0.12.3", "dependencies": { "@duckdb/duckdb-wasm": "^1.28.0", "@monaco-editor/react": "^4.6.0", @@ -14,7 +14,7 @@ "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.5.0", "monaco-editor": "^0.49.0", - "prql-js": "file:../../prqlc/bindings/js", + "prqlc": "file:../../prqlc/bindings/js", "react": "^18.2.0", "react-dom": "^18.3.0", "react-syntax-highlighter": "^15.5.0", @@ -29,8 +29,8 @@ } }, "../../prqlc/bindings/js": { - "name": "prql-js", - "version": "0.12.2", + "name": "prqlc", + "version": "0.12.3", "license": "Apache-2.0", "devDependencies": { "chai": "^5.0.0", @@ -6629,7 +6629,7 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/prql-js": { + "node_modules/prqlc": { "resolved": "../../prqlc/bindings/js", "link": true }, diff --git a/web/playground/package.json b/web/playground/package.json index a18ab2ef1b40..3179485b0f0d 100644 --- a/web/playground/package.json +++ b/web/playground/package.json @@ -18,7 +18,7 @@ "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.5.0", "monaco-editor": "^0.49.0", - "prql-js": "file:../../prqlc/bindings/js", + "prqlc": "file:../../prqlc/bindings/js", "react": "^18.2.0", "react-dom": "^18.3.0", "react-syntax-highlighter": "^15.5.0", @@ -47,5 +47,5 @@ "prepare": "rsync -ai --checksum --delete ../../prqlc/prqlc/tests/integration/data/ public/data/ && node generateBook.cjs", "preview": "vite preview" }, - "version": "0.12.2" + "version": "0.12.3" } diff --git a/web/playground/src/workbench/Workbench.jsx b/web/playground/src/workbench/Workbench.jsx index ca67ad9ab163..9c19389a0e6e 100644 --- a/web/playground/src/workbench/Workbench.jsx +++ b/web/playground/src/workbench/Workbench.jsx @@ -1,6 +1,6 @@ import "./Workbench.css"; -import * as prql from "prql-js/dist/bundler"; +import * as prql from "prqlc/dist/bundler"; import React from "react"; import YAML from "yaml"; diff --git a/web/website/content/_index.md b/web/website/content/_index.md index c9e27d2ec008..c2b221cec2d6 100644 --- a/web/website/content/_index.md +++ b/web/website/content/_index.md @@ -219,8 +219,8 @@ bindings_section: label: "prqlc-python" text: Python bindings for prqlc. - - link: https://www.npmjs.com/package/prql-js - label: "prql-js" + - link: https://www.npmjs.com/package/prqlc + label: "prqlc-js" text: "JavaScript bindings for prqlc." - link: https://CRAN.R-project.org/package=prqlr