Skip to content

Commit

Permalink
fix: dependabot issues for 2024/03/12 (#3988)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunozoric committed Mar 12, 2024
1 parent b840333 commit 423eae6
Show file tree
Hide file tree
Showing 9 changed files with 209 additions and 188 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,12 @@
"@types/react": "17.0.39",
"@types/jsdom": "link:./typings/void",
"@types/webpack": "^5.28.0",
"browserify-sign": "^4.2.2",
"jsdom": "24.0.0",
"react": "17.0.2",
"crypto-js": "^4.2.0",
"ip": "^2.0.1",
"postcss": "^8.4.35",
"react-dom": "17.0.2",
"semver": "7.5.4",
"typescript": "4.7.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/api-mailer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"@webiny/handler-graphql": "0.0.0",
"@webiny/plugins": "0.0.0",
"@webiny/pubsub": "0.0.0",
"crypto-js": "4.2.0",
"crypto-js": "^4.2.0",
"lodash": "4.17.21",
"nodemailer": "^6.9.9",
"nodemailer": "^6.9.12",
"zod": "^3.22.4"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/api-page-builder-import-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@webiny/pubsub": "0.0.0",
"@webiny/utils": "0.0.0",
"@webiny/validation": "0.0.0",
"archiver": "^5.3.0",
"archiver": "^7.0.1",
"commodo-fields-object": "^1.0.6",
"dot-prop-immutable": "^2.1.0",
"fs-extra": "^9.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-page-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@webiny/plugins": "0.0.0",
"@webiny/pubsub": "0.0.0",
"@webiny/utils": "0.0.0",
"archiver": "^7.0.1",
"dataloader": "^2.0.0",
"extract-zip": "^1.6.7",
"fs-extra": "^9.1.0",
Expand All @@ -40,7 +41,6 @@
"rimraf": "^5.0.5",
"stream": "^0.0.2",
"uniqid": "^5.2.0",
"zip-local": "^0.3.5",
"zod": "^3.22.4"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import path from "path";
/**
* Package zip-local does not have types.
*/
// @ts-expect-error
import zipper from "zip-local";
import fs from "fs";
import { create as createArchiver } from "archiver";

export default (destination = "./pageBuilderInstallation.zip") => {
export default async (destination = "./pageBuilderInstallation.zip"): Promise<void> => {
if (fs.existsSync(destination)) {
return;
}
Expand All @@ -16,5 +12,21 @@ export default (destination = "./pageBuilderInstallation.zip") => {
fs.mkdirSync(dir, { recursive: true });
}

return zipper.sync.zip(path.join(__dirname, "files")).compress().save(destination);
const source = path.join(__dirname, "files");
const archive = createArchiver("zip", {
zlib: {
level: 9
}
});
const stream = fs.createWriteStream(destination);

return new Promise<void>((resolve, reject) => {
archive
.directory(source, false)
.on("error", err => reject(err))
.pipe(stream);

stream.on("close", () => resolve());
archive.finalize();
});
};
6 changes: 5 additions & 1 deletion packages/project-utils/bundling/app/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ module.exports = function (webpackEnv, { paths, options }) {
assert: require.resolve("assert-browserify"),
buffer: require.resolve("buffer/"),
crypto: require.resolve("crypto-browserify"),
path: require.resolve("path-browserify")
path: require.resolve("path-browserify"),
vm: require.resolve("vm-browserify")
}
},

Expand Down Expand Up @@ -416,6 +417,9 @@ module.exports = function (webpackEnv, { paths, options }) {
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"]
}),
new webpack.ProvidePlugin({
process: "process/browser"
}),
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin(
Object.assign(
Expand Down
1 change: 1 addition & 0 deletions packages/project-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"typescript": "4.7.4",
"url": "0.11.0",
"url-loader": "4.1.1",
"vm-browserify": "^1.1.2",
"webpack": "^5.90.0",
"webpack-dev-server": "^4.6.0",
"webpack-manifest-plugin": "^4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-rich-text-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@types/react": "17.0.39",
"classnames": "^2.3.1",
"react": "17.0.2",
"sanitize-html": "2.11.0"
"sanitize-html": "2.12.1"
},
"devDependencies": {
"@babel/cli": "^7.23.9",
Expand Down
Loading

0 comments on commit 423eae6

Please sign in to comment.