@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Enable "strict" mode for NodeJS

Summary:
In particular, this changes the behavior of NodeJS in the following ways:

- Any attempt to get or modify the global object will result in an error.
- `null` values of `this` will no longer be evaluated to the global object and primitive values of this will not be converted to wrapper objects.
- Writing or deleting properties which have there writeable or configurable attributes set to false will now throw an error instead of failing silently.
- Adding a property to an object whose extensible attribute is false will also throw an error now.
- A functions arguments are not writeable so attempting to change them will now throw an error `arguments = [...]`.
- `with(){}` statements are gone.
- Use of `eval` is effectively banned.
- `eval` and `arguments` are not allowed as variable or function identifiers in any scope.
- The identifiers `implements`, `interface`, `let`, `package`, `private`, `protected`, `public`, `static` and `yield` are all now reserved for future use (roll on ES6).

Test Plan: Verified that Aphlict was still functional.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11430

+14 -1
+2
support/aphlict/server/aphlict_server.js
··· 1 + 'use strict'; 2 + 1 3 var JX = require('./lib/javelin').JX; 2 4 var http = require('http'); 3 5 var https = require('https');
+2
support/aphlict/server/lib/AphlictAdminServer.js
··· 1 + 'use strict'; 2 + 1 3 var JX = require('./javelin').JX; 2 4 3 5 require('./AphlictListenerList');
+2
support/aphlict/server/lib/AphlictClientServer.js
··· 1 + 'use strict'; 2 + 1 3 var JX = require('./javelin').JX; 2 4 3 5 require('./AphlictListenerList');
+2
support/aphlict/server/lib/AphlictListener.js
··· 1 + 'use strict'; 2 + 1 3 var JX = require('./javelin').JX; 2 4 3 5 JX.install('AphlictListener', {
+2
support/aphlict/server/lib/AphlictListenerList.js
··· 1 + 'use strict'; 2 + 1 3 var JX = require('./javelin').JX; 2 4 3 5 require('./AphlictListener');
+3 -1
support/aphlict/server/lib/AphlictLog.js
··· 1 + 'use strict'; 2 + 1 3 var JX = require('./javelin').JX; 2 4 3 5 var fs = require('fs'); ··· 22 24 this._logs.push(fs.createWriteStream(path, { 23 25 flags: 'a', 24 26 encoding: 'utf8', 25 - mode: 0664, 27 + mode: '0664', 26 28 })); 27 29 return this; 28 30 },
+1
support/lint/node.jshintrc
··· 12 12 13 13 "expr": true, 14 14 "loopfunc": true, 15 + "strict": true, 15 16 "sub": true, 16 17 17 18 "globals": {