From 12f71e01d02a2f4cc76cb8471036992e0cba9cf1 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Sat, 20 Oct 2012 11:12:21 +0300 Subject: alternate hack to disable deprecation warning ref #9, close #20 --- tools/node.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'tools') diff --git a/tools/node.js b/tools/node.js index 6a21710a..86df2a9f 100644 --- a/tools/node.js +++ b/tools/node.js @@ -1,27 +1,25 @@ -var save_stderr = process.stderr; +var path = require("path"); var fs = require("fs"); -// discard annoying NodeJS warning ("path.existsSync is now called `fs.existsSync`.") -var devnull = fs.createWriteStream("/dev/null"); -process.__defineGetter__("stderr", function(){ - return devnull; -}); +// Avoid NodeJS warning. +// +// There's a --no-deprecation command line argument supported by +// NodeJS, but that's tricky to use, so I'd like to set it from the +// program itself. Turns out you need to set `process.noDeprecation`, +// but by the time you can set that the `path` module is already +// loaded and `path.existsSync` is already changed to display that +// warning, therefore here's the poor solution: +path.existsSync = fs.existsSync; var vm = require("vm"); var sys = require("util"); -var path = require("path"); var UglifyJS = vm.createContext({ sys : sys, console : console, - MOZ_SourceMap : require("source-map") }); -process.__defineGetter__("stderr", function(){ - return save_stderr; -}); - function load_global(file) { file = path.resolve(path.dirname(module.filename), file); try { -- cgit v1.2.3 ut type='hidden' name='id' value='4ecb544a6d360a86b7f2642cd06ee74829d10f96'/>
path: root/gnu/system
AgeCommit message (Expand)Author
2020-04-10vm: Use virtio network driver....Marius Bakke
2020-04-10vm: 'system-disk-image' honors #:substitutable? for ISO9660 images....Ludovic Courtès
2020-04-08vm: Allow images to be marked as non-substitutable....Ludovic Courtès
2020-04-06system: Allow for comma-separated keyboard layouts....Ludovic Courtès
2020-04-02system: Add xterm to lightweight-desktop example....Ludovic Courtès
2020-04-01system: Move nanorc to XDG_CONFIG_HOME....Efraim Flashner
2020-03-30Revert "system: Move nanorc to XDG_CONFIG_HOME."...Leo Famulari
2020-03-30system: Move nanorc to XDG_CONFIG_HOME....Efraim Flashner
2020-03-26vm: Distinguish between success and failure of the guest code....Ludovic Courtès
2020-03-22gnu: linux-libre-arm-veyron: Deprecate package....Vagrant Cascadian
2020-03-19gnu: system: Remove guile-wm from skeleton....Jan Nieuwenhuizen
2020-03-10vm: Compute UUIDs truly deterministically....Ludovic Courtès
2020-03-02file-systems: Add a 'file-system-device->string' procedure....Maxim Cournoyer
2020-01-06system: linux-container: Recommend guix container....Efraim Flashner
2020-01-03install: Add jfsutils to the installation image....Tobias Geerinckx-Rice
2020-01-03linux-initrd: Add support for JFS....Tobias Geerinckx-Rice
2020-01-03uuid: Add support for JFS....Tobias Geerinckx-Rice
2019-12-18gnu: Remove uses of deprecated Qemu network configuration....Marius Bakke