Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/pnpmfile

Package Overview
Dependencies
Maintainers
3
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/pnpmfile - npm Package Compare versions

Comparing version 0.1.21 to 1.0.0

18

CHANGELOG.md
# @pnpm/pnpmfile
## 1.0.0
### Major Changes
- 09e950fdc: `pnpmfile.js` renamed to `.pnpmfile.cjs`.
### Minor Changes
- 97b986fbc: Node.js 10 support is dropped. At least Node.js 12.17 is required for the package to work.
### Patch Changes
- Updated dependencies [97b986fbc]
- Updated dependencies [90487a3a8]
- @pnpm/core-loggers@6.0.0
- @pnpm/error@2.0.0
- @pnpm/types@7.0.0
## 0.1.21

@@ -4,0 +22,0 @@

31

lib/requireHooks.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -6,13 +25,13 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = __importDefault(require("path"));
const core_loggers_1 = require("@pnpm/core-loggers");
const logger_1 = __importDefault(require("@pnpm/logger"));
const path_absolute_1 = __importDefault(require("path-absolute"));
const R = __importStar(require("ramda"));
const requirePnpmfile_1 = __importDefault(require("./requirePnpmfile"));
const path = require("path");
const pathAbsolute = require("path-absolute");
const R = require("ramda");
function requireHooks(prefix, opts) {
const globalPnpmfile = opts.globalPnpmfile && requirePnpmfile_1.default(pathAbsolute(opts.globalPnpmfile, prefix), prefix);
const globalPnpmfile = opts.globalPnpmfile && (0, requirePnpmfile_1.default)((0, path_absolute_1.default)(opts.globalPnpmfile, prefix), prefix);
let globalHooks = globalPnpmfile === null || globalPnpmfile === void 0 ? void 0 : globalPnpmfile.hooks;
const pnpmFile = opts.pnpmfile && requirePnpmfile_1.default(pathAbsolute(opts.pnpmfile, prefix), prefix) ||
requirePnpmfile_1.default(path.join(prefix, 'pnpmfile.js'), prefix);
const pnpmFile = opts.pnpmfile && (0, requirePnpmfile_1.default)((0, path_absolute_1.default)(opts.pnpmfile, prefix), prefix) ||
(0, requirePnpmfile_1.default)(path_1.default.join(prefix, '.pnpmfile.cjs'), prefix);
let hooks = pnpmFile === null || pnpmFile === void 0 ? void 0 : pnpmFile.hooks;

@@ -19,0 +38,0 @@ if (!globalHooks && !hooks)

12

lib/requirePnpmfile.js

@@ -7,6 +7,6 @@ "use strict";

exports.BadReadPackageHookError = void 0;
const fs_1 = __importDefault(require("fs"));
const error_1 = __importDefault(require("@pnpm/error"));
const logger_1 = __importDefault(require("@pnpm/logger"));
const fs = require("fs");
const chalk = require("chalk");
const chalk_1 = __importDefault(require("chalk"));
class BadReadPackageHookError extends error_1.default {

@@ -70,3 +70,3 @@ constructor(pnpmfile, message) {

if (err instanceof SyntaxError) {
console.error(chalk.red('A syntax error in the pnpmfile.js\n'));
console.error(chalk_1.default.red('A syntax error in the .pnpmfile.cjs\n'));
console.error(err);

@@ -82,7 +82,7 @@ process.exit(1);

function pnpmFileExistsSync(pnpmFilePath) {
const pnpmFileRealName = pnpmFilePath.endsWith('.js')
const pnpmFileRealName = pnpmFilePath.endsWith('.cjs')
? pnpmFilePath
: `${pnpmFilePath}.js`;
return fs.existsSync(pnpmFileRealName);
: `${pnpmFilePath}.cjs`;
return fs_1.default.existsSync(pnpmFileRealName);
}
//# sourceMappingURL=requirePnpmfile.js.map
{
"name": "@pnpm/pnpmfile",
"version": "0.1.21",
"description": "Reading a pnpmfile.js",
"version": "1.0.0",
"description": "Reading a .pnpmfile.cjs",
"main": "lib/index.js",

@@ -12,3 +12,3 @@ "typings": "lib/index.d.ts",

"engines": {
"node": ">=10.16"
"node": ">=12.17"
},

@@ -20,3 +20,3 @@ "scripts": {

"prepublishOnly": "pnpm run compile",
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build"
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix"
},

@@ -27,3 +27,2 @@ "repository": "https://github.com/pnpm/pnpm/blob/master/packages/pnpmfile",

],
"author": "Zoltan Kochan <z@kochan.io> (https://www.kochan.io/)",
"license": "MIT",

@@ -35,9 +34,9 @@ "bugs": {

"devDependencies": {
"@pnpm/logger": "^3.2.3",
"@pnpm/logger": "^4.0.0",
"@types/ramda": "^0.27.35"
},
"dependencies": {
"@pnpm/core-loggers": "5.0.3",
"@pnpm/error": "1.4.0",
"@pnpm/types": "6.4.0",
"@pnpm/core-loggers": "6.0.0",
"@pnpm/error": "2.0.0",
"@pnpm/types": "7.0.0",
"chalk": "^4.1.0",

@@ -48,5 +47,5 @@ "path-absolute": "^1.0.1",

"peerDependencies": {
"@pnpm/logger": "^3.2.3"
"@pnpm/logger": "^4.0.0"
},
"funding": "https://opencollective.com/pnpm"
}
# @pnpm/pnpmfile
> Reading a pnpmfile.js
> Reading a .pnpmfile.cjs

@@ -15,2 +15,2 @@ [![npm version](https://img.shields.io/npm/v/@pnpm/pnpmfile.svg)](https://www.npmjs.com/package/@pnpm/pnpmfile)

MIT © [Zoltan Kochan](https://www.kochan.io/)
MIT

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc