metapak-sencrop
Advanced tools
Comparing version 5.1.3 to 6.0.0
@@ -44,3 +44,3 @@ <!-- | ||
``` | ||
If the result is lower than 6.10.0, there is | ||
If the result is lower than 8.10.0, there is | ||
poor chances we even have a look to it. Please, | ||
@@ -47,0 +47,0 @@ use the last [NodeJS LTS version](https://nodejs.org/en/). |
@@ -0,1 +1,6 @@ | ||
<a name="6.0.0"></a> | ||
# [6.0.0](https://github.com/sencrop/metapak-sencrop/compare/v5.1.3...v6.0.0) (2018-09-21) | ||
<a name="5.1.3"></a> | ||
@@ -2,0 +7,0 @@ ## [5.1.3](https://github.com/sencrop/metapak-sencrop/compare/v5.1.2...v5.1.3) (2018-07-30) |
{ | ||
"name": "metapak-sencrop", | ||
"version": "5.1.3", | ||
"version": "6.0.0", | ||
"description": "A `metapak` plugin for Sencrop projects", | ||
@@ -21,9 +21,11 @@ "main": "index.js", | ||
"cli": "env NODE_ENV=${NODE_ENV:-cli}", | ||
"cover": "jest --coverage", | ||
"cover": "NODE_ENV=${NODE_ENV:-test} jest --coverage", | ||
"cz": "env NODE_ENV=${NODE_ENV:-cli} git cz", | ||
"jest": "NODE_ENV=${NODE_ENV:-test} jest", | ||
"lint": "eslint src/**/*.js", | ||
"metapak": "metapak", | ||
"precz": "npm run lint && npm run metapak -- -s && npm t", | ||
"prettier": "prettier --write src/**/*.js", | ||
"preversion": "npm t && npm run lint", | ||
"test": "jest", | ||
"preversion": "npm t && npm run lint && npm run metapak -- -s", | ||
"test": "npm run jest", | ||
"version": "npm run changelog && git add CHANGELOG.md" | ||
@@ -48,14 +50,15 @@ }, | ||
"devDependencies": { | ||
"commitizen": "^2.9.6", | ||
"conventional-changelog-cli": "^1.3.22", | ||
"commitizen": "^2.10.1", | ||
"conventional-changelog-cli": "^2.0.5", | ||
"cz-conventional-changelog": "^2.1.0", | ||
"eslint": "^4.19.1", | ||
"eslint-plugin-prettier": "^2.6.0", | ||
"jest": "^22.4.3", | ||
"eslint": "^5.6.0", | ||
"eslint-plugin-import": "^2.14.0", | ||
"eslint-plugin-prettier": "^2.6.2", | ||
"jest": "^23.6.0", | ||
"metapak": "^1.0.3", | ||
"prettier": "^1.12.1", | ||
"sinon": "^5.0.3" | ||
"prettier": "^1.14.3", | ||
"sinon": "^6.3.4" | ||
}, | ||
"engines": { | ||
"node": ">=6.10.0" | ||
"node": ">=8.10.0" | ||
}, | ||
@@ -67,3 +70,5 @@ "config": { | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"escape-string-regexp": "^1.0.5" | ||
}, | ||
"jest": { | ||
@@ -74,3 +79,30 @@ "coverageReporters": [ | ||
"testEnvironment": "node" | ||
}, | ||
"eslintConfig": { | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": 9 | ||
}, | ||
"env": { | ||
"es6": true, | ||
"node": true, | ||
"jest": true, | ||
"mocha": true | ||
}, | ||
"plugins": [ | ||
"prettier", | ||
"import" | ||
], | ||
"rules": { | ||
"prettier/prettier": "error" | ||
} | ||
}, | ||
"prettier": { | ||
"semi": true, | ||
"printWidth": 80, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"proseWrap": "always" | ||
} | ||
} |
@@ -6,5 +6,5 @@ 'use strict'; | ||
module.exports = { | ||
lastNodeLTS: '6.10.0', | ||
lastNode: '10.0.0', | ||
lastNodeLTS: '8.10.0', | ||
lastNode: '10.11.0', | ||
apiPath: 'API.md', | ||
}; |
@@ -19,8 +19,36 @@ 'use strict'; | ||
packageConf.devDependencies = packageConf.devDependencies || {}; | ||
packageConf.devDependencies.eslint = '^4.19.1'; | ||
delete packageConf.devDependencies['eslint-config-simplifield']; | ||
packageConf.devDependencies.prettier = '^1.12.1'; | ||
packageConf.devDependencies['eslint-plugin-prettier'] = '^2.6.0'; | ||
packageConf.devDependencies.eslint = '^5.6.0'; | ||
packageConf.devDependencies.prettier = '^1.14.3'; | ||
packageConf.devDependencies['eslint-plugin-prettier'] = '^2.6.2'; | ||
packageConf.devDependencies['eslint-plugin-import'] = '^2.14.0'; | ||
// Add eslint config | ||
packageConf.eslintConfig = { | ||
extends: 'eslint:recommended', | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 9, | ||
}, | ||
env: { | ||
es6: true, | ||
node: true, | ||
jest: true, | ||
mocha: true, | ||
}, | ||
plugins: ['prettier', 'import'], | ||
rules: { | ||
'prettier/prettier': 'error', | ||
}, | ||
}; | ||
// Add prettier config | ||
packageConf.prettier = { | ||
semi: true, | ||
printWidth: 80, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
proseWrap: 'always', | ||
}; | ||
return packageConf; | ||
}; |
@@ -15,3 +15,3 @@ 'use strict'; | ||
}, | ||
}) | ||
}), | ||
).toMatchSnapshot(); | ||
@@ -18,0 +18,0 @@ }); |
@@ -23,3 +23,3 @@ 'use strict'; | ||
'pre-commit': ['npm t', PRE_COMMIT_ARCHITECTURE], | ||
} | ||
}, | ||
); | ||
@@ -26,0 +26,0 @@ }); |
@@ -15,5 +15,5 @@ 'use strict'; | ||
packageConf.devDependencies = packageConf.devDependencies || {}; | ||
packageConf.devDependencies.jsarch = '1.2.7'; | ||
packageConf.devDependencies.jsarch = '^1.3.0'; | ||
return packageConf; | ||
}; |
@@ -15,3 +15,3 @@ 'use strict'; | ||
}, | ||
}) | ||
}), | ||
).toMatchSnapshot(); | ||
@@ -18,0 +18,0 @@ }); |
@@ -23,3 +23,3 @@ 'use strict'; | ||
'pre-commit': ['npm t', PRE_COMMIT_DOC], | ||
} | ||
}, | ||
); | ||
@@ -26,0 +26,0 @@ }); |
@@ -15,3 +15,3 @@ 'use strict'; | ||
}, | ||
}) | ||
}), | ||
).toMatchSnapshot(); | ||
@@ -18,0 +18,0 @@ }); |
@@ -16,4 +16,4 @@ 'use strict'; | ||
}, | ||
{} | ||
) | ||
{}, | ||
), | ||
).toMatchSnapshot(); | ||
@@ -29,3 +29,3 @@ }); | ||
}, | ||
{} | ||
{}, | ||
), | ||
@@ -35,3 +35,3 @@ { | ||
data: 'Carpe diem\n', | ||
} | ||
}, | ||
); | ||
@@ -38,0 +38,0 @@ }); |
@@ -14,9 +14,4 @@ 'use strict'; | ||
fi`; | ||
const PRE_COMMIT_QUALITY_CHECK = 'npm run lint || exit 1'; | ||
const PRE_COMMIT_METAPAK_RUN = 'npm run metapak || exit 1'; | ||
module.exports = hooks => { | ||
hooks['pre-commit'] = hooks['pre-commit'] || []; | ||
hooks['pre-commit'].push(PRE_COMMIT_METAPAK_RUN); | ||
hooks['pre-commit'].push(PRE_COMMIT_QUALITY_CHECK); | ||
hooks['commit-msg'] = hooks['commit-msg'] || []; | ||
@@ -23,0 +18,0 @@ hooks['commit-msg'].push(COMMIT_MSG_COMMITIZEN_CHECK); |
@@ -17,4 +17,2 @@ 'use strict'; | ||
fi`; | ||
const PRE_COMMIT_QUALITY_CHECK = 'npm run lint || exit 1'; | ||
const PRE_COMMIT_METAPAK_RUN = 'npm run metapak || exit 1'; | ||
@@ -25,3 +23,2 @@ describe('Main', () => { | ||
assert.deepEqual(hooksTransformer({}), { | ||
'pre-commit': [PRE_COMMIT_METAPAK_RUN, PRE_COMMIT_QUALITY_CHECK], | ||
'commit-msg': [COMMIT_MSG_COMMITIZEN_CHECK], | ||
@@ -28,0 +25,0 @@ }); |
'use strict'; | ||
const config = require('../config.js'); | ||
const { ensureScript } = require('../utils'); | ||
const GITHUB_REPOSITORY_REGEXP = /git\+https:\/\/github.com\/([a-zA-Z0-9-]+)\/([a-zA-Z0-9-]+)\.git/; | ||
const LINT_SCRIPT = 'npm run lint'; | ||
const METAPAK_CHECK_SCRIPT = 'npm run metapak -- -s'; | ||
@@ -24,2 +27,10 @@ module.exports = packageConf => { | ||
// Lets use commitizen | ||
packageConf.scripts.precz = ensureScript( | ||
packageConf.scripts.precz, | ||
LINT_SCRIPT, | ||
); | ||
packageConf.scripts.precz = ensureScript( | ||
packageConf.scripts.precz, | ||
METAPAK_CHECK_SCRIPT, | ||
); | ||
packageConf.scripts.cz = 'env NODE_ENV=${NODE_ENV:-cli} git cz'; | ||
@@ -37,16 +48,16 @@ packageConf.config = { | ||
packageConf.scripts.lint = 'echo "WARNING: No linter configured"'; | ||
packageConf.scripts.preversion = packageConf.scripts.preversion | ||
? packageConf.scripts.preversion + | ||
(/(^| && )npm run lint($| && )/.test(packageConf.scripts.preversion) | ||
? '' | ||
: ' && npm run lint') | ||
: 'npm run lint'; | ||
// Add the MUST HAVE dependencies: | ||
packageConf.dependencies = packageConf.dependencies || {}; | ||
packageConf.scripts.preversion = ensureScript( | ||
packageConf.scripts.preversion, | ||
LINT_SCRIPT, | ||
); | ||
packageConf.scripts.preversion = ensureScript( | ||
packageConf.scripts.preversion, | ||
METAPAK_CHECK_SCRIPT, | ||
); | ||
// Add the MUST HAVE dev dependencies | ||
packageConf.devDependencies = packageConf.devDependencies || {}; | ||
packageConf.devDependencies.commitizen = '^2.9.6'; | ||
packageConf.devDependencies.commitizen = '^2.10.1'; | ||
packageConf.devDependencies['cz-conventional-changelog'] = '^2.1.0'; | ||
packageConf.devDependencies['conventional-changelog-cli'] = '^1.3.22'; | ||
packageConf.devDependencies['conventional-changelog-cli'] = '^2.0.5'; | ||
@@ -53,0 +64,0 @@ // This job is already done by NPM, but once,. |
@@ -15,3 +15,3 @@ 'use strict'; | ||
}, | ||
}) | ||
}), | ||
).toMatchSnapshot(); | ||
@@ -18,0 +18,0 @@ }); |
@@ -38,3 +38,3 @@ 'use strict'; | ||
log, | ||
} | ||
}, | ||
) | ||
@@ -56,3 +56,3 @@ .then(file => { | ||
{}, | ||
{} | ||
{}, | ||
), | ||
@@ -62,3 +62,3 @@ { | ||
data: 'Carpe diem\n', | ||
} | ||
}, | ||
); | ||
@@ -65,0 +65,0 @@ }); |
'use strict'; | ||
const { ensureScript } = require('../utils'); | ||
const TEST_SCRIPT = 'npm t'; | ||
const JEST_SCRIPT = 'npm run jest'; | ||
module.exports = packageConf => { | ||
// Let's add test scripts | ||
packageConf.scripts = packageConf.scripts || {}; | ||
packageConf.scripts.test = 'jest'; | ||
packageConf.scripts.cover = 'jest --coverage'; | ||
packageConf.scripts.preversion = packageConf.scripts.preversion | ||
? packageConf.scripts.preversion + | ||
(/(^| && )npm t($| && )/.test(packageConf.scripts.preversion) | ||
? '' | ||
: ' && npm t') | ||
: 'npm t'; | ||
packageConf.scripts.jest = 'NODE_ENV=${NODE_ENV:-test} jest'; | ||
packageConf.scripts.cover = 'NODE_ENV=${NODE_ENV:-test} jest --coverage'; | ||
packageConf.scripts.test = ensureScript( | ||
packageConf.scripts.test, | ||
JEST_SCRIPT, | ||
); | ||
packageConf.scripts.preversion = ensureScript( | ||
packageConf.scripts.preversion, | ||
TEST_SCRIPT, | ||
); | ||
packageConf.scripts.precz = ensureScript( | ||
packageConf.scripts.precz, | ||
TEST_SCRIPT, | ||
); | ||
@@ -23,4 +34,4 @@ // Add the jest config | ||
packageConf.devDependencies = packageConf.devDependencies || {}; | ||
packageConf.devDependencies.jest = '^22.4.3'; | ||
packageConf.devDependencies.sinon = '^5.0.3'; | ||
packageConf.devDependencies.jest = '^23.6.0'; | ||
packageConf.devDependencies.sinon = '^6.3.4'; | ||
delete packageConf.devDependencies.istanbul; | ||
@@ -27,0 +38,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
43258
2
10
57
605
+ Addedescape-string-regexp@^1.0.5
+ Addedescape-string-regexp@1.0.5(transitive)