Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI initial concept #304

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4570d9e
CLI initial concept
escritorio-gustavo Apr 9, 2024
7c15180
Add --add-features flag, fix feature! macro and bson-uuid-impl
escritorio-gustavo Apr 9, 2024
1518c18
Remove *-impl features from CLI
escritorio-gustavo Apr 10, 2024
257d04e
Gate test generation behind cargo feature
escritorio-gustavo Apr 10, 2024
27669f1
Update Github action
escritorio-gustavo Apr 10, 2024
ca3eb23
Make the --output-directory flag an Option instead of having a defaul…
escritorio-gustavo Apr 10, 2024
7914bea
Initial draft on generating index.ts
escritorio-gustavo Apr 12, 2024
58df89d
Add missing file
escritorio-gustavo Apr 12, 2024
67f9631
Update Github action
escritorio-gustavo Apr 12, 2024
f092001
Check for empty index and emit codegen warning
escritorio-gustavo Apr 12, 2024
7192a8b
Save relative paths in netadata file
escritorio-gustavo Apr 12, 2024
2b09065
Remove unused import
escritorio-gustavo Apr 12, 2024
d18bf79
Remove unused read file access
escritorio-gustavo Apr 12, 2024
af0d6d3
Add naming collision warning
escritorio-gustavo Apr 12, 2024
41cf034
Add imports
escritorio-gustavo Apr 12, 2024
2ea928f
MAke warnings colorful
escritorio-gustavo Apr 12, 2024
9557f9f
Also highlight type names
escritorio-gustavo Apr 12, 2024
4ec1679
Make type names bold
escritorio-gustavo Apr 12, 2024
9c45249
Remove commented dependency
escritorio-gustavo Apr 12, 2024
98b0c01
Print Rust type name in collision warning
escritorio-gustavo Apr 12, 2024
b80f988
Capture cargo test stderr and stdout
escritorio-gustavo Apr 12, 2024
363f7c8
Refactor CLI code
escritorio-gustavo Apr 12, 2024
7894b4b
Commit untracked files
escritorio-gustavo Apr 12, 2024
65524d5
Export all files, not just the first metadata entry
escritorio-gustavo Apr 12, 2024
7560098
Delete metadata file
escritorio-gustavo Apr 12, 2024
770d6ea
Add metadata file to .gitignore
escritorio-gustavo Apr 12, 2024
e52085c
Enable clippy pedantic and nursery
escritorio-gustavo Apr 12, 2024
275b15d
Merge branch 'main' into cli
escritorio-gustavo Apr 15, 2024
b402bdc
Merge branch 'main' into cli
escritorio-gustavo Apr 15, 2024
b1b5cbe
Clippy warning in test
escritorio-gustavo Apr 17, 2024
6790173
Remove duplicated infer_as test file
escritorio-gustavo Apr 17, 2024
50bfc35
Add error message about naming collisions
escritorio-gustavo Apr 17, 2024
88fc140
Gate metadata file behind feature
escritorio-gustavo Apr 17, 2024
66c94dd
No longer capture stderr as that would silence serde warnings
escritorio-gustavo Apr 17, 2024
1461d3f
Remove changes to infer_as test
escritorio-gustavo Apr 17, 2024
b6c5c65
Make --output-directory required
escritorio-gustavo Apr 17, 2024
c8a6b14
Make casing consistent
escritorio-gustavo Apr 17, 2024
fcaa80f
Merge branch 'main' into cli
escritorio-gustavo Apr 18, 2024
c930c0f
Avoid extra collection allocation
escritorio-gustavo Apr 22, 2024
9b19079
Improve parsing of Metadata
escritorio-gustavo Apr 23, 2024
8ff6688
Replace new with try_from for clarity
escritorio-gustavo Apr 23, 2024
f229f92
Add option to export all types to a single file
escritorio-gustavo May 9, 2024
c9b29aa
Missing imports
escritorio-gustavo May 9, 2024
89430eb
Fix Syntax Error
escritorio-gustavo May 9, 2024
147ea87
Merge branch 'main' into cli
escritorio-gustavo May 20, 2024
00f14af
Merge branch 'main' into cli
gustavo-shigueo Jul 24, 2024
7c9643e
Merge branch 'main' into cli
gustavo-shigueo Aug 1, 2024
5d72d97
Merge branch 'main' into cli
gustavo-shigueo Oct 10, 2024
5abdda9
Fix lockfile
gustavo-shigueo Oct 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
- name: dependencies e2e test
working-directory: e2e/dependencies/consumer
run: |
cargo t
tsc bindings/* --noEmit --noUnusedLocals --strict
cargo t --features ts-rs/export
tsc bindings/*.ts --noEmit --noUnusedLocals --strict
- name: dependencies e2e test with default export env
working-directory: e2e/dependencies/consumer
run: |
TS_RS_EXPORT_DIR=custom-bindings cargo t
TS_RS_EXPORT_DIR=custom-bindings cargo t --features ts-rs/export
shopt -s globstar
tsc custom-bindings/**/*.ts --noEmit --noUnusedLocals --strict
e2e-workspace:
Expand All @@ -37,14 +37,14 @@ jobs:
- name: workspace e2e test
working-directory: e2e/workspace
run: |
cargo t
cargo t --features ts-rs/export
shopt -s globstar
tsc parent/bindings/**/*.ts --noEmit --noUnusedLocals --strict
rm -rf parent/bindings
- name: workspace e2e with default export env
working-directory: e2e/workspace
run: |
TS_RS_EXPORT_DIR=custom-bindings cargo t
TS_RS_EXPORT_DIR=custom-bindings cargo t --features ts-rs/export
shopt -s globstar
tsc parent/custom-bindings/**/*.ts --noEmit --noUnusedLocals --strict
rm -rf parent/custom-bindings
Expand All @@ -62,12 +62,12 @@ jobs:
- name: example e2e test
working-directory: example
run: |
cargo t
tsc bindings/* --noEmit
cargo t --features ts-rs/export
tsc bindings/*.ts --noEmit
- name: example e2e with default export env
working-directory: example
run: |
TS_RS_EXPORT_DIR=custom-bindings cargo t
TS_RS_EXPORT_DIR=custom-bindings cargo t --features ts-rs/export
shopt -s globstar
tsc custom-bindings/**/*.ts --noEmit --noUnusedLocals --strict

Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
run: |
TS_RS_EXPORT_DIR=output cargo test --no-default-features
TS_RS_EXPORT_DIR=output cargo test --no-default-features --features ts-rs/export
shopt -s globstar
tsc ts-rs/output/**/*.ts --noEmit --noUnusedLocals --strict
rm -rf ts-rs/output
Expand All @@ -137,7 +137,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Test
run: |
cargo test --no-default-features
cargo test --no-default-features --features ts-rs/export
shopt -s globstar
tsc ts-rs/bindings/**/*.ts --noEmit --noUnusedLocals
rm -rf ts-rs/bindings
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ target/
*.ts

/ts-rs/tests-out
ts_rs.meta
Loading