Socket
Socket
Sign inDemoInstall

@commitlint/config-lerna-scopes

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/config-lerna-scopes - npm Package Compare versions

Comparing version 3.1.1 to 4.1.1

fixtures/basic/lerna.json

13

CHANGELOG.md
# Change Log
All notable changes to this project will be documented in this file.
See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="4.1.1"></a>
## [4.1.1](https://github.com/marionebl/commitlint/compare/v4.1.0...v4.1.1) (2017-10-09)
### Bug Fixes
* **config-lerna-scopes:** fix package list get with recent lerna versions ([8f35dae](https://github.com/marionebl/commitlint/commit/8f35dae))
<a name="3.0.4"></a>

@@ -7,0 +18,0 @@ ## 3.0.4 (2017-08-04)

21

index.js

@@ -1,2 +0,2 @@

const Repository = require('lerna/lib/Repository');
const importFrom = require('import-from');

@@ -6,11 +6,22 @@ module.exports = {

rules: {
'scope-enum': () => [2, 'always', getPackages()]
'scope-enum': ctx => [2, 'always', getPackages(ctx)]
}
};
function getPackages() {
const repo = new Repository(process.cwd());
return repo.packages
function getPackages(context) {
const ctx = context || {};
const cwd = ctx.cwd || process.cwd();
const Repository = importFrom(cwd, 'lerna/lib/Repository');
const PackageUtilities = importFrom(cwd, 'lerna/lib/PackageUtilities');
const repository = new Repository(cwd);
const packages = PackageUtilities.getPackages({
packageConfigs: repository.packageConfigs,
rootPath: cwd
});
return packages
.map(pkg => pkg.name)
.map(name => (name.charAt(0) === '@' ? name.split('/')[1] : name));
}
{
"name": "@commitlint/config-lerna-scopes",
"version": "3.1.1",
"version": "4.1.1",
"description": "Shareable commitlint config enforcing lerna package names as scopes",
"scripts": {
"pretest": "dep-check",
"test": "exit 0",
"test": "ava",
"clean": "exit 0"
},
"xo": false,
"ava": {
"files": [
"test.js"
],
"sources": [
"index.js",
"fixtures/**/*"
]
},
"repository": {

@@ -28,7 +37,10 @@ "type": "git",

"dependencies": {
"import-from": "^2.1.0",
"lerna": "^2.0.0"
},
"devDependencies": {
"@commitlint/utils": "^3.1.1"
"@commitlint/test": "^4.1.1",
"@commitlint/utils": "^3.1.1",
"ava": "^0.22.0"
}
}
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