[Pkg-javascript-commits] [node-optimist] 31/33: Update 01-migrate_to_nodejs.patch, more node -> nodejs substitutions.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri Feb 27 23:21:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository node-optimist.

commit e25652607c0063a82b668d9ade577f9c1a4e38da
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Feb 28 00:01:01 2015 +0100

    Update 01-migrate_to_nodejs.patch, more node -> nodejs substitutions.
---
 debian/changelog                          |   1 +
 debian/patches/01-migrate_to_nodejs.patch | 329 +++++++++++++++++++++++++-----
 2 files changed, 281 insertions(+), 49 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1170cdc..c910c50 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,7 @@ node-optimist (0.6.1-1) UNRELEASED; urgency=medium
   * Add dependency on node-minimist.
   * Add upstream metadata.
   * Add gbp.conf to use pristine-tar by default.
+  * Update 01-migrate_to_nodejs.patch, more node -> nodejs substitutions.
 
  -- Bas Couwenberg <sebastic at debian.org>  Fri, 27 Feb 2015 20:24:43 +0100
 
diff --git a/debian/patches/01-migrate_to_nodejs.patch b/debian/patches/01-migrate_to_nodejs.patch
index 5f85cae..24d15de 100644
--- a/debian/patches/01-migrate_to_nodejs.patch
+++ b/debian/patches/01-migrate_to_nodejs.patch
@@ -2,129 +2,360 @@ From: David Paleino <dapal at debian.org>
 Subject: migrate from node to nodejs
 Forwarded: not-needed
 
----
- example/bool.js               |    2 +-
- example/boolean_double.js     |    2 +-
- example/boolean_single.js     |    2 +-
- example/default_hash.js       |    2 +-
- example/default_singles.js    |    2 +-
- example/divide.js             |    2 +-
- example/line_count.js         |    2 +-
- example/line_count_options.js |    2 +-
- example/line_count_wrap.js    |    2 +-
- example/nonopt.js             |    2 +-
- example/reflect.js            |    2 +-
- example/short.js              |    2 +-
- example/string.js             |    2 +-
- example/xup.js                |    2 +-
- 14 files changed, 14 insertions(+), 14 deletions(-)
-
---- node-optimist.orig/example/bool.js
-+++ node-optimist/example/bool.js
+--- a/example/bool.js
++++ b/example/bool.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  var util = require('util');
  var argv = require('optimist').argv;
  
---- node-optimist.orig/example/boolean_double.js
-+++ node-optimist/example/boolean_double.js
+--- a/example/boolean_double.js
++++ b/example/boolean_double.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  var argv = require('optimist')
      .boolean(['x','y','z'])
      .argv
---- node-optimist.orig/example/boolean_single.js
-+++ node-optimist/example/boolean_single.js
+--- a/example/boolean_single.js
++++ b/example/boolean_single.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  var argv = require('optimist')
      .boolean('v')
      .argv
---- node-optimist.orig/example/default_hash.js
-+++ node-optimist/example/default_hash.js
+--- a/example/default_hash.js
++++ b/example/default_hash.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  
  var argv = require('optimist')
      .default({ x : 10, y : 10 })
---- node-optimist.orig/example/default_singles.js
-+++ node-optimist/example/default_singles.js
+--- a/example/default_singles.js
++++ b/example/default_singles.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  var argv = require('optimist')
      .default('x', 10)
      .default('y', 10)
---- node-optimist.orig/example/divide.js
-+++ node-optimist/example/divide.js
+--- a/example/divide.js
++++ b/example/divide.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  
  var argv = require('optimist')
      .usage('Usage: $0 -x [num] -y [num]')
---- node-optimist.orig/example/line_count.js
-+++ node-optimist/example/line_count.js
+--- a/example/line_count.js
++++ b/example/line_count.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  var argv = require('optimist')
      .usage('Count the lines in a file.\nUsage: $0')
      .demand('f')
---- node-optimist.orig/example/line_count_options.js
-+++ node-optimist/example/line_count_options.js
+--- a/example/line_count_options.js
++++ b/example/line_count_options.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  var argv = require('optimist')
      .usage('Count the lines in a file.\nUsage: $0')
      .options({
---- node-optimist.orig/example/line_count_wrap.js
-+++ node-optimist/example/line_count_wrap.js
+--- a/example/line_count_wrap.js
++++ b/example/line_count_wrap.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  var argv = require('optimist')
      .usage('Count the lines in a file.\nUsage: $0')
      .wrap(80)
---- node-optimist.orig/example/nonopt.js
-+++ node-optimist/example/nonopt.js
+--- a/example/nonopt.js
++++ b/example/nonopt.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  var argv = require('optimist').argv;
  console.log('(%d,%d)', argv.x, argv.y);
  console.log(argv._);
---- node-optimist.orig/example/reflect.js
-+++ node-optimist/example/reflect.js
-@@ -1,2 +1,2 @@
--#!/usr/bin/env node
-+#!/usr/bin/nodejs
- console.dir(require('optimist').argv);
---- node-optimist.orig/example/short.js
-+++ node-optimist/example/short.js
+--- a/example/short.js
++++ b/example/short.js
 @@ -1,3 +1,3 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  var argv = require('optimist').argv;
  console.log('(%d,%d)', argv.x, argv.y);
---- node-optimist.orig/example/string.js
-+++ node-optimist/example/string.js
+--- a/example/string.js
++++ b/example/string.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  var argv = require('optimist')
      .string('x', 'y')
      .argv
---- node-optimist.orig/example/xup.js
-+++ node-optimist/example/xup.js
+--- a/example/xup.js
++++ b/example/xup.js
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env node
 +#!/usr/bin/nodejs
  var argv = require('optimist').argv;
  
  if (argv.rif - 5 * argv.xup > 7.138) {
+--- a/readme.markdown
++++ b/readme.markdown
+@@ -29,7 +29,7 @@ With Optimist, the options are just a ha
+ xup.js:
+ 
+ ````javascript
+-#!/usr/bin/env node
++#!/usr/bin/nodejs
+ var argv = require('optimist').argv;
+ 
+ if (argv.rif - 5 * argv.xup > 7.138) {
+@@ -56,7 +56,7 @@ But wait! There's more! You can do short
+ short.js:
+ 
+ ````javascript
+-#!/usr/bin/env node
++#!/usr/bin/nodejs
+ var argv = require('optimist').argv;
+ console.log('(%d,%d)', argv.x, argv.y);
+ ````
+@@ -72,7 +72,7 @@ And booleans, both long and short (and g
+ bool.js:
+ 
+ ````javascript
+-#!/usr/bin/env node
++#!/usr/bin/nodejs
+ var util = require('util');
+ var argv = require('optimist').argv;
+ 
+@@ -101,7 +101,7 @@ And non-hypenated options too! Just use
+ nonopt.js:
+ 
+ ````javascript
+-#!/usr/bin/env node
++#!/usr/bin/nodejs
+ var argv = require('optimist').argv;
+ console.log('(%d,%d)', argv.x, argv.y);
+ console.log(argv._);
+@@ -123,7 +123,7 @@ Plus, Optimist comes with .usage() and .
+ divide.js:
+ 
+ ````javascript
+-#!/usr/bin/env node
++#!/usr/bin/nodejs
+ var argv = require('optimist')
+     .usage('Usage: $0 -x [num] -y [num]')
+     .demand(['x','y'])
+@@ -137,8 +137,8 @@ console.log(argv.x / argv.y);
+     $ ./divide.js -x 55 -y 11
+     5
+     
+-    $ node ./divide.js -x 4.91 -z 2.51
+-    Usage: node ./divide.js -x [num] -y [num]
++    $ nodejs ./divide.js -x 4.91 -z 2.51
++    Usage: nodejs ./divide.js -x [num] -y [num]
+ 
+     Options:
+       -x  [required]
+@@ -152,7 +152,7 @@ EVEN MORE HOLY COW
+ default_singles.js:
+ 
+ ````javascript
+-#!/usr/bin/env node
++#!/usr/bin/nodejs
+ var argv = require('optimist')
+     .default('x', 10)
+     .default('y', 10)
+@@ -169,7 +169,7 @@ console.log(argv.x + argv.y);
+ default_hash.js:
+ 
+ ````javascript
+-#!/usr/bin/env node
++#!/usr/bin/nodejs
+ var argv = require('optimist')
+     .default({ x : 10, y : 10 })
+     .argv
+@@ -188,7 +188,7 @@ And if you really want to get all descri
+ boolean_single.js
+ 
+ ````javascript
+-#!/usr/bin/env node
++#!/usr/bin/nodejs
+ var argv = require('optimist')
+     .boolean('v')
+     .argv
+@@ -205,7 +205,7 @@ console.dir(argv);
+ boolean_double.js
+ 
+ ````javascript
+-#!/usr/bin/env node
++#!/usr/bin/nodejs
+ var argv = require('optimist')
+     .boolean(['x','y','z'])
+     .argv
+@@ -229,7 +229,7 @@ out how to format a handy help string au
+ line_count.js
+ 
+ ````javascript
+-#!/usr/bin/env node
++#!/usr/bin/nodejs
+ var argv = require('optimist')
+     .usage('Count the lines in a file.\nUsage: $0')
+     .demand('f')
+@@ -253,19 +253,19 @@ s.on('end', function () {
+ 
+ ***
+ 
+-    $ node line_count.js
++    $ nodejs line_count.js
+     Count the lines in a file.
+-    Usage: node ./line_count.js
++    Usage: nodejs ./line_count.js
+ 
+     Options:
+       -f, --file  Load a file  [required]
+ 
+     Missing required arguments: f
+ 
+-    $ node line_count.js --file line_count.js 
++    $ nodejs line_count.js --file line_count.js 
+     20
+     
+-    $ node line_count.js -f line_count.js 
++    $ nodejs line_count.js -f line_count.js 
+     20
+ 
+ methods
+@@ -428,9 +428,9 @@ stop parsing
+ 
+ Use `--` to stop parsing flags and stuff the remainder into `argv._`.
+ 
+-    $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4
++    $ nodejs examples/reflect.js -a 1 -b 2 -- -c 3 -d 4
+     { _: [ '-c', '3', '-d', '4' ],
+-      '$0': 'node ./examples/reflect.js',
++      '$0': 'nodejs ./examples/reflect.js',
+       a: 1,
+       b: 2 }
+ 
+@@ -440,9 +440,9 @@ negate fields
+ If you want to explicity set a field to false instead of just leaving it
+ undefined or to override a default you can do `--no-key`.
+ 
+-    $ node examples/reflect.js -a --no-b
++    $ nodejs examples/reflect.js -a --no-b
+     { _: [],
+-      '$0': 'node ./examples/reflect.js',
++      '$0': 'nodejs ./examples/reflect.js',
+       a: true,
+       b: false }
+ 
+@@ -460,9 +460,9 @@ duplicates
+ If you specify a flag multiple times it will get turned into an array containing
+ all the values in order.
+ 
+-    $ node examples/reflect.js -x 5 -x 8 -x 0
++    $ nodejs examples/reflect.js -x 5 -x 8 -x 0
+     { _: [],
+-      '$0': 'node ./examples/reflect.js',
++      '$0': 'nodejs ./examples/reflect.js',
+         x: [ 5, 8, 0 ] }
+ 
+ dot notation
+@@ -471,9 +471,9 @@ dot notation
+ When you use dots (`.`s) in argument names, an implicit object path is assumed.
+ This lets you organize arguments into nested objects.
+ 
+-     $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5
++     $ nodejs examples/reflect.js --foo.bar.baz=33 --foo.quux=5
+      { _: [],
+-       '$0': 'node ./examples/reflect.js',
++       '$0': 'nodejs ./examples/reflect.js',
+          foo: { bar: { baz: 33 }, quux: 5 } }
+ 
+ short numbers
+@@ -481,11 +481,11 @@ short numbers
+ 
+ Short numeric `head -n5` style argument work too:
+ 
+-    $ node reflect.js -n123 -m456
++    $ nodejs reflect.js -n123 -m456
+     { '3': true,
+       '6': true,
+       _: [],
+-      '$0': 'node ./reflect.js',
++      '$0': 'nodejs ./reflect.js',
+       n: 123,
+       m: 456 }
+ 
+--- a/test/_.js
++++ b/test/_.js
+@@ -5,12 +5,12 @@ test('dotSlashEmpty', testCmd('./bin.js'
+ 
+ test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ]));
+ 
+-test('nodeEmpty', testCmd('node bin.js', []));
++test('nodeEmpty', testCmd('nodejs bin.js', []));
+ 
+-test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ]));
++test('nodeArgs', testCmd('nodejs bin.js', [ 'x', 'y', 'z' ]));
+ 
+ test('whichNodeEmpty', function (t) {
+-    var which = spawn('which', ['node']);
++    var which = spawn('which', ['nodejs']);
+     
+     which.stdout.on('data', function (buf) {
+         t.test(
+@@ -26,7 +26,7 @@ test('whichNodeEmpty', function (t) {
+ });
+ 
+ test('whichNodeArgs', function (t) {
+-    var which = spawn('which', ['node']);
++    var which = spawn('which', ['nodejs']);
+ 
+     which.stdout.on('data', function (buf) {
+         t.test(
+--- a/test/_/bin.js
++++ b/test/_/bin.js
+@@ -1,3 +1,3 @@
+-#!/usr/bin/env node
++#!/usr/bin/nodejs
+ var argv = require('../../index').argv
+ console.log(JSON.stringify(argv._));
+--- a/test/parse.js
++++ b/test/parse.js
+@@ -2,7 +2,7 @@ var optimist = require('../index');
+ var path = require('path');
+ var test = require('tap').test;
+ 
+-var $0 = 'node ./' + path.relative(process.cwd(), __filename);
++var $0 = 'nodejs ./' + path.relative(process.cwd(), __filename);
+ 
+ test('short boolean', function (t) {
+     var parse = optimist.parse([ '-b' ]);
+@@ -251,7 +251,7 @@ test('newlines in params' , function (t)
+     // reproduce in bash:
+     // VALUE="new
+     // line"
+-    // node program.js --s="$VALUE"
++    // nodejs program.js --s="$VALUE"
+     args = optimist.parse([ "--s=X\nX" ])
+     t.same(args, { _ : [], s : "X\nX", $0 : $0 });
+     t.end();
+--- a/test/usage.js
++++ b/test/usage.js
+@@ -263,7 +263,7 @@ function checkUsage (f) {
+     process._argv = process.argv;
+ 
+     process.exit = function (t) { exit = true };
+-    process.env = Hash.merge(process.env, { _ : 'node' });
++    process.env = Hash.merge(process.env, { _ : 'nodejs' });
+     process.argv = [ './usage' ];
+ 
+     var errors = [];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/node-optimist.git



More information about the Pkg-javascript-commits mailing list