diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d980a12..3a2daab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,20 @@ on: [push, pull_request] name: Test jobs: + readme-up-to-date: + name: Check that README.md is up-to-date + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Check that README.md is up-to-date + working-directory: ts-rs + run: | + cargo install cargo-readme + diff -u ../README.md <(cargo readme) + test: name: Test ts-rs runs-on: ubuntu-latest @@ -16,4 +30,4 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test - args: --all-features --manifest-path ts-rs/Cargo.toml + args: --all-features --manifest-path ts-rs/Cargo.toml \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..fce6d7a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# master + +- Remove support for "skip_serializing", "skip_serializing_if" and "skip_deserializing". + - Initially supporting these by skipping a field was a mistake. If a user wishes to skip a field, they can still + annotate it with `#[ts(skip)]` \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f1d62df..485516b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,8 +3,14 @@ If you are unsure what to work on or want to discuss your idea, feel free to ope ### Documentation After implementing a new feature, please document it in the doc comment on `TS` in `ts_rs/lib.rs`. -`README.md` is generated from the module doc comment in `ts_rs/lib.rs`. If you added/updated documentation there, run -`cargo readme > ../README.md` from the `ts-rs/` directory. +`README.md` is generated from the module doc comment in `ts_rs/lib.rs`. If you added/updated documentation there, go to the `ts-rs/` directory and run one of the following commands: + +On Windows: +`cargo readme -o ..\README.md` + +On other systems: +`cargo readme > ../README.md` + You can install `cargo readme` by running `cargo install cargo-readme`. @@ -16,4 +22,4 @@ There is nothing special going on here - just run `cargo build`. To run the test suite, just run `cargo test` in the root directory. ### Formatting -To ensure proper formatting, please run `cargo +nightly fmt`. \ No newline at end of file +To ensure proper formatting, please run `cargo +nightly fmt`. diff --git a/README.md b/README.md index ee26579..03b41ea 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ generate typescript interface/type declarations from rust types