@pnpm/pnpmfile
Advanced tools
Comparing version 0.1.21 to 1.0.0
# @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 @@ |
"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) |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
14439
204
1
1
+ Added@pnpm/core-loggers@6.0.0(transitive)
+ Added@pnpm/error@2.0.0(transitive)
+ Added@pnpm/logger@4.0.0(transitive)
+ Added@pnpm/types@7.0.0(transitive)
+ Addedbole@4.0.1(transitive)
+ Addedfast-safe-stringify@2.1.1(transitive)
+ Addedndjson@2.0.0(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsplit2@3.2.2(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedthrough2@4.0.2(transitive)
- Removed@pnpm/core-loggers@5.0.3(transitive)
- Removed@pnpm/error@1.4.0(transitive)
- Removed@pnpm/logger@3.2.3(transitive)
- Removed@pnpm/types@6.4.0(transitive)
- Removed@zkochan/bole@3.0.4(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedfast-safe-stringify@1.1.13(transitive)
- Removedisarray@1.0.0(transitive)
- Removedndjson@1.5.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsplit2@2.2.0(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedthrough2@2.0.5(transitive)
- Removedxtend@4.0.2(transitive)
Updated@pnpm/core-loggers@6.0.0
Updated@pnpm/error@2.0.0
Updated@pnpm/types@7.0.0