[go: nahoru, domu]

Skip to content

Commit

Permalink
fix(build): make peer dependencies mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
ppoffice committed Apr 4, 2022
1 parent 3b14e37 commit 5c6a5a8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion include/dependency.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
23 changes: 7 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

1 comment on commit 5c6a5a8

@ppoffice
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.