Skip to content

Conversation

@timmywil
Copy link
Member

@timmywil timmywil commented Jul 18, 2024

Summary

3.x version of release migration, beginning with #5512, and including all changes from subsequent release PRs, including #5521. Some things were left in that were only applicable to the main branch and have no affect on 3.x-stable. I left those things in so that the code can be as close as possible to main, such as leaving in the factory regex in the verify script or leaving in the removal of dist-module in the build:clean script.

Authors

  • Checking and updating authors has been migrated to a custom script in the repo

Changelog

  • changelogplease is no longer maintained
  • generate changelog in markdown for GitHub releases
  • generate changelog in HTML for blog posts
  • generate contributors list in HTML for blog posts

dist

  • clone dist repo, copy files, and commit/push
  • commit tag with dist files on main branch; remove dist files from main branch after release

cdn

  • clone cdn repo, copy files, and commit/push
  • create versioned and unversioned copies in cdn/
  • generate md5 sums and archives for Google and MSFT

build

  • implement reproducible builds and verify release builds
  • the verify workflow also ensures all files were properly published to the CDN and npm

docs

  • the new release workflow is documented at build/release/README.md

verify

  • use the last modified date of the commit before the tag
  • use versioned filenames when checking map files on the CDN
  • skip factory and package.json files when verifying CDN

misc

  • now that we don't need the jquery-release script and now that we no longer need to build on Node 10, we can use ESM in all files in the build folder
  • limit certain workflows to the main repo (not forks)
  • version has been set to the previously released version 3.7.1, as release-it expects
  • release-it added the preReleaseBase option and we now always set it to 1 in the npm script. This is a noop for stable releases.

Ref jquery/jquery-release#114

Checklist

@timmywil timmywil added this to the 3.7.2 milestone Jul 18, 2024
@timmywil timmywil requested a review from mgol July 18, 2024 15:09
@timmywil timmywil changed the title Release: migrate release process to release-it Release: migrate release process to release-it (3.x) Jul 18, 2024
@timmywil timmywil force-pushed the release-3.x-2 branch 2 times, most recently from 166676b to 1523542 Compare July 23, 2024 15:07
timmywil added a commit to timmywil/jquery that referenced this pull request Jul 23, 2024
*Authors*
- Checking and updating authors has been migrated
  to a custom script in the repo

*Changelog*
- changelogplease is no longer maintained
- generate changelog in markdown for GitHub releases
- generate changelog in HTML for blog posts
- generate contributors list in HTML for blog posts

*dist*
- clone dist repo, copy files, and commit/push
- commit tag with dist files on main branch;
  remove dist files from main branch after release

*cdn*
- clone cdn repo, copy files, and commit/push
- create versioned and unversioned copies in cdn/
- generate md5 sums and archives for Google and MSFT

*build*
- implement reproducible builds and verify release builds
  * uses the last modified date for the latest commit
  * See https://reproducible-builds.org/
- the verify workflow also ensures all files were
  properly published to the CDN and npm

*docs*
- the new release workflow is documented at build/release/README.md

*verify*
- use the last modified date of the commit before the tag
- use versioned filenames when checking map files on the CDN
- skip factory and package.json files when verifying CDN

*misc*
- now that we don't need the jquery-release script and
  now that we no longer need to build on Node 10, we can
  use ESM in all files in the build folder
- limit certain workflows to the main repo (not forks)
- version has been set to the previously released version 3.7.1,
  as release-it expects
- release-it added the `preReleaseBase` option and we
  now always set it to `1` in the npm script. This is
  a noop for stable releases.
- include post-release script to be run manually after a release,
  with further steps that should be verified manually

Ref jquery/jquery-release#114
Closes jquerygh-5522
timmywil added a commit to timmywil/jquery that referenced this pull request Jul 23, 2024
@timmywil timmywil force-pushed the release-3.x-2 branch 2 times, most recently from 5efc345 to fb9c978 Compare July 24, 2024 13:27
Copy link
Member

@mgol mgol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I compared the output with main and I have a few minor comments, but nothing blocking the merge. Nice to see 3.x migrated as well!

import { exec as nodeExec } from "node:child_process";
import isCleanWorkingDir from "./lib/isCleanWorkingDir.js";
import chalk from "chalk";
import isCleanWorkingDir from "./isCleanWorkingDir.js";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's one difference from main in this file - the catch parameter in line 39 is named _ instead of e - do we want to align?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e should be an error. I wonder why there's no lint error on main.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 3.x ESLint config has this override for build/**:

{ caughtErrorsIgnorePattern: "^_" }

which doesn't exist on main; that's why:

jquery/eslint.config.js

Lines 298 to 302 in a7d3383

rules: {
...jqueryConfig.rules,
"no-implicit-globals": "error",
strict: [ "error", "global" ]
}

Copy link
Member Author

@timmywil timmywil Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm, I forgot. The real reason is we've upgraded eslint in the 3.x branch to v9, which has caughtErrorsIgnorePattern, but the main branch is on v8, which is required for the import plugin. Support for flat config and eslint 9 is unlikely any time soon. We may have to consider dropping the import plugin.

I will still add the rule so we don't have to later, but it will have no effect until eslint is updated.

@timmywil
Copy link
Member Author

Things to change on main that came up in this PR:

  1. Adjust eslint settings for build files to also include rules for unused variables
  2. Add package.json comment to dist

timmywil added 3 commits July 29, 2024 15:22
*Authors*
- Checking and updating authors has been migrated
  to a custom script in the repo

*Changelog*
- changelogplease is no longer maintained
- generate changelog in markdown for GitHub releases
- generate changelog in HTML for blog posts
- generate contributors list in HTML for blog posts

*dist*
- clone dist repo, copy files, and commit/push
- commit tag with dist files on main branch;
  remove dist files from main branch after release

*cdn*
- clone cdn repo, copy files, and commit/push
- create versioned and unversioned copies in cdn/
- generate md5 sums and archives for Google and MSFT

*build*
- implement reproducible builds and verify release builds
  * uses the last modified date for the latest commit
  * See https://reproducible-builds.org/
- the verify workflow also ensures all files were
  properly published to the CDN and npm

*docs*
- the new release workflow is documented at build/release/README.md

*verify*
- use the last modified date of the commit before the tag
- use versioned filenames when checking map files on the CDN
- skip factory and package.json files when verifying CDN

*misc*
- now that we don't need the jquery-release script and
  now that we no longer need to build on Node 10, we can
  use ESM in all files in the build folder
- limit certain workflows to the main repo (not forks)
- version has been set to the previously released version 3.7.1,
  as release-it expects
- release-it added the `preReleaseBase` option and we
  now always set it to `1` in the npm script. This is
  a noop for stable releases.
- include post-release script to be run manually after a release,
  with further steps that should be verified manually

Ref jquery/jquery-release#114
Closes jquerygh-5522
@timmywil timmywil merged commit 0b013ca into jquery:3.x-stable Jul 29, 2024
timmywil added a commit that referenced this pull request Jul 29, 2024
*Authors*
- Checking and updating authors has been migrated
  to a custom script in the repo

*Changelog*
- changelogplease is no longer maintained
- generate changelog in markdown for GitHub releases
- generate changelog in HTML for blog posts
- generate contributors list in HTML for blog posts

*dist*
- clone dist repo, copy files, and commit/push
- commit tag with dist files on main branch;
  remove dist files from main branch after release

*cdn*
- clone cdn repo, copy files, and commit/push
- create versioned and unversioned copies in cdn/
- generate md5 sums and archives for Google and MSFT

*build*
- implement reproducible builds and verify release builds
  * uses the last modified date for the latest commit
  * See https://reproducible-builds.org/
- the verify workflow also ensures all files were
  properly published to the CDN and npm

*docs*
- the new release workflow is documented at build/release/README.md

*verify*
- use the last modified date of the commit before the tag
- use versioned filenames when checking map files on the CDN
- skip factory and package.json files when verifying CDN

*misc*
- now that we don't need the jquery-release script and
  now that we no longer need to build on Node 10, we can
  use ESM in all files in the build folder
- limit certain workflows to the main repo (not forks)
- version has been set to the previously released version 3.7.1,
  as release-it expects
- release-it added the `preReleaseBase` option and we
  now always set it to `1` in the npm script. This is
  a noop for stable releases.
- include post-release script to be run manually after a release,
  with further steps that should be verified manually

Ref jquery/jquery-release#114
Closes gh-5522
timmywil added a commit that referenced this pull request Jul 29, 2024
@timmywil timmywil deleted the release-3.x-2 branch July 29, 2024 19:25
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

2 participants