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

Release 2.3 - Support NodeJS 16+, Update drafter to 5.1 #266

Merged
merged 6 commits into from
Jul 28, 2023
Merged

Conversation

kylef
Copy link
Member

@kylef kylef commented May 18, 2023

What:

Why:

  • Releases bug fixes to our users.
  • NodeJS <16 is now longer supported. This reduces security risk in the sense that security fixes will no longer be made to older NodeJS. Compatibility with newer NodeJS allows users of the library to update.
  • NodeJS <12 is no longer supported. This is for a few reasons:
    • Node-gyp which supports newer compilers and NodeJS doesn't support Node <10
    • Mocha/Chai in later versions drop support for Node 10. We could support Node 10, but we'd be unable to test it.

Criticality:

Medium.

Blast radius:

Medium - This change does not change API or ABI compatibility. However it does drop support for Node 12 and older.

Expected outcome:

Potential impact and visibility:

No expected impact.

Test results:

Smoke tests pass (provides the npm bundle would be buildable) and unit and functional tests pass on various NodeJS versions on both Linux and MacOS. Unable to test on Windows.

Screenshot 2023-05-18 at 01 07 20

Remove support for Node <10
"drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/*.c",
"drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/*.h",
"drafter/ext/variant/include/mpark/*.hpp"
"drafter/packages/drafter/src/*.cc",
Copy link
Member Author

Choose a reason for hiding this comment

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

Drafter sources have been significantly altered in apiaryio/drafter#782, updating the submodule means these file lists have to be updated.

The smoke tests show that a packaged npm package is build-able, this shows that it contains all the needed files (most importantly, it proves that this list is correct).

},
"scripts": {
"build": "node-gyp build",
"prepack": "cp drafter/THIRD_PARTY_LICENSES.txt THIRD_PARTY_LICENSES.txt",
"test:exclude-await": "mocha --exclude test/await-test.js",
"test:await": "mocha",
"test": "node --version | grep -q -E \"v(4|6)\" && npm run test:exclude-await || npm run test:await"
"test": "npm run test:await"
Copy link
Member Author

Choose a reason for hiding this comment

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

When async/await support had been added to Protagonist it was only usable in NodeJS >6 (since Node <=6 doesn't support async/await). As we've dropped support, this expression to not run async-await tests are no longer needed.

This encompasses the following changes:

    Feature: overload deprecated AccessorSignatures (#943) 7f9ceb80fbc45c9ba1a10e6591ccbef9e8dee6b4
    Feature: Add support for Node 18 (#937) 16fa32231e2ccd89d2804b3f765319128b20c4ac
    Feature: add ScriptOrigin (#918) d09debf9eeedcb7ca4073e84ffe5fbb455ecb709
    Bugfix: fix gcc 8 function cast warning (#899) 35f0fab205574b2cbda04e6347c8b2db755e124f
    Bugfix: use GetBackingStore() instead of GetContents() (#888) 2c023bd447661a61071da318b0ff4003c3858d39
    Feature: Add missing methods to Nan::Maybe (#852) 4e962489fb84a184035b9fa74f245f650249aca6
Mocha/Chai has known security issues, this update makes npm audit happy.
@kylef kylef merged commit 54cbf52 into master Jul 28, 2023
9 checks passed
@kylef kylef deleted the kylef/node branch July 28, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant