Skip to content

Commit 6a1fdc7

Browse files
chore: rename pglt in packages/ (#241)
* chore: rename pglt in packages/ * rename methods, run formatter * chore: rename pglt in workflows (#242) * chore: rename pglt in workflows rename * chore: rename pglt_cli and binary (#243) * chore: rename pglt_cli and binary * docs * format * ok
1 parent 7266ef8 commit 6a1fdc7

Some content is hidden

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

52 files changed

+275
-287
lines changed

.github/workflows/publish.reusable.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Generate Packages
3131
id: generate-packages
32-
run: node packages/@pglt/pglt/scripts/generate-packages.mjs
32+
run: node packages/@postgrestools/postgrestools/scripts/generate-packages.mjs
3333
env:
3434
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3535
RELEASE_TAG: ${{ inputs.release-tag }}
@@ -46,12 +46,12 @@ jobs:
4646
4747
- name: Print package.json
4848
run: |
49-
cat packages/@pglt/pglt/package.json
49+
cat packages/@postgrestools/postgrestools/package.json
5050
5151
- name: Publish npm packages as nightly
5252
if: inputs.is-prerelease == 'true'
5353
run: |
54-
for package in packages/@pglt/*; do
54+
for package in packages/@postgrestools/*; do
5555
npm publish "$package" --tag nightly --access public --provenance
5656
done
5757
env:
@@ -60,7 +60,7 @@ jobs:
6060
- name: Publish npm packages as latest
6161
if: inputs.is-prerelease != 'true'
6262
run: |
63-
for package in packages/@pglt/*; do
63+
for package in packages/@postgrestools/*; do
6464
npm publish "$package" --tag latest --access public --provenance
6565
done
6666
env:

.github/workflows/pull_request.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,16 @@ jobs:
153153
- name: Install toolchain
154154
uses: moonrepo/setup-rust@v1
155155
- name: Build main binary
156-
run: cargo build -p pglt_cli --release
156+
run: cargo build -p pgt_cli --release
157157
- name: Setup Bun
158158
uses: oven-sh/setup-bun@v2
159159
- name: Install JS dependencies
160160
run: bun install
161161
- name: Build TypeScript code
162-
working-directory: packages/@pglt/backend-jsonrpc
162+
working-directory: packages/@postgrestools/backend-jsonrpc
163163
run: bun run build
164164
- name: Run JS tests
165-
working-directory: packages/@pglt/backend-jsonrpc
165+
working-directory: packages/@postgrestools/backend-jsonrpc
166166
run: bun run test
167167

168168
codegen:

.github/workflows/release.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,28 @@ jobs:
6161
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
6262

6363
- name: 🛠️ Run Build
64-
run: cargo build -p pglt_cli --release --target ${{ matrix.config.target }}
64+
run: cargo build -p pgt_cli --release --target ${{ matrix.config.target }}
6565

6666
# windows is a special snowflake too, it saves binaries as .exe
6767
- name: 👦 Name the Binary
6868
if: matrix.config.os == 'windows-latest'
6969
run: |
7070
mkdir dist
71-
cp target/${{ matrix.config.target }}/release/pglt.exe ./dist/pglt_${{ matrix.config.target }}
71+
cp target/${{ matrix.config.target }}/release/postgrestools.exe ./dist/postgrestools_${{ matrix.config.target }}
7272
- name: 👦 Name the Binary
7373
if: matrix.config.os != 'windows-latest'
7474
run: |
7575
mkdir dist
76-
cp target/${{ matrix.config.target }}/release/pglt ./dist/pglt_${{ matrix.config.target }}
76+
cp target/${{ matrix.config.target }}/release/postgrestools ./dist/postgrestools_${{ matrix.config.target }}
7777
7878
# It is not possible to return the artifacts from the matrix jobs individually: Matrix outputs overwrite each other.
7979
# A common workaround is to upload and download the resulting artifacts.
8080
- name: 👆 Upload Artifacts
8181
id: upload-artifacts
8282
uses: actions/upload-artifact@v4
8383
with:
84-
name: pglt_${{ matrix.config.target }}
85-
path: ./dist/pglt_*
84+
name: postgrestools_${{ matrix.config.target }}
85+
path: ./dist/postgrestools_*
8686
# The default compression level is 6; this took the binary down from 350 to 330MB.
8787
# It is recommended to use a lower level for binaries, since the compressed result is not much smaller,
8888
# and the higher levels of compression take much longer.
@@ -113,7 +113,7 @@ jobs:
113113
id: download
114114
with:
115115
merge-multiple: true
116-
pattern: pglt_*
116+
pattern: postgrestools_*
117117

118118
- name: 📂 Create Release
119119
uses: softprops/action-gh-release@v2
@@ -125,7 +125,7 @@ jobs:
125125
body: ${{ steps.create_changelog.outputs.content }}
126126
tag_name: ${{ steps.create_changelog.outputs.version }}
127127
files: |
128-
pglt_*
128+
postgrestools_*
129129
docs/schemas/latest/schema.json
130130
fail_on_unmatched_files: true
131131
draft: true

Cargo.lock

+37-37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ unicode-width = "0.1.12"
5454
pglt_analyse = { path = "./crates/pglt_analyse", version = "0.0.0" }
5555
pglt_analyser = { path = "./crates/pglt_analyser", version = "0.0.0" }
5656
pglt_base_db = { path = "./crates/pglt_base_db", version = "0.0.0" }
57-
pglt_cli = { path = "./crates/pglt_cli", version = "0.0.0" }
5857
pglt_commands = { path = "./crates/pglt_commands", version = "0.0.0" }
5958
pglt_completions = { path = "./crates/pglt_completions", version = "0.0.0" }
6059
pglt_configuration = { path = "./crates/pglt_configuration", version = "0.0.0" }
@@ -81,6 +80,7 @@ pglt_treesitter_queries = { path = "./crates/pglt_treesitter_queries", versi
8180
pglt_type_resolver = { path = "./crates/pglt_type_resolver", version = "0.0.0" }
8281
pglt_typecheck = { path = "./crates/pglt_typecheck", version = "0.0.0" }
8382
pglt_workspace = { path = "./crates/pglt_workspace", version = "0.0.0" }
83+
pgt_cli = { path = "./crates/pgt_cli", version = "0.0.0" }
8484

8585
pglt_test_macros = { path = "./crates/pglt_test_macros" }
8686
pglt_test_utils = { path = "./crates/pglt_test_utils" }

bun.lock

+19-21
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,29 @@
1111
"typescript": "^5",
1212
},
1313
},
14-
"packages/@pglt/backend-jsonrpc": {
15-
"name": "@pglt/backend-jsonrpc",
14+
"packages/@postgrestools/backend-jsonrpc": {
15+
"name": "@postgrestools/backend-jsonrpc",
1616
"optionalDependencies": {
17-
"@pglt/cli-darwin-arm64": "<placeholder>",
18-
"@pglt/cli-darwin-x64": "<placeholder>",
19-
"@pglt/cli-linux-arm64": "<placeholder>",
20-
"@pglt/cli-linux-arm64-musl": "<placeholder>",
21-
"@pglt/cli-linux-x64": "<placeholder>",
22-
"@pglt/cli-linux-x64-musl": "<placeholder>",
23-
"@pglt/cli-win32-arm64": "<placeholder>",
24-
"@pglt/cli-win32-x64": "<placeholder>",
17+
"@postgrestools/cli-darwin-arm64": "<placeholder>",
18+
"@postgrestools/cli-darwin-x64": "<placeholder>",
19+
"@postgrestools/cli-linux-arm64": "<placeholder>",
20+
"@postgrestools/cli-linux-x64": "<placeholder>",
21+
"@postgrestools/cli-win32-arm64": "<placeholder>",
22+
"@postgrestools/cli-win32-x64": "<placeholder>",
2523
},
2624
},
27-
"packages/@pglt/pglt": {
28-
"name": "pglt",
25+
"packages/@postgrestools/postgrestools": {
26+
"name": "postgrestools",
2927
"bin": {
30-
"pglt": "bin/pglt",
28+
"postgrestools": "bin/postgrestools",
3129
},
3230
"optionalDependencies": {
33-
"pglt-aarch64-apple-darwin": "<placeholder>",
34-
"pglt-aarch64-linux-gnu": "<placeholder>",
35-
"pglt-aarch64-windows-msvc": "<placeholder>",
36-
"pglt-x86_64-apple-darwin": "<placeholder>",
37-
"pglt-x86_64-linux-gnu": "<placeholder>",
38-
"pglt-x86_64-windows-msvc": "<placeholder>",
31+
"postgrestools-aarch64-apple-darwin": "<placeholder>",
32+
"postgrestools-aarch64-linux-gnu": "<placeholder>",
33+
"postgrestools-aarch64-windows-msvc": "<placeholder>",
34+
"postgrestools-x86_64-apple-darwin": "<placeholder>",
35+
"postgrestools-x86_64-linux-gnu": "<placeholder>",
36+
"postgrestools-x86_64-windows-msvc": "<placeholder>",
3937
},
4038
},
4139
},
@@ -58,7 +56,7 @@
5856

5957
"@biomejs/cli-win32-x64": ["@biomejs/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA=="],
6058

61-
"@pglt/backend-jsonrpc": ["@pglt/backend-jsonrpc@workspace:packages/@pglt/backend-jsonrpc"],
59+
"@postgrestools/backend-jsonrpc": ["@postgrestools/backend-jsonrpc@workspace:packages/@postgrestools/backend-jsonrpc"],
6260

6361
"@types/bun": ["@types/[email protected]", "", { "dependencies": { "bun-types": "1.2.5" } }, "sha512-w2OZTzrZTVtbnJew1pdFmgV99H0/L+Pvw+z1P67HaR18MHOzYnTYOi6qzErhK8HyT+DB782ADVPPE92Xu2/Opg=="],
6462

@@ -68,7 +66,7 @@
6866

6967
"bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-3oO6LVGGRRKI4kHINx5PIdIgnLRb7l/SprhzqXapmoYkFl5m4j6EvALvbDVuuBFaamB46Ap6HCUxIXNLCGy+tg=="],
7068

71-
"pglt": ["pglt@workspace:packages/@pglt/pglt"],
69+
"postgrestools": ["postgrestools@workspace:packages/@postgrestools/postgrestools"],
7270

7371
"typescript": ["[email protected]", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="],
7472

crates/pglt_cli/Cargo.toml renamed to crates/pgt_cli/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition.workspace = true
66
homepage.workspace = true
77
keywords.workspace = true
88
license.workspace = true
9-
name = "pglt_cli"
9+
name = "pgt_cli"
1010
repository.workspace = true
1111
version = "0.0.0"
1212

@@ -56,5 +56,5 @@ tikv-jemallocator = "0.6.0"
5656
doctest = false
5757

5858
[[bin]]
59-
name = "pglt"
59+
name = "postgrestools"
6060
path = "src/main.rs"
File renamed without changes.

crates/pglt_cli/src/commands/mod.rs renamed to crates/pgt_cli/src/commands/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub enum PgltCommand {
4343
///
4444
/// The file doesn't need to exist on disk, what matters is the extension of the file. Based on the extension, we know how to check the code.
4545
///
46-
/// Example: `echo 'let a;' | pglt_cli check --stdin-file-path=test.sql`
46+
/// Example: `echo 'let a;' | pgt_cli check --stdin-file-path=test.sql`
4747
#[bpaf(long("stdin-file-path"), argument("PATH"), hide_usage)]
4848
stdin_file_path: Option<String>,
4949

File renamed without changes.
File renamed without changes.

crates/pglt_cli/src/main.rs renamed to crates/pgt_cli/src/main.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//! This is the main binary
22
3-
use pglt_cli::{
4-
CliDiagnostic, CliSession, PgltCommand, open_transport, pglt_command, setup_panic_handler,
5-
to_color_mode,
6-
};
73
use pglt_console::{ConsoleExt, EnvConsole, markup};
84
use pglt_diagnostics::{Diagnostic, PrintDiagnostic, set_bottom_frame};
95
use pglt_workspace::workspace;
6+
use pgt_cli::{
7+
CliDiagnostic, CliSession, PgltCommand, open_transport, pglt_command, setup_panic_handler,
8+
to_color_mode,
9+
};
1010
use std::process::{ExitCode, Termination};
1111
use tokio::runtime::Runtime;
1212

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)