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

Some packages have missing dependencies #884

Closed
mgroenhoff opened this issue Jul 18, 2018 · 2 comments · Fixed by #964
Closed

Some packages have missing dependencies #884

mgroenhoff opened this issue Jul 18, 2018 · 2 comments · Fixed by #964

Comments

@mgroenhoff
Copy link

Describe the bug

These were the ones I ran into but there might be more.

christophehurpeau added a commit to christophehurpeau/babel-minify that referenced this issue Aug 3, 2018
christophehurpeau added a commit to christophehurpeau/babel-minify that referenced this issue Aug 3, 2018
@gilly3
Copy link

gilly3 commented Mar 9, 2019

This issue seems to prevent the use of minify with pnpm.

@ExE-Boss
Copy link

@gilly3 In the meantime, you can use the following pnpmfile.js:

const utils = require("@pnpm/hook-utils");

/** @type {import("@pnpm/hook-utils").PnpmHooks} */
exports.hooks = {
	readPackage(packageJson, context) {
		const pkg = utils.createReadPackageUtils(packageJson, context);
		const dependencies = packageJson.dependencies || {};

		switch (packageJson.name) {
			case "babel-plugin-minify-guarded-expressions":
			case "babel-plugin-minify-simplify":
				if (!dependencies["babel-helper-evaluate-path"])
					pkg.setDependency("babel-helper-evaluate-path", "0.5.0");
				break;
		}

		pkg.logChanges();
		return packageJson;
	},
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants