@aws-sdk/body-checksum-node 3.972.5 → 3.972.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -5,7 +5,7 @@ var sha256TreeHash = require('@aws-sdk/sha256-tree-hash');
5
5
  var isArrayBuffer = require('@smithy/is-array-buffer');
6
6
  var utilHexEncoding = require('@smithy/util-hex-encoding');
7
7
  var utilUtf8 = require('@smithy/util-utf8');
8
- var fs = require('fs');
8
+ var node_fs = require('node:fs');
9
9
 
10
10
  async function bodyChecksumGenerator(request, options) {
11
11
  const contentHash = new options.sha256();
@@ -19,7 +19,7 @@ async function bodyChecksumGenerator(request, options) {
19
19
  if (typeof body.path !== "string") {
20
20
  throw new Error("Unable to calculate checksums for non-file streams.");
21
21
  }
22
- const bodyTee = fs.createReadStream(body.path, {
22
+ const bodyTee = node_fs.createReadStream(body.path, {
23
23
  start: body.start,
24
24
  end: body.end,
25
25
  });
package/dist-es/index.js CHANGED
@@ -3,7 +3,7 @@ import { TreeHash } from "@aws-sdk/sha256-tree-hash";
3
3
  import { isArrayBuffer } from "@smithy/is-array-buffer";
4
4
  import { toHex } from "@smithy/util-hex-encoding";
5
5
  import { toUint8Array } from "@smithy/util-utf8";
6
- import { createReadStream } from "fs";
6
+ import { createReadStream } from "node:fs";
7
7
  export async function bodyChecksumGenerator(request, options) {
8
8
  const contentHash = new options.sha256();
9
9
  const treeHash = new TreeHash(options.sha256, options.utf8Decoder);
@@ -1,4 +1,4 @@
1
- import { ChecksumConstructor, Decoder, HashConstructor, HttpRequest } from "@smithy/types";
1
+ import type { ChecksumConstructor, Decoder, HashConstructor, HttpRequest } from "@smithy/types";
2
2
  /**
3
3
  * @internal
4
4
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/body-checksum-node",
3
- "version": "3.972.5",
3
+ "version": "3.972.6",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
6
6
  "build:cjs": "node ../../scripts/compilation/inline body-checksum-node",
@@ -22,9 +22,9 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@aws-sdk/chunked-stream-reader-node": "^3.972.2",
26
- "@aws-sdk/sha256-tree-hash": "^3.972.5",
27
- "@aws-sdk/types": "^3.973.3",
25
+ "@aws-sdk/chunked-stream-reader-node": "^3.972.3",
26
+ "@aws-sdk/sha256-tree-hash": "^3.972.6",
27
+ "@aws-sdk/types": "^3.973.4",
28
28
  "@smithy/is-array-buffer": "^4.2.1",
29
29
  "@smithy/protocol-http": "^5.3.10",
30
30
  "@smithy/types": "^4.13.0",