Skip to content

Commit

Permalink
fix: aws sdk s3 stream bug (#873)
Browse files Browse the repository at this point in the history
* Remove unused patches

* Update deps

* Fix stream issue
  • Loading branch information
richarddavison authored Mar 6, 2025
1 parent f859364 commit e092d7b
Show file tree
Hide file tree
Showing 7 changed files with 146 additions and 260 deletions.
18 changes: 9 additions & 9 deletions example/functions/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1330,15 +1330,15 @@
"@smithy/types" "^4.1.0"
tslib "^2.6.2"

"@types/react-dom@19.0.3":
version "19.0.3"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.0.3.tgz#0804dfd279a165d5a0ad8b53a5b9e65f338050a4"
integrity sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA==

"@types/react@19.0.8":
version "19.0.8"
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.0.8.tgz#7098e6159f2a61e4f4cef2c1223c044a9bec590e"
integrity sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw==
"@types/react-dom@19.0.4":
version "19.0.4"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.0.4.tgz#bedba97f9346bd4c0fe5d39e689713804ec9ac89"
integrity sha512-4fSQ8vWFkg+TGhePfUzVmat3eC14TXYSsiiDSLI0dVLsrm9gZFABjPy/Qu6TKgl1tq1Bu1yDsuQgY3A3DOjCcg==

"@types/react@19.0.10":
version "19.0.10"
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.0.10.tgz#d0c66dafd862474190fe95ce11a68de69ed2b0eb"
integrity sha512-JuRQ9KXLEjaUNjTWpzuR231Z2WpIwczOkBEIvbHNCzQefFIT0L8IqE6NV6ULLyC1SI/i234JnDoMkfg+RjQj2g==
dependencies:
csstype "^3.0.2"

Expand Down
8 changes: 4 additions & 4 deletions example/infrastructure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"hotswap": "cdk deploy --hotswap"
},
"devDependencies": {
"@types/node": "22.13.7",
"aws-cdk": "2.177.0",
"aws-cdk-lib": "2.177.0",
"@types/node": "22.13.9",
"aws-cdk": "2.1003.0",
"aws-cdk-lib": "2.182.0",
"constructs": "10.4.2",
"esbuild": "0.25.0",
"ts-node": "10.9.2",
"typescript": "5.7.3"
"typescript": "5.8.2"
}
}
3 changes: 0 additions & 3 deletions llrt_core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ fn main() -> StdResult<(), Box<dyn Error>> {

rerun_if_changed!(BUNDLE_JS_DIR);
rerun_if_changed!("Cargo.toml");
rerun_if_changed!("patches");

//cargo_patch::patch()?;

let out_dir = env::var("OUT_DIR").unwrap();

Expand Down
15 changes: 0 additions & 15 deletions llrt_core/patches/promise-poll.patch

This file was deleted.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@
"@aws-sdk/s3-presigned-post": "3.734.0",
"@aws-sdk/s3-request-presigner": "3.734.0",
"@jest/types": "29.6.3",
"@types/chai": "5.0.1",
"@types/chai": "5.2.0",
"@types/jest": "^29.5.14",
"@types/readable-stream": "4.0.18",
"@types/uuid": "10.0.0",
"esbuild": "0.25.0",
"esbuild-plugins-node-modules-polyfill": "1.7.0",
"prettier": "3.5.2",
"prettier": "3.5.3",
"pretty-format": "29.7.0",
"pretty-quick": "4.0.0",
"pretty-quick": "4.1.1",
"pure-http": "4.0.2",
"readable-stream": "4.7.0",
"stream-browserify": "3.0.0",
"ts-node": "10.9.2",
"typescript": "5.7.3",
"vitest": "3.0.5"
"typescript": "5.8.2",
"vitest": "3.0.8"
},
"packageManager": "yarn@1.22.22"
}
4 changes: 2 additions & 2 deletions shims/sdk-stream-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const transformToWebStream = () => {
};

async function transformToByteArray() {
return await this.bytes();
return this;
}

async function transformToString(encoding) {
const typedArray = await this.arrayBuffer();
const typedArray = this;
if (encoding === "base64") {
return toBase64(typedArray);
} else if (encoding === "hex") {
Expand Down
Loading

0 comments on commit e092d7b

Please sign in to comment.