From f734f2621fb1c7956ea5472aaf05c6da3b3eec2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20M=C3=BCller?= Date: Tue, 2 Jul 2024 21:09:57 +0200 Subject: [PATCH 1/8] Add 2.0.0 changelog entry --- Changelog.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Changelog.md b/Changelog.md index c6fa396b..9c38e268 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,29 @@ This document maintains a list of major changes to Superstruct with each new release. +### `2.0.0` - July 2, 2024 + +Some changes in Superstruct 2.0.0 are *potentially* breaking if you were using the library in unusual and/or undocumented ways. Since it has been almost 2 years since the last release, we want to make sure that we don't ruin someone's day by surprising them with a fix that changes [buggy behaviour they were relying on](https://xkcd.com/1172/). For this reason, some changes that would ordinarily be consider a fix are marked as breaking. + +**For the absolute majority of users, this should be a smooth upgrade that will not require any changes.** + +#### Breaking + +- Validation now correctly fails when arrays are passed to `object()`, `type()`, and `record()` structs. +- When coercing an `object()` (via `mask()`, `create()` or `validate()` with the `coerce: true` option), arrays will no longer be automatically converted to objects with indexes as keys. [See this PR comment](https://github.com/ianstormtaylor/superstruct/pull/1196#issuecomment-1858924264). + +#### New + +- The library and its TypeScript typings are now compatible with NodeNext/Node16 module resolution. This means that if you are using the library with TypeScript and ECMAScript modules at the same time, you should no longer run into issues! + +### Fixed + +- Using `mask()` with `union()` now correctly masks union members instead of incorrectly failing validation. + +#### Deprecations + +- Use with Node.js v14 is now deprecated. Due to incompatible tooling, we are no longer able to test Superstruct on this version of Node.js. Use at your own risk. + ### `1.0.0` — November 17, 2022 ###### NEW From 338baa043a0ced9e22d3736384350a486a6f533e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20M=C3=BCller?= Date: Tue, 2 Jul 2024 22:01:00 +0200 Subject: [PATCH 2/8] Add new maintainers section to backlog --- Changelog.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 9c38e268..6f206180 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,7 +6,7 @@ This document maintains a list of major changes to Superstruct with each new rel Some changes in Superstruct 2.0.0 are *potentially* breaking if you were using the library in unusual and/or undocumented ways. Since it has been almost 2 years since the last release, we want to make sure that we don't ruin someone's day by surprising them with a fix that changes [buggy behaviour they were relying on](https://xkcd.com/1172/). For this reason, some changes that would ordinarily be consider a fix are marked as breaking. -**For the absolute majority of users, this should be a smooth upgrade that will not require any changes.** +**:rocket: For the absolute majority of users, this should be a smooth upgrade that will not require any changes.** #### Breaking @@ -25,6 +25,17 @@ Some changes in Superstruct 2.0.0 are *potentially* breaking if you were using t - Use with Node.js v14 is now deprecated. Due to incompatible tooling, we are no longer able to test Superstruct on this version of Node.js. Use at your own risk. +#### New Maintainers & Next Steps + +Project maintenance has moved to a new volunteer team: @arturmuller and @yeoffrey. Hello there! :wave: We are currently going through the existing issues and PRs, trying to resolve or close the backlog. This might take a little while so please bear with us. + +If are interested in **contributing** — or helping us process the backlog — we would love your help. Don't hesitate to help us triage, open an issue, or submit a PR. You can also join our Superstruct maintainers Discord: https://discord.gg/pdHrQBjQ96 + +If you have **questions, suggestions, or are just not sure about something** related to Superstruct, head over to GitHub Discussions! We have recently enabled this feature so help us differentiate between actual issues/bugs and everything else. We hope this will be a great new place where SUperstruct users can get quick help from us — the maintainers — but also from the community as a whole. + +See you at the next release! :v: + + ### `1.0.0` — November 17, 2022 ###### NEW From 00a29a45570f450c360d84133940fe029790d153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20M=C3=BCller?= Date: Tue, 2 Jul 2024 22:01:58 +0200 Subject: [PATCH 3/8] Lower Node engine back down --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7bf3023f..78a4cdd4 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "registry": "https://registry.npmjs.org" }, "engines": { - "node": ">=18.0.0" + "node": ">=14.0.0" }, "devDependencies": { "@babel/cli": "^7.6.3", From 0799913114bf28534777ac9498aaec48289a8516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20M=C3=BCller?= Date: Tue, 2 Jul 2024 22:02:42 +0200 Subject: [PATCH 4/8] Add Node 16 to back CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1abb4e5a..473cb0c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x, 20.x, 22.x] + node-version: [16.x, 18.x, 20.x, 22.x] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 From 637d8582e01ba67797ccdf0044a9a4f728ebf8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20M=C3=BCller?= Date: Tue, 2 Jul 2024 22:06:12 +0200 Subject: [PATCH 5/8] Add links, fix typos --- Changelog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 6f206180..8ac76ddc 100644 --- a/Changelog.md +++ b/Changelog.md @@ -27,11 +27,11 @@ Some changes in Superstruct 2.0.0 are *potentially* breaking if you were using t #### New Maintainers & Next Steps -Project maintenance has moved to a new volunteer team: @arturmuller and @yeoffrey. Hello there! :wave: We are currently going through the existing issues and PRs, trying to resolve or close the backlog. This might take a little while so please bear with us. +Project maintenance has moved to a new volunteer team: [@arturmuller](https://github.com/arturmuller) and [@yeoffrey](https://github.com/yeoffrey). Hello there! :wave: We are currently going through the existing issues and PRs, trying to resolve or close the backlog. This might take a little while so please bear with us. If are interested in **contributing** — or helping us process the backlog — we would love your help. Don't hesitate to help us triage, open an issue, or submit a PR. You can also join our Superstruct maintainers Discord: https://discord.gg/pdHrQBjQ96 -If you have **questions, suggestions, or are just not sure about something** related to Superstruct, head over to GitHub Discussions! We have recently enabled this feature so help us differentiate between actual issues/bugs and everything else. We hope this will be a great new place where SUperstruct users can get quick help from us — the maintainers — but also from the community as a whole. +If you have **questions, suggestions, or are just not sure about something** related to Superstruct, head over to GitHub Discussions! We have recently enabled this feature so help us differentiate between actual issues/bugs and everything else. We hope this will be a great new place where Superstruct users can get quick help from us — the maintainers — but also from the community as a whole. See you at the next release! :v: From 5879bdbd74ea554dfce0eae7a33080ae47e843b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20M=C3=BCller?= Date: Tue, 2 Jul 2024 22:14:45 +0200 Subject: [PATCH 6/8] Fixup heading level --- Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 8ac76ddc..96258495 100644 --- a/Changelog.md +++ b/Changelog.md @@ -17,7 +17,7 @@ Some changes in Superstruct 2.0.0 are *potentially* breaking if you were using t - The library and its TypeScript typings are now compatible with NodeNext/Node16 module resolution. This means that if you are using the library with TypeScript and ECMAScript modules at the same time, you should no longer run into issues! -### Fixed +#### Fixed - Using `mask()` with `union()` now correctly masks union members instead of incorrectly failing validation. From 6b6453f7de49c8121b84daa20d14be8f074f44d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20M=C3=BCller?= Date: Wed, 3 Jul 2024 00:18:31 +0200 Subject: [PATCH 7/8] Fix typos --- Changelog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 96258495..633c1286 100644 --- a/Changelog.md +++ b/Changelog.md @@ -29,9 +29,9 @@ Some changes in Superstruct 2.0.0 are *potentially* breaking if you were using t Project maintenance has moved to a new volunteer team: [@arturmuller](https://github.com/arturmuller) and [@yeoffrey](https://github.com/yeoffrey). Hello there! :wave: We are currently going through the existing issues and PRs, trying to resolve or close the backlog. This might take a little while so please bear with us. -If are interested in **contributing** — or helping us process the backlog — we would love your help. Don't hesitate to help us triage, open an issue, or submit a PR. You can also join our Superstruct maintainers Discord: https://discord.gg/pdHrQBjQ96 +If you are interested in **contributing** — or helping us process the backlog — we would love your help. Don't hesitate to help us triage, open an issue, or submit a PR. You can also join our Superstruct maintainers Discord: https://discord.gg/pdHrQBjQ96 -If you have **questions, suggestions, or are just not sure about something** related to Superstruct, head over to GitHub Discussions! We have recently enabled this feature so help us differentiate between actual issues/bugs and everything else. We hope this will be a great new place where Superstruct users can get quick help from us — the maintainers — but also from the community as a whole. +If you have **questions, suggestions, or are just not sure about something** related to Superstruct, head over to GitHub Discussions! We have recently enabled this feature to help us differentiate between actual issues/bugs and everything else. We hope this will be a great new place where Superstruct users can get quick help from us — the maintainers — but also from the community as a whole. See you at the next release! :v: From 2964a987bad2b7b79725a84caaaceec9cd16789d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20M=C3=BCller?= Date: Wed, 3 Jul 2024 22:22:38 +0200 Subject: [PATCH 8/8] Changelog edits --- Changelog.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Changelog.md b/Changelog.md index 633c1286..4955bfa1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,9 +2,9 @@ This document maintains a list of major changes to Superstruct with each new release. -### `2.0.0` - July 2, 2024 +### `2.0.0` - July 3, 2024 -Some changes in Superstruct 2.0.0 are *potentially* breaking if you were using the library in unusual and/or undocumented ways. Since it has been almost 2 years since the last release, we want to make sure that we don't ruin someone's day by surprising them with a fix that changes [buggy behaviour they were relying on](https://xkcd.com/1172/). For this reason, some changes that would ordinarily be consider a fix are marked as breaking. +Some changes in Superstruct v2.0 are _potentially_ breaking if you were using the library in unusual and/or undocumented ways. Since it has been almost 2 years since the last significant release, we want to make sure that we don't ruin someone's day by surprising them with a fix that changes [buggy behavior they were relying on](https://xkcd.com/1172/). For this reason, some changes that would ordinarily be considered a fix are marked as breaking. **:rocket: For the absolute majority of users, this should be a smooth upgrade that will not require any changes.** @@ -29,13 +29,12 @@ Some changes in Superstruct 2.0.0 are *potentially* breaking if you were using t Project maintenance has moved to a new volunteer team: [@arturmuller](https://github.com/arturmuller) and [@yeoffrey](https://github.com/yeoffrey). Hello there! :wave: We are currently going through the existing issues and PRs, trying to resolve or close the backlog. This might take a little while so please bear with us. -If you are interested in **contributing** — or helping us process the backlog — we would love your help. Don't hesitate to help us triage, open an issue, or submit a PR. You can also join our Superstruct maintainers Discord: https://discord.gg/pdHrQBjQ96 +If you are interested in **contributing** — or helping us process the backlog — we would love your help. Don't hesitate to help us triage, open an issue, or submit a PR. You can also join our Superstruct maintainers Discord: https://discord.gg/pdHrQBjQ96. If you have **questions, suggestions, or are just not sure about something** related to Superstruct, head over to GitHub Discussions! We have recently enabled this feature to help us differentiate between actual issues/bugs and everything else. We hope this will be a great new place where Superstruct users can get quick help from us — the maintainers — but also from the community as a whole. See you at the next release! :v: - ### `1.0.0` — November 17, 2022 ###### NEW