Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for #942, require.cache.hasOwnProperty call for Node 8 #947

Merged
merged 3 commits into from
Sep 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### Dependencies

- `npm install -g rimraf`
- `npm install -g lerna`
- `npm install -g del-cli`

### Deployment Checklist

- `git checkout master && git pull upstream master`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"bootstrap-no-i": "lerna bootstrap",
"test": "lerna run test",
"clean": "rimraf lerna-debug.log && lerna run clean",
"nuke": "npm run clean && lerna clean --yes && rm -r node_modules",
"nuke": "npm run clean && lerna clean --yes && rm -rf node_modules",
"changelog": "lerna-changelog",
"debug": "cat lerna-debug.log && for d in packages/*/npm-debug.log*; do echo $d; cat $d; done",
"postinstall": "npm run bootstrap-no-i",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-server-cli/src/serverSideHotModuleReload.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function serverSideHotModuleReload (webpackStats) {
// For now, loop through all of the project code to remove require caches so that we ensure the server is most up
// to date.
Object.keys(require.cache).map((filename) => {
if (/node_modules/.test(filename) === false && require.cache.hasOwnProperty(filename)) {
if (/node_modules/.test(filename) === false && Object.prototype.hasOwnProperty.call(require.cache, filename)) {
logger.info(`Reloading file: ${filename}`);
delete require.cache[filename];
}
Expand Down