Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(semver-major): Upgrade package to Node.js v23 #54

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 3 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14', '16', '18']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
node-version: 18
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's bring back the matrix

Copy link
Member Author

@RedYetiDev RedYetiDev Oct 27, 2024

Choose a reason for hiding this comment

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

.This package isn't compatible with v20, or with v16. It's specifically meant for v18

Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably be aiming for support on all supported versions of Node.js. If there's something that makes it work only for v18 but not v20, something's probably wrong.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll look into it, but we really don't need to support v20. v20 has most features that this aims to replicate

- 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 }}
4 changes: 2 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
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
46 changes: 46 additions & 0 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Package Maintenance Guide

This guide provides a step-by-step approach to maintaining the package, ensuring its ongoing functionality and compatibility with newer Node.js versions. The aim is to simplify maintenance until the majority of users have transitioned to newer versions, ultimately leading to the package's deprecation.

## Overview

Maintaining this package involves updating specific internal files and adjusting references as needed. The steps below outline a structured process to ensure effective and consistent maintenance.

## Steps for Maintenance

### Identify Files to Update
Begin by locating the internal files that need updating. These files are generally found in the `lib/internal/test_runner` directory. For example, `lib/internal/test_runner/runner.js` is a file that might require changes.

### Update the File Contents
- Replace the content of the identified file with the updated version from the appropriate reference source, ensuring you use the version that reflects recent changes in Node.js internals.

- There may be cases where a slight modification of the file may be needed in order for it to work with this polyfill. Ideally, only the minimal amount should be modified, to make future updating as easy as possible. If contents *must* be altered, leave a comment `/* NOTE(Author): ... */` explaining the change.

### Update `require` Statements
- Once the file content is updated, search for any occurrences of:
```javascript
require('internal/...');
```
- Replace these instances with the updated syntax:
```javascript
require('#internal/...');
```

### Add Required Imports
- If the updated file needs specific bindings, add the following line at the top:
```javascript
const { primordials, internalBinding } = require('#lib/bootstrap');
```

### Follow Special Comments
- Pay attention to any comments in the format `/* NOTE(Author): ... */` within the code. These may provide important instructions or considerations. Make sure to follow any guidelines specified in these comments.

### Implement Polyfills if Necessary
- If new features require polyfills that are not already available, implement only the minimal code needed for functionality. For example, in `lib/internal/options`, add parsing for the required options only.

## Final Steps

- After making the updates, thoroughly test the package to ensure it functions correctly with the changes.
- Document any significant updates to maintain a clear record for future maintenance.

For any questions about this guide, please refer to @RedYetiDev.
Loading