Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected] for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/ali-oss/lib/common/utils/policy2Str.ts b/node_modules/ali-oss/lib/common/utils/policy2Str.ts
index d088a3c..ca5eede 100644
--- a/node_modules/ali-oss/lib/common/utils/policy2Str.ts
+++ b/node_modules/ali-oss/lib/common/utils/policy2Str.ts
@@ -4,7 +4,7 @@ export function policy2Str(policy: string | object) {
if (typeof policy === 'string') {
try {
policyStr = JSON.stringify(JSON.parse(policy));
- } catch (err) {
+ } catch (err:any) {
throw new Error(`Policy string is not a valid JSON: ${err.message}`);
}
} else {
This issue body was partially generated by patch-package.