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

Update node Docker tag to v21 #285

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Update node Docker tag to v21 #285

merged 1 commit into from
Apr 23, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 20, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
node final major 20.12.2-alpine -> 21.7.3-alpine
node stage major 20.12.2-alpine -> 21.7.3-alpine

Release Notes

nodejs/node (node)

v21.7.3: 2024-04-10, Version 21.7.3 (Current), @​RafaelGSS

Compare Source

This is a security release.

Notable Changes
  • CVE-2024-27980 - Command injection via args parameter of child_process.spawn without shell option enabled on Windows
Commits

v21.7.2: 2024-04-03, Version 21.7.2 (Current), @​RafaelGSS prepared by @​marco-ippolito

Compare Source

This is a security release.

Notable changes
  • CVE-2024-27983 - Assertion failed in node::http2::Http2Session::~Http2Session() leads to HTTP/2 server crash- (High)
  • CVE-2024-27982 - HTTP Request Smuggling via Content Length Obfuscation- (Medium)
  • llhttp version 9.2.1
  • undici version 6.11.1
Commits

v21.7.1: 2024-03-08, Version 21.7.1 (Current), @​targos

Compare Source

Notable Changes

This release reverts #​51389, which
landed in Node.js 21.7.0. It is a documented feature that t.after() hooks are
run even if a test has no subtests. The hook can be used to clean up the test
itself.

Commits

v21.7.0: 2024-03-06, Version 21.7.0 (Current), @​RafaelGSS prepared by @​marco-ippolito

Compare Source

Text Styling
  • util.styleText(format, text): This function returns a formatted text considering the format passed.

A new API has been created to format text based on util.inspect.colors, enabling you to style text in different colors (such as red, blue, ...) and emphasis (italic, bold, ...).

const { styleText } = require('node:util');
const errorMessage = styleText('red', 'Error! Error!');
console.log(errorMessage);

Contributed by Rafael Gonzaga and Hemanth HM in #​51850.

Loading and parsing environment variables
  • process.loadEnvFile(path):

    • Use this function to load the .env file. If no path is specified, it automatically loads the .env file in the current directory. Example: process.loadEnvFile().
    • Load a specific .env file by specifying its path. Example: process.loadEnvFile('./development.env').
  • util.parseEnv(content):

    • Use this function to parse an existing string containing environment variable assignments.
    • Example usage: require('node:util').parseEnv('HELLO=world').

Contributed by Yagiz Nizipli in #​51476

Support for multi-line values for .env file

Node.js 21.7.0 will now support multi-line values in the .env file:

MULTI_LINE="HELLO
WORLD"

Contributed by Ilyas Shabi #​51289

sea: support embedding assets

Users can now include assets by adding a key-path dictionary
to the configuration as the assets field. At build time, Node.js
would read the assets from the specified paths and bundle them into
the preparation blob. In the generated executable, users can retrieve
the assets using the sea.getAsset() and sea.getAssetAsBlob() API.

{
  "main": "/path/to/bundled/script.js",
  "output": "/path/to/write/the/generated/blob.blob",
  "assets": {
    "a.jpg": "/path/to/a.jpg",
    "b.txt": "/path/to/b.txt"
  }
}

The single-executable application can access the assets as follows:

const { getAsset } = require('node:sea');
// Returns a copy of the data in an ArrayBuffer
const image = getAsset('a.jpg');
// Returns a string decoded from the asset as UTF8.
const text = getAsset('b.txt', 'utf8');
// Returns a Blob containing the asset without copying.
const blob = getAssetAsBlob('a.jpg');

Contributed by Joyee Cheung in #​50960

vm: support using the default loader to handle dynamic import()

This patch adds support for using vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER as the
importModuleDynamically option in all vm APIs that take this option except vm.SourceTextModule. This allows users to have a shortcut to support dynamic import() in the compiled code without missing the compilation cache if they don't need customization of the loading process. We emit an experimental warning when the import() is actually handled by the default loader through this option instead of requiring --experimental-vm-modules.

const { Script, constants } = require('node:vm');
const { resolve } = require('node:path');
const { writeFileSync } = require('node:fs');

// Write test.js and test.txt to the directory where the current script
// being run is located.
writeFileSync(resolve(__dirname, 'test.mjs'),
              'export const filename = "./test.json";');
writeFileSync(resolve(__dirname, 'test.json'),
              '{"hello": "world"}');

// Compile a script that loads test.mjs and then test.json
// as if the script is placed in the same directory.
const script = new Script(
  `(async function() {
    const { filename } = await import('./test.mjs');
    return import(filename, { with: { type: 'json' } })
  })();`,
  {
    filename: resolve(__dirname, 'test-with-default.js'),
    importModuleDynamically: constants.USE_MAIN_CONTEXT_DEFAULT_LOADER,
  });

// { default: { hello: 'world' } }
script.runInThisContext().then(console.log);

Contributed by Joyee Cheung in #​51244

crypto: implement crypto.hash()

This patch introduces a helper crypto.hash() that computes
a digest from the input at one shot. This can be 1.2-2x faster
than the object-based createHash() for smaller inputs (<= 5MB)
that are readily available (not streamed) and incur less memory
overhead since no intermediate objects will be created.

const crypto = require('node:crypto');

// Hashing a string and return the result as a hex-encoded string.
const string = 'Node.js';
// 10b3493287f831e81a438811a1ffba01f8cec4b7
console.log(crypto.hash('sha1', string));

Contributed by Joyee Cheung in #​51044

Other Notable Changes
Commits

v21.6.2: 2024-02-14, Version 21.6.2 (C


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 is behind base branch, or you tick the rebase/retry checkbox.

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


  • If you want to rebase/retry this PR, check this box

Read more information about the use of Renovate Bot within Laminas.

@renovate renovate bot added the renovate label Oct 20, 2023
@renovate renovate bot force-pushed the renovate/node-21.x branch from 6c1b14c to b1abac7 Compare October 25, 2023 20:28
@renovate renovate bot force-pushed the renovate/node-21.x branch from b1abac7 to 98475be Compare November 16, 2023 03:26
@renovate renovate bot force-pushed the renovate/node-21.x branch 2 times, most recently from 9780f03 to 7b76b5a Compare December 6, 2023 04:10
@renovate renovate bot force-pushed the renovate/node-21.x branch from 7b76b5a to 65acf79 Compare December 20, 2023 22:46
@renovate renovate bot force-pushed the renovate/node-21.x branch from 65acf79 to 89adefc Compare January 16, 2024 19:58
@renovate renovate bot force-pushed the renovate/node-21.x branch from 89adefc to 9278225 Compare January 30, 2024 22:02
@renovate renovate bot force-pushed the renovate/node-21.x branch from 9278225 to d0265bb Compare February 16, 2024 01:10
@renovate renovate bot force-pushed the renovate/node-21.x branch 2 times, most recently from 493c330 to eb329c9 Compare March 11, 2024 17:42
@renovate renovate bot force-pushed the renovate/node-21.x branch 2 times, most recently from be945e1 to 3c2a211 Compare April 11, 2024 13:55
@renovate renovate bot force-pushed the renovate/node-21.x branch from 3c2a211 to 48d86e0 Compare April 23, 2024 22:51
@boesing boesing added this to the 1.25.0 milestone Apr 23, 2024
@renovate renovate bot force-pushed the renovate/node-21.x branch 2 times, most recently from b2b58b1 to 326fef2 Compare April 23, 2024 23:08
| datasource | package | from    | to     |
| ---------- | ------- | ------- | ------ |
| docker     | node    | 20.12.2 | 21.7.3 |


Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/node-21.x branch from 326fef2 to 80d09e9 Compare April 23, 2024 23:10
@boesing boesing merged commit f45fba4 into 1.25.x Apr 23, 2024
42 checks passed
@renovate renovate bot deleted the renovate/node-21.x branch April 23, 2024 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant