fix(build): make peer dependencies mandatory

This commit is contained in:
ppoffice 2022-04-04 16:15:57 -04:00
parent 3b14e37987
commit 5c6a5a8dd9
No known key found for this signature in database
GPG Key ID: D872802C1F2A16AA
4 changed files with 8 additions and 23 deletions

View File

@ -11,7 +11,4 @@ jobs:
with:
node-version: 12
- run: npm install
- run: >
npm install $(node -e "const deps=require('./package.json').peerDependencies;
console.log(Object.keys(deps).map(key=>key+'@'+deps[key]).join(' '));")
- run: npm run lint

View File

@ -32,8 +32,5 @@ jobs:
- run: >
npm install $(node -e "const deps=require('./themes/icarus/package.json').dependencies;
console.log(Object.keys(deps).map(key=>key+'@'+deps[key]).join(' '));")
- run: >
npm install $(node -e "const deps=require('./themes/icarus/package.json').peerDependencies;
console.log(Object.keys(deps).map(key=>key+'@'+deps[key]).join(' '));")
- run: npx hexo config theme icarus
- run: time NODE_ENV=production npx hexo g -b

View File

@ -21,7 +21,7 @@ module.exports = hexo => {
}
logger.info('=== Checking package dependencies ===');
const dependencies = Object.assign({}, packageInfo.peerDependencies, packageInfo.dependencies);
const dependencies = Object.assign({}, packageInfo.dependencies);
const missingDeps = Object.keys(dependencies)
.filter(name => !checkDependency(name, dependencies[name]));
if (missingDeps && missingDeps.length) {

View File

@ -21,33 +21,24 @@
"lint": "eslint --ext .js --ext .jsx --ext .json ."
},
"devDependencies": {
"bulma-stylus": "0.8.0",
"eslint": "^8.6.0",
"eslint-config-hexo": "^5.0.0",
"eslint-plugin-json": "^3.0.0",
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-react": "^7.17.0"
},
"dependencies": {
"bulma-stylus": "0.8.0",
"deepmerge": "^4.2.2",
"hexo": "^6.0.0",
"hexo-component-inferno": "^1.1.0",
"hexo-log": "^3.0.0",
"hexo-pagination": "^2.0.0",
"hexo-renderer-inferno": "^0.1.3",
"hexo-renderer-stylus": "^2.0.0",
"hexo-util": "^2.4.0"
},
"dependencies": {
"deepmerge": "^4.2.2",
"hexo-component-inferno": "^1.1.0",
"hexo-util": "^2.4.0",
"inferno": "^7.3.3",
"inferno-create-element": "^7.3.3",
"moment": "^2.22.2",
"semver": ">=5.0.0"
},
"peerDependencies": {
"bulma-stylus": "0.8.0",
"hexo": "^6.0.0",
"hexo-log": "^3.0.0",
"hexo-pagination": "^2.0.0",
"hexo-renderer-inferno": "^0.1.3",
"hexo-renderer-stylus": "^2.0.0",
"hexo-util": "^2.4.0"
}
}