From aaaea00fc8f721c81462d03b0ad61cc5f20f9508 Mon Sep 17 00:00:00 2001 From: Eric Cornelissen Date: Thu, 7 Sep 2023 15:25:50 +0200 Subject: [PATCH 1/4] Initialize v1 maintenance branch --- .github/workflows/audit-dev.yml | 1 + .github/workflows/checks.yml | 1 + .github/workflows/config-codecov.yml | 1 + .github/workflows/config-npm.yml | 1 + .github/workflows/fuzz-bash.yml | 3 ++- .github/workflows/fuzz-cmd.yml | 3 ++- .github/workflows/fuzz-csh.yml | 3 ++- .github/workflows/fuzz-dash.yml | 3 ++- .github/workflows/fuzz-no-shell.yml | 5 +++-- .github/workflows/fuzz-powershell.yml | 3 ++- .github/workflows/fuzz-zsh.yml | 3 ++- .github/workflows/publish.yml | 1 + .github/workflows/secrets.yml | 1 + .github/workflows/semgrep.yml | 1 + CONTRIBUTING.md | 9 +++++++-- README.md | 8 ++++---- RELEASE.md | 18 +++++++++--------- SECURITY.md | 2 +- 18 files changed, 43 insertions(+), 24 deletions(-) diff --git a/.github/workflows/audit-dev.yml b/.github/workflows/audit-dev.yml index 43bb00fb0..60ea10447 100644 --- a/.github/workflows/audit-dev.yml +++ b/.github/workflows/audit-dev.yml @@ -7,6 +7,7 @@ on: push: branches: - main + - main-v1 schedule: - cron: "0 3 * * *" workflow_dispatch: ~ diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 3c8bdf379..303f9c72e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - main-v1 permissions: read-all diff --git a/.github/workflows/config-codecov.yml b/.github/workflows/config-codecov.yml index b1157951a..9ab3fe9d4 100644 --- a/.github/workflows/config-codecov.yml +++ b/.github/workflows/config-codecov.yml @@ -7,6 +7,7 @@ on: push: branches: - main + - main-v1 paths: - .github/workflows/config-codecov.yml - .github/codecov.yml diff --git a/.github/workflows/config-npm.yml b/.github/workflows/config-npm.yml index af2b39915..fc6f4870a 100644 --- a/.github/workflows/config-npm.yml +++ b/.github/workflows/config-npm.yml @@ -7,6 +7,7 @@ on: push: branches: - main + - main-v1 paths: - .github/workflows/config-npm.yml - package.json diff --git a/.github/workflows/fuzz-bash.yml b/.github/workflows/fuzz-bash.yml index 6e8043504..3ea9a3521 100644 --- a/.github/workflows/fuzz-bash.yml +++ b/.github/workflows/fuzz-bash.yml @@ -14,6 +14,7 @@ on: - test/fuzz/** branches: - main + - main-v1 schedule: - cron: "0 2 * * *" workflow_dispatch: ~ @@ -23,7 +24,7 @@ permissions: read-all jobs: fuzz: name: Fuzz - uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main + uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main-v1 with: duration: 600 # seconds == 10 minutes os: ubuntu-22.04 diff --git a/.github/workflows/fuzz-cmd.yml b/.github/workflows/fuzz-cmd.yml index 86076f427..e539d4907 100644 --- a/.github/workflows/fuzz-cmd.yml +++ b/.github/workflows/fuzz-cmd.yml @@ -14,6 +14,7 @@ on: - test/fuzz/** branches: - main + - main-v1 schedule: - cron: "5 2 * * *" workflow_dispatch: ~ @@ -23,7 +24,7 @@ permissions: read-all jobs: fuzz: name: Fuzz - uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main + uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main-v1 with: duration: 600 # seconds == 10 minutes os: windows-2022 diff --git a/.github/workflows/fuzz-csh.yml b/.github/workflows/fuzz-csh.yml index f5ce9a4cf..3ffe47571 100644 --- a/.github/workflows/fuzz-csh.yml +++ b/.github/workflows/fuzz-csh.yml @@ -14,6 +14,7 @@ on: - test/fuzz/** branches: - main + - main-v1 schedule: - cron: "10 2 * * *" workflow_dispatch: ~ @@ -23,7 +24,7 @@ permissions: read-all jobs: fuzz: name: Fuzz - uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main + uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main-v1 with: duration: 600 # seconds == 10 minutes os: ubuntu-22.04 diff --git a/.github/workflows/fuzz-dash.yml b/.github/workflows/fuzz-dash.yml index 03820155d..cbdfd0e69 100644 --- a/.github/workflows/fuzz-dash.yml +++ b/.github/workflows/fuzz-dash.yml @@ -14,6 +14,7 @@ on: - test/fuzz/** branches: - main + - main-v1 schedule: - cron: "15 2 * * *" workflow_dispatch: ~ @@ -23,7 +24,7 @@ permissions: read-all jobs: fuzz: name: Fuzz - uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main + uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main-v1 with: duration: 600 # seconds == 10 minutes os: ubuntu-22.04 diff --git a/.github/workflows/fuzz-no-shell.yml b/.github/workflows/fuzz-no-shell.yml index 0e1f051c0..836eeb280 100644 --- a/.github/workflows/fuzz-no-shell.yml +++ b/.github/workflows/fuzz-no-shell.yml @@ -16,6 +16,7 @@ on: - test/fuzz/** branches: - main + - main-v1 schedule: - cron: "25 2 * * *" workflow_dispatch: ~ @@ -25,7 +26,7 @@ permissions: read-all jobs: fuzz-unix: name: Fuzz Unix - uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main + uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main-v1 with: duration: 600 # seconds == 10 minutes os: ubuntu-22.04 @@ -33,7 +34,7 @@ jobs: targets: '["exec", "exec-file", "fork", "spawn"]' fuzz-windows: name: Fuzz Windows - uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main + uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main-v1 with: duration: 600 # seconds == 10 minutes os: windows-2022 diff --git a/.github/workflows/fuzz-powershell.yml b/.github/workflows/fuzz-powershell.yml index 0fcd657c8..a58e92048 100644 --- a/.github/workflows/fuzz-powershell.yml +++ b/.github/workflows/fuzz-powershell.yml @@ -14,6 +14,7 @@ on: - test/fuzz/** branches: - main + - main-v1 schedule: - cron: "20 2 * * *" workflow_dispatch: ~ @@ -23,7 +24,7 @@ permissions: read-all jobs: fuzz: name: Fuzz - uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main + uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main-v1 with: duration: 600 # seconds == 10 minutes os: windows-2022 diff --git a/.github/workflows/fuzz-zsh.yml b/.github/workflows/fuzz-zsh.yml index aca12d4f7..ea51380e5 100644 --- a/.github/workflows/fuzz-zsh.yml +++ b/.github/workflows/fuzz-zsh.yml @@ -14,6 +14,7 @@ on: - test/fuzz/** branches: - main + - main-v1 schedule: - cron: "30 2 * * *" workflow_dispatch: ~ @@ -23,7 +24,7 @@ permissions: read-all jobs: fuzz: name: Fuzz - uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main + uses: ericcornelissen/shescape/.github/workflows/reusable-fuzz.yml@main-v1 with: duration: 600 # seconds == 10 minutes os: ubuntu-22.04 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3f1cfddbe..9464bdd10 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,6 +3,7 @@ on: push: branches: - main + - main-v1 permissions: read-all diff --git a/.github/workflows/secrets.yml b/.github/workflows/secrets.yml index 688dbeb06..3c304ccdc 100644 --- a/.github/workflows/secrets.yml +++ b/.github/workflows/secrets.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - main-v1 schedule: - cron: "0 3 * * *" workflow_dispatch: ~ diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 6e69a93c0..f549890be 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -3,6 +3,7 @@ on: push: branches: - main + - main-v1 permissions: read-all diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0ce4315fd..7ff186238 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,9 @@ # Contributing Guidelines +> **Note** This document covers contributing to v1 of this project. If you want +> to make a contribution to the latest version of the project check out the +> [Contributing Guidelines on `main`]. + The _Shescape_ project welcomes contributions and corrections of all forms. This includes improvements to the documentation or code base, new tests, bug fixes, and implementations of new features. We recommend you open an issue before @@ -105,10 +109,10 @@ To be able to contribute you need the following tooling: If you decide to make a contribution, please do use the following workflow: - Fork the repository. -- Create a new branch from the latest `main`. +- Create a new branch from the latest `main-v1`. - Make your changes on the new branch. - Commit to the new branch and push the commit(s). -- Open a Pull Request against `main`. +- Open a Pull Request against `main-v1`. ### Development Details @@ -593,6 +597,7 @@ const john = "John Doe"; [assert package]: https://nodejs.org/api/assert.html [ava]: https://github.com/avajs/ava [cc by-sa 4.0]: https://creativecommons.org/licenses/by-sa/4.0/ +[contributing Guidelines on `main`]: https://github.com/ericcornelissen/shescape/blob/main/CONTRIBUTING.md [bug report]: https://github.com/ericcornelissen/shescape/issues/new?labels=bug&template=bug_report.md [editorconfig]: https://editorconfig.org/ [eslint]: https://eslint.org/ diff --git a/README.md b/README.md index 324c5c410..ffe504158 100644 --- a/README.md +++ b/README.md @@ -75,22 +75,22 @@ code snippets under the [MIT license]. [ci-url]: https://github.com/ericcornelissen/shescape/actions/workflows/checks.yml [ci-image]: https://github.com/ericcornelissen/shescape/actions/workflows/checks.yml/badge.svg [coverage-url]: https://codecov.io/gh/ericcornelissen/shescape -[coverage-image]: https://codecov.io/gh/ericcornelissen/shescape/branch/main/graph/badge.svg +[coverage-image]: https://codecov.io/gh/ericcornelissen/shescape/branch/main-v1/graph/badge.svg [npm-url]: https://www.npmjs.com/package/shescape [npm-image]: https://img.shields.io/npm/v/shescape.svg [an issue]: https://github.com/ericcornelissen/shescape/issues [api]: docs/api.md [bash]: https://en.wikipedia.org/wiki/Bash_(Unix_shell) "Bourne-Again Shell" [cc by-sa 4.0]: https://creativecommons.org/licenses/by-sa/4.0/ -[changelog]: https://github.com/ericcornelissen/shescape/blob/main/CHANGELOG.md +[changelog]: https://github.com/ericcornelissen/shescape/blob/main-v1/CHANGELOG.md [cmd.exe]: https://en.wikipedia.org/wiki/Cmd.exe [csh]: https://en.wikipedia.org/wiki/C_shell [dash]: https://en.wikipedia.org/wiki/Almquist_shell#Dash "Debian Almquist Shell" -[license]: ./LICENSE +[license]: https://github.com/ericcornelissen/shescape/blob/main-v1/LICENSE [mit license]: https://opensource.org/license/mit/ [powershell]: https://en.wikipedia.org/wiki/PowerShell [recipes]: docs/recipes.md -[security]: https://github.com/ericcornelissen/shescape/blob/main/SECURITY.md +[security]: https://github.com/ericcornelissen/shescape/blob/main-v1/SECURITY.md [shell injection]: https://portswigger.net/web-security/os-command-injection [source code]: https://github.com/ericcornelissen/shescape [testing]: docs/testing.md diff --git a/RELEASE.md b/RELEASE.md index fe1baab60..d45e9a8cb 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -10,7 +10,7 @@ in this document. To release a new version follow these steps: -1. [Manually trigger] the [release workflow] from the `main` branch; Use an +1. [Manually trigger] the [release workflow] from the `main-v1` branch; Use an update type in accordance with [Semantic Versioning]. This will create a Pull Request that start the release process. 1. Follow the instructions in the description of the created Pull Request. @@ -24,8 +24,8 @@ version (using `v1.6.2` as an example): 1. Make sure that your local copy of the repository is up-to-date, sync: ```shell - git checkout main - git pull origin main + git checkout main-v1 + git pull origin main-v1 ``` Or clone: @@ -94,7 +94,7 @@ version (using `v1.6.2` as an example): git push origin release-$(sha1sum package-lock.json | awk '{print $1}') ``` -1. Create a Pull Request to merge the release branch into `main`. +1. Create a Pull Request to merge the release branch into `main-v1`. 1. Merge the Pull Request if the changes look OK and all continuous integration checks are passing. @@ -103,11 +103,11 @@ version (using `v1.6.2` as an example): > complete the release process. If not, or only partially, continue following > the remaining steps. -1. Immediately after the Pull Request is merged, sync the `main` branch: +1. Immediately after the Pull Request is merged, sync the `main-v1` branch: - ```shell - git checkout main - git pull origin main + ```shell-v1 + git checkout main-v1 + git pull origin main-v1 ``` 1. Create a [git tag] for the new version: @@ -120,7 +120,7 @@ version (using `v1.6.2` as an example): ```shell git checkout v1 - git merge main + git merge main-v1 ``` 1. Push the branch and tag: diff --git a/SECURITY.md b/SECURITY.md index 1ac39bdd8..69dc4428c 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -12,7 +12,7 @@ with security updates. | Version | End-of-life | | ------: | :---------- | -| 1.x.x | - | +| 1.x.x | 2023-12-06 | | 0.x.x | 2021-02-01 | _This table only includes information on versions `<2.0.0`._ From b92f8dc9cf77f137af13ebace622bcc8c7e77b65 Mon Sep 17 00:00:00 2001 From: Eric Cornelissen Date: Thu, 7 Sep 2023 23:41:52 +0200 Subject: [PATCH 2/4] Fix `bump-changelog.js` script (#1182) --- script/release/bump-changelog.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/release/bump-changelog.js b/script/release/bump-changelog.js index 56dfdb23b..8d63dcfe6 100644 --- a/script/release/bump-changelog.js +++ b/script/release/bump-changelog.js @@ -7,6 +7,8 @@ import fs from "node:fs"; import path from "node:path"; +import { common } from "../_.js"; + const STR_UNRELEASED = "## [Unreleased]"; const STR_NO_CHANGES = "- _No changes yet_"; From c293e49212845dba2c56f67a9c33a9aba7bd7060 Mon Sep 17 00:00:00 2001 From: Eric Cornelissen Date: Fri, 22 Sep 2023 11:45:56 +0200 Subject: [PATCH 3/4] Two internal docs corrections (#1191) --- CONTRIBUTING.md | 2 +- RELEASE.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7ff186238..d0eaf6437 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -597,7 +597,7 @@ const john = "John Doe"; [assert package]: https://nodejs.org/api/assert.html [ava]: https://github.com/avajs/ava [cc by-sa 4.0]: https://creativecommons.org/licenses/by-sa/4.0/ -[contributing Guidelines on `main`]: https://github.com/ericcornelissen/shescape/blob/main/CONTRIBUTING.md +[contributing guidelines on `main`]: https://github.com/ericcornelissen/shescape/blob/main/CONTRIBUTING.md [bug report]: https://github.com/ericcornelissen/shescape/issues/new?labels=bug&template=bug_report.md [editorconfig]: https://editorconfig.org/ [eslint]: https://eslint.org/ diff --git a/RELEASE.md b/RELEASE.md index d45e9a8cb..8b64355de 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -105,7 +105,7 @@ version (using `v1.6.2` as an example): 1. Immediately after the Pull Request is merged, sync the `main-v1` branch: - ```shell-v1 + ```shell git checkout main-v1 git pull origin main-v1 ``` From cbb90fbcb5f1849adf4bd09025ebb43bead98ab6 Mon Sep 17 00:00:00 2001 From: Eric Cornelissen Date: Thu, 7 Dec 2023 23:29:31 +0100 Subject: [PATCH 4/4] Correction --- .github/workflows/fuzz-zsh.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/fuzz-zsh.yml b/.github/workflows/fuzz-zsh.yml index 64ab92176..aca12d4f7 100644 --- a/.github/workflows/fuzz-zsh.yml +++ b/.github/workflows/fuzz-zsh.yml @@ -14,7 +14,6 @@ on: - test/fuzz/** branches: - main - - main schedule: - cron: "30 2 * * *" workflow_dispatch: ~