-
Notifications
You must be signed in to change notification settings - Fork 10
Support current maintained Node TLS versions: 18, 20, and 22+ #33
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
30678d5
Support Node 16
wmluke 420ff00
Support current maintained Node TLS versions: 18, 20, and 22+
wmluke 354f6f2
Add `node:` prefix to built-in node libs
wmluke 6fdf974
Replace `/tmp` with `os.tmpdir()`
wmluke 75d4c6c
Fixed possible logging of sensitive information
wmluke 282bbe3
Added node versions to GHA CI matrix
wmluke 2d6ff6e
Added node versions to GHA CI matrix
wmluke 844a0ec
Refactored GHA CI workflows: reorganized build and integration steps,…
wmluke 472a2e3
Reorganized GHA workflows: separated build and integration steps, add…
wmluke 90918d2
Resolve Unpinned tag for a non-immutable Action in workflow
wmluke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| v18.20.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| const { DockerClient } = require('@docker/node-sdk'); | ||
| const fs = require('fs'); | ||
| const os = require('os'); | ||
|
|
||
| async function main() { | ||
| try { | ||
| const docker = await DockerClient.fromDockerConfig(); | ||
|
|
||
| await docker.systemPing(); | ||
|
|
||
| const v = await docker.systemVersion(); | ||
| console.dir(v, { depth: null }); | ||
|
|
||
| const ctr = await docker | ||
| .containerCreate({ | ||
| Image: 'alpine', | ||
| }) | ||
| .then((value) => { | ||
| console.dir(value, { depth: null }); | ||
| return value.Id; | ||
| }); | ||
|
|
||
| const out = fs.createWriteStream(os.tmpdir() + '/test.tar'); | ||
| await docker.containerExport(ctr, out); | ||
|
|
||
| docker.close(); | ||
| } catch (error) { | ||
| console.error(`Error: ${error.message ?? error}`); | ||
|
|
||
| } | ||
| } | ||
|
|
||
| main().catch((error) => { | ||
| console.error('Error:', error); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| v18.20.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { DockerClient } from '@docker/node-sdk'; | ||
| import { createWriteStream } from 'node:fs'; | ||
| import { tmpdir } from 'node:os'; | ||
|
|
||
| try { | ||
| const docker = await DockerClient.fromDockerConfig(); | ||
|
|
||
| await docker.systemPing(); | ||
|
|
||
| const v = await docker.systemVersion(); | ||
| console.dir(v, { depth: null }); | ||
|
|
||
| const ctr = await docker | ||
| .containerCreate({ | ||
| Image: 'alpine', | ||
| }) | ||
| .then((value) => { | ||
| console.dir(value, { depth: null }); | ||
| return value.Id; | ||
| }); | ||
|
|
||
| const out = createWriteStream(tmpdir() + '/test.tar'); | ||
| await docker.containerExport(ctr, out); | ||
|
|
||
| docker.close(); | ||
| } catch (error: any) { | ||
| console.error(`Error: ${error?.message ?? error}`); | ||
|
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,18 @@ | ||
| { | ||
| "name": "esm-project", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "scripts": { | ||
| "test": "node --test" | ||
| }, | ||
| "type": "module", | ||
| "dependencies": { | ||
| "@docker/node-sdk": "file:../.." | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "^24.5.2", | ||
| "typescript": "^5.9.2" | ||
| } | ||
| "name": "esm-project", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "scripts": { | ||
| "test": "tsx --test import.test.ts", | ||
| "start": "tsx main.ts" | ||
| }, | ||
| "type": "module", | ||
| "dependencies": { | ||
| "@docker/node-sdk": "file:../.." | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "^24.5.2", | ||
| "tsx": "^4.20.6", | ||
| "typescript": "^5.9.2" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.