Skip to content

build: Support updates to previous major versions#18870

Merged
fasttime merged 4 commits intov8.x-devfrom
v8.x-support-previous-versions
Sep 13, 2024
Merged

build: Support updates to previous major versions#18870
fasttime merged 4 commits intov8.x-devfrom
v8.x-support-previous-versions

Conversation

@mdjermanovic
Copy link
Member

@mdjermanovic mdjermanovic commented Sep 7, 2024

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:

Refs #18691

Updates v8.x-dev branch to support new v8.x releases.

What changes did you make? (Give an overview)

  • Added release:generate:maintenance script. When this script is run, Makefile.js will pass package tag "maintenance"to eslint-release, which will then publish new release with --tag maintenance on npm and also not mark it as Latest on GitHub (feat: Support updates to previous major versions eslint-release#62). Also, Makefile.js will update the v8.x docs branch instead of the latest docs branch. We'd add maintenance to the RELEASE_TYPE list on Jenkins.
  • When release is run on a branch that isn't main, Makefile.js will copy over the changelog update to the main branch, and also update docs/src/_data/versions.json on the main branch.

Is there anything you'd like reviewers to focus on?

Some changes are unnecessary for this branch (e.g., we'll never release another latest from it) and many things could have been hardcoded, but I wanted to make this roughly the same as changes that will be done in the main branch (#18871) for testing purposes and easier review.

I tested this locally (just had to replace remote commands like git push... with echo git push...) on the v8.x-dev branch and it seems to be working fine.

@eslint-github-bot eslint-github-bot bot added the build This change relates to ESLint's build process label Sep 7, 2024
@mdjermanovic
Copy link
Member Author

Looks like some transitive dependencies of sinon no longer work on Node 12.

@mdjermanovic
Copy link
Member Author

I added ovverrides to pin sinon > nise > @sinonjs/fake-timers at 11.2.2 because ^11.3.0 uses JS syntax that isn't supported on Node 12.

@mdjermanovic
Copy link
Member Author

Now it seems that npm install on Node 12 and Node 14 is stuck forever. I'll remove overrides and try to pin @sinonjs/fake-timers at the root level to see if that could fix the problem.

@mdjermanovic
Copy link
Member Author

mdjermanovic commented Sep 8, 2024

Okay, adding "@sinonjs/fake-timers": "11.2.2" to dev deps works, though it's fragile as it relies on npm's deduplication behavior. I'm not sure if there's a better solution (overrides actually isn't supported in npm 6).

npm install on Node 12 and Node 14 takes a lot of time but it could be because of the github: dependency.

@mdjermanovic
Copy link
Member Author

This is marked as draft because it needs a new version of eslint-release (eslint/eslint-release#62). Otherwise, it's ready for review.

@fasttime
Copy link
Member

fasttime commented Sep 9, 2024

Okay, adding "@sinonjs/fake-timers": "11.2.2" to dev deps works, though it's fragile as it relies on npm's deduplication behavior. I'm not sure if there's a better solution (overrides actually isn't supported in npm 6).

I'd say it's okay considering that we won't be dealing much longer with the v8 branch. FWIW, I tried dowgrading sinon to v9.2.4 and removed sinonjs/fake-timers and all tests passed.

@mdjermanovic
Copy link
Member Author

I tried dowgrading sinon to v9.2.4 and removed sinonjs/fake-timers and all tests passed.

Good to know, will keep that as a backup option if CI breaks in the following days.

@mdjermanovic mdjermanovic added the v8.x Issues/PRs related to the v8.x release line label Sep 11, 2024
@mdjermanovic mdjermanovic changed the title build: Support updates to previous major versions on v8.x-dev branch build: Support updates to previous major versions Sep 11, 2024
@netlify
Copy link

netlify bot commented Sep 11, 2024

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 9a7fbac
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/66e1867169ab4f000885bb40
😎 Deploy Preview https://deploy-preview-18870--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mdjermanovic mdjermanovic marked this pull request as ready for review September 11, 2024 12:10
@mdjermanovic mdjermanovic requested a review from a team as a code owner September 11, 2024 12:10
*/
function generateRelease() {
ReleaseOps.generateRelease();
function generateRelease({ packageTag }) {
Copy link
Member

Choose a reason for hiding this comment

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

Sanity check: Is this function signature intentionally different than the one in #18871?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we had (and still have on this branch) separate functions function generateRelease and function generatePrerelease which were later in the main branch merged into one (c2bf27d).

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Would like @fasttime to verify before merging.


exec(`git checkout ${MAIN_GIT_BRANCH} --force`);

fs.writeFileSync(CHANGELOG_FILE, `${releaseInfo.markdownChangelog}${cat(CHANGELOG_FILE)}`);
Copy link
Member

Choose a reason for hiding this comment

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

This will insert the changelog updates for the new maintenance release on top of the changelog on the main branch, right? Will users understand to which previous release those changes were applied upon, or would it make sense to indicate the branch name along with the version number (e.g. v8.57.1 on v8.x-dev)? I am looking at the changelog updates for v8.57.0 that was published sometime during the v9 pre-release phase, and now it's not obvious at what point the v8 and v9 branches diverged.

Copy link
Member Author

Choose a reason for hiding this comment

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

This will insert the changelog updates for the new maintenance release on top of the changelog on the main branch, right?

Yes, the idea was to order the releases chronologically, not according to semver rules.

Will users understand to which previous release those changes were applied upon, or would it make sense to indicate the branch name along with the version number (e.g. v8.57.1 on v8.x-dev)? I am looking at the changelog updates for v8.57.0 that was published sometime during the v9 pre-release phase, and now it's not obvious at what point the v8 and v9 branches diverged.

I think this can be easily figured out from the commit history and tags, but open for other solutions. I believe it isn't a common practice to mention branches as they could be temporary and the process could change over time, but maybe we could add a link to the tag: https://github.com/eslint/eslint/tree/v8.57.0.

@nzakas what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine as-is. Realistically, I don't know how many people are going be looking at CHANGELOG.md on its own and trying to figure out releases from there. I think it's more likely that people will either view it via a commit that just shows the new entries or will look at GitHub releases or blog posts.

All that is to say: I don't think it's necessary to mention a tag or branch. People who really care will be able to figure out where to go to get that information.

Copy link
Member

@fasttime fasttime left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@fasttime fasttime merged commit 35d366a into v8.x-dev Sep 13, 2024
@fasttime fasttime deleted the v8.x-support-previous-versions branch September 13, 2024 06:12
Vylpes pushed a commit to Vylpes/card-drop that referenced this pull request Sep 23, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | devDependencies | patch | [`8.57.0` -> `8.57.1`](https://renovatebot.com/diffs/npm/eslint/8.57.0/8.57.1) |

---

### Release Notes

<details>
<summary>eslint/eslint (eslint)</summary>

### [`v8.57.1`](https://github.com/eslint/eslint/releases/tag/v8.57.1)

[Compare Source](eslint/eslint@v8.57.0...v8.57.1)

#### Bug Fixes

-   [`a19072f`](eslint/eslint@a19072f) fix: add logic to handle fixTypes in the lintText() method ([#&#8203;18900](eslint/eslint#18900)) (Francesco Trotta)
-   [`04c7188`](eslint/eslint@04c7188) fix: Don't lint same file multiple times ([#&#8203;18899](eslint/eslint#18899)) (Francesco Trotta)
-   [`87ec3c4`](eslint/eslint@87ec3c4) fix: do not throw when defining a global named `__defineSetter__` ([#&#8203;18898](eslint/eslint#18898)) (Francesco Trotta)
-   [`60a1267`](eslint/eslint@60a1267) fix: Provide helpful error message for nullish configs ([#&#8203;18889](eslint/eslint#18889)) (Milos Djermanovic)
-   [`a0dea8e`](eslint/eslint@a0dea8e) fix: allow `name` in global ignores, fix `--no-ignore` for non-global ([#&#8203;18875](eslint/eslint#18875)) (Milos Djermanovic)
-   [`3836bb4`](eslint/eslint@3836bb4) fix: do not crash on error in `fs.walk` filter ([#&#8203;18886](eslint/eslint#18886)) (Milos Djermanovic)
-   [`2dec349`](eslint/eslint@2dec349) fix: skip processor code blocks that match only universal patterns ([#&#8203;18880](eslint/eslint#18880)) (Milos Djermanovic)

#### Documentation

-   [`6a5add4`](eslint/eslint@6a5add4) docs: v8.x Add EOL banner ([#&#8203;18744](eslint/eslint#18744)) (Amaresh  S M)
-   [`b034575`](eslint/eslint@b034575) docs: v8.x add version support page to the dropdown ([#&#8203;18731](eslint/eslint#18731)) (Amaresh  S M)
-   [`760ef7d`](eslint/eslint@760ef7d) docs: v8.x add version support page in the side navbar ([#&#8203;18740](eslint/eslint#18740)) (Amaresh  S M)
-   [`428b7ea`](eslint/eslint@428b7ea) docs: Add Powered by Algolia label to the search ([#&#8203;18658](eslint/eslint#18658)) (Amaresh  S M)
-   [`c68c07f`](eslint/eslint@c68c07f) docs: version selectors synchronization ([#&#8203;18265](eslint/eslint#18265)) (Milos Djermanovic)

#### Build Related

-   [`35d366a`](eslint/eslint@35d366a) build: Support updates to previous major versions ([#&#8203;18870](eslint/eslint#18870)) (Milos Djermanovic)

#### Chores

-   [`140ec45`](eslint/eslint@140ec45) chore: upgrade [@&#8203;eslint/js](https://github.com/eslint/js)[@&#8203;8](https://github.com/8).57.1 ([#&#8203;18913](eslint/eslint#18913)) (Milos Djermanovic)
-   [`bcdfc04`](eslint/eslint@bcdfc04) chore: package.json update for [@&#8203;eslint/js](https://github.com/eslint/js) release (Jenkins)
-   [`3f6ce8d`](eslint/eslint@3f6ce8d) chore: pin [email protected] ([#&#8203;18910](eslint/eslint#18910)) (Milos Djermanovic)
-   [`9f07549`](eslint/eslint@9f07549) chore: ignore `/docs/v8.x` in link checker ([#&#8203;18660](eslint/eslint#18660)) (Milos Djermanovic)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOlsidHlwZS9kZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/366
Reviewed-by: Vylpes <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build This change relates to ESLint's build process v8.x Issues/PRs related to the v8.x release line

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

3 participants