Skip to content

Commit

Permalink
feat(semver-major): Upgrade package to Node.js v23
Browse files Browse the repository at this point in the history
  • Loading branch information
avivkeller committed Oct 27, 2024
1 parent 414743a commit 2caf921
Show file tree
Hide file tree
Showing 333 changed files with 25,558 additions and 17,757 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14', '16', '18']
node: ['18', '20', '22']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm test
- name: Run test with experimental flag
run: npm test
env:
NODE_OPTIONS: --experimental-abortcontroller --no-warnings
4 changes: 2 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 100
- uses: wagoid/commitlint-github-action@v2
- uses: wagoid/commitlint-github-action@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 3 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@ jobs:
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
package-name: test
npm-publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
Expand Down
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@

test
.github
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "4.0.0"
}
44 changes: 44 additions & 0 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Maintenance Guide for the Package

This guide outlines the procedures necessary for maintaining this package, ensuring its functionality and compatibility with newer versions of Node.js. The goal is to streamline the maintenance process until a majority of users can transition to the latest versions, paving the way for eventual deprecation of this library.

## Overview

Maintaining this library involves updating specific internal files and ensuring that all references are correctly modified. The steps below provide a clear pathway for effective package maintenance.

## Maintenance Steps

### 1. Identify Files for Update
Start by identifying the internal files that require updates. These files are typically located in the `lib/internal/` directory. For example, `lib/internal/test_runner/runner.js` is one file that may need attention.

### 2. Update File Contents
- Replace the entire contents of the identified file with the updated version from your reference source. Ensure you use the correct version that corresponds to the changes made in Node.js internals.

### 3. Modify Require Statements
- After replacing the file contents, locate all instances of the following pattern in the file:
```javascript
require('internal/...');
```
- Update these instances to the new syntax:
```javascript
require('#internal/...');
```

### 4. Add Necessary Imports
- If the updated file requires specific bindings, include the following line at the top of the file:
```javascript
const { primordials, internalBinding } = require('#lib/bootstrap');
```

### 5. Follow Special Comments
- Pay close attention to any comments formatted as `/* NOTE(Author): ... */` within the files. These notes may contain essential guidelines or considerations regarding the code. Adhere to any instructions provided in these comments during the update process.

### 6. Implement Polyfills as Needed
- When updating the library, you may encounter new features that require polyfilling if they are not present in the library. Add the minimal amount of code necessary for functionality. For instance, in `lib/internal/options`, only implement parsing for the options that are actually needed.

## Final Steps

- After completing the updates, conduct thorough testing of the package to ensure all functionality works as expected with the new changes.
- Document any significant modifications made during the update process to maintain a clear history for future reference.

If you have any questions about this document, it was written by @RedYetiDev.
Loading

0 comments on commit 2caf921

Please sign in to comment.