Skip to content
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

fix(cli): downgrade md5-hex to use cjs in CLI #1653

Merged
merged 2 commits into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"chokidar": "^3.5.2",
"dotenv": "^10.0.0",
"gluegun": "^4.6.1",
"md5-hex": "^4.0.0",
"md5-hex": "^3.0.1",
"request": "^2.88.2",
"unzipper": "^0.10.11",
"validate-npm-package-name": "^3.0.0"
Expand Down
6 changes: 6 additions & 0 deletions packages/cli/src/commands/snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ module.exports = {
// when --ci parameter is provided, then we skip questions for default values
const isCIrun = inputParameters.ci;

if (!toolbox.isProduction) {
toolbox.print.warning(
`[CLI > init] You're running CLI in development mode!`
);
}

if (!isCIrun) {
const shopwareUsernameQuestion = !inputParameters.username && {
type: "input",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/extensions/snippets-extension.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { GluegunToolbox } from "gluegun";
import axios from "axios";
import md5Hex from "md5-hex";

module.exports = (toolbox: GluegunToolbox) => {
toolbox.snippets = {};
Expand Down Expand Up @@ -122,7 +123,6 @@ module.exports = (toolbox: GluegunToolbox) => {
authToken: string
) => {
let payload = [];
const md5Hex = require("md5-hex");

for (let [key, value] of Object.entries(snippetSet)) {
payload.push({
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4151,7 +4151,7 @@ bluebird@~3.4.1:
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3"
integrity sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=

blueimp-md5@^2.18.0:
blueimp-md5@^2.10.0:
version "2.18.0"
resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.18.0.tgz#1152be1335f0c6b3911ed9e36db54f3e6ac52935"
integrity sha512-vE52okJvzsVWhcgUHOv+69OG3Mdg151xyn41aVQN/5W5S+S43qZhxECtYLAEHMSFWX6Mv5IZrzj3T5+JqXfj5Q==
Expand Down Expand Up @@ -10274,12 +10274,12 @@ marked@^2.1.1:
resolved "https://registry.yarnpkg.com/marked/-/marked-2.1.1.tgz#b7c27f520fc4de0ddd049d9b4be3b04e06314923"
integrity sha512-5XFS69o9CzDpQDSpUYC+AN2xvq8yl1EGa5SG/GI1hP78/uTeo3PDfiDNmsUyiahpyhToDDJhQk7fNtJsga+KVw==

md5-hex@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-4.0.0.tgz#9327bd8d2868b05b9eaa8691f196ea05e34a03d3"
integrity sha512-di38zHPn4Tz8LCb5Lz8SpLb/20Hv23aPXpF4Bq1mR5r9JuCZQ/JpcDUxFfZF9Ur5GiUvqS5NQOkR+fm5cYZ0IQ==
md5-hex@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-3.0.1.tgz#be3741b510591434b2784d79e556eefc2c9a8e5c"
integrity sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==
dependencies:
blueimp-md5 "^2.18.0"
blueimp-md5 "^2.10.0"

md5.js@^1.3.4:
version "1.3.5"
Expand Down