[Pkg-javascript-commits] [node-yarnpkg] 01/01: refresh patches

Paolo Greppi paolog-guest at moszumanska.debian.org
Mon Jan 8 10:31:05 UTC 2018


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

paolog-guest pushed a commit to branch master
in repository node-yarnpkg.

commit 9ba92fd88e9fabb989b7f362b453f0de0aeb143a
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date:   Mon Jan 8 11:30:59 2018 +0100

    refresh patches
---
 .../patches/{01-cmd-shim.diff => 00-cmd-shim.diff} | 20 ++++--
 debian/patches/00-nodejs.diff                      | 80 ----------------------
 debian/patches/01-is-ci.diff                       | 58 ++++++++++++++++
 debian/patches/02-is-ci.diff                       | 48 -------------
 debian/patches/{03-leven.diff => 02-leven.diff}    |  6 +-
 .../{05-gulp-watch.diff => 03-gulp-watch.diff}     |  8 +--
 .../patches/{06-gulp-if.diff => 04-gulp-if.diff}   | 22 +++---
 debian/patches/04-user-home.diff                   | 47 -------------
 debian/patches/07-gulp-babel.diff                  | 26 -------
 debian/patches/series                              | 13 ++--
 10 files changed, 96 insertions(+), 232 deletions(-)

diff --git a/debian/patches/01-cmd-shim.diff b/debian/patches/00-cmd-shim.diff
similarity index 54%
rename from debian/patches/01-cmd-shim.diff
rename to debian/patches/00-cmd-shim.diff
index 26f7947..9d510ff 100644
--- a/debian/patches/01-cmd-shim.diff
+++ b/debian/patches/00-cmd-shim.diff
@@ -6,19 +6,29 @@ Index: node-yarnpkg/src/package-linker.js
 ===================================================================
 --- node-yarnpkg.orig/src/package-linker.js
 +++ node-yarnpkg/src/package-linker.js
-@@ -13,7 +13,6 @@ import {entries} from './util/misc.js';
+@@ -12,12 +12,10 @@ import * as constants from './constants.
+ import * as promise from './util/promise.js';
+ import {entries} from './util/misc.js';
  import * as fs from './util/fs.js';
+-import lockMutex from './util/mutex.js';
+ import {satisfiesWithPreleases} from './util/semver.js';
+ import WorkspaceLayout from './workspace-layout.js';
  
  const invariant = require('invariant');
 -const cmdShim = promise.promisify(require('cmd-shim'));
- const semver = require('semver');
  const path = require('path');
- 
-@@ -24,7 +23,7 @@ type DependencyPairs = Array<{
+ // Concurrency for creating bin links disabled because of the issue #1961
+ const linkBinConcurrency = 1;
+@@ -29,12 +27,7 @@ type DependencyPairs = Array<{
  
  export async function linkBin(src: string, dest: string): Promise<void> {
    if (process.platform === 'win32') {
--    await cmdShim(src, dest);
+-    const unlockMutex = await lockMutex(src);
+-    try {
+-      await cmdShim(src, dest);
+-    } finally {
+-      unlockMutex();
+-    }
 +    ;
    } else {
      await fs.mkdirp(path.dirname(dest));
diff --git a/debian/patches/00-nodejs.diff b/debian/patches/00-nodejs.diff
deleted file mode 100644
index 3be2be2..0000000
--- a/debian/patches/00-nodejs.diff
+++ /dev/null
@@ -1,80 +0,0 @@
-Description: Fix the name of the nodejs binary.
-Forwarded: not-needed
-Author: Paolo Greppi <paolo.greppi at libpf.com>
-
-Index: node-yarnpkg/bin/yarnpkg
-===================================================================
---- node-yarnpkg.orig/bin/yarnpkg
-+++ node-yarnpkg/bin/yarnpkg
-@@ -1,2 +1,2 @@
--#!/usr/bin/env node
-+#!/usr/bin/env nodejs
- require('./yarn.js');
-Index: node-yarnpkg/bin/yarn.js
-===================================================================
---- node-yarnpkg.orig/bin/yarn.js
-+++ node-yarnpkg/bin/yarn.js
-@@ -1,4 +1,4 @@
--#!/usr/bin/env node
-+#!/usr/bin/env nodejs
- 
- /* eslint-disable no-var */
- /* eslint-disable flowtype/require-valid-file-annotation */
-Index: node-yarnpkg/scripts/build-webpack.js
-===================================================================
---- node-yarnpkg.orig/scripts/build-webpack.js
-+++ node-yarnpkg/scripts/build-webpack.js
-@@ -1,4 +1,4 @@
--#!/usr/bin/env node
-+#!/usr/bin/env nodejs
- /* eslint-disable */
- 
- const webpack = require('webpack');
-@@ -29,7 +29,7 @@ const compiler = webpack({
-   },
-   plugins: [
-     new webpack.BannerPlugin({
--      banner: "#!/usr/bin/env node",
-+      banner: "#!/usr/bin/env nodejs",
-       raw: true
-     })
-   ],
-@@ -66,7 +66,7 @@ const compilerLegacy = webpack({
-   },
-   plugins: [
-     new webpack.BannerPlugin({
--      banner: "#!/usr/bin/env node",
-+      banner: "#!/usr/bin/env nodejs",
-       raw: true
-     })
-   ],
-Index: node-yarnpkg/scripts/generate-licenses-js.js
-===================================================================
---- node-yarnpkg.orig/scripts/generate-licenses-js.js
-+++ node-yarnpkg/scripts/generate-licenses-js.js
-@@ -1,4 +1,4 @@
--#!/usr/bin/env node
-+#!/usr/bin/env nodejs
- /* eslint-disable */
- 
- const path = require('path');
-Index: node-yarnpkg/scripts/set-dev-version.js
-===================================================================
---- node-yarnpkg.orig/scripts/set-dev-version.js
-+++ node-yarnpkg/scripts/set-dev-version.js
-@@ -1,4 +1,4 @@
--#!/usr/bin/env node
-+#!/usr/bin/env nodejs
- /**
-  * Sets a a nice build number when building nightly builds
-  * (eg. "0.16.0-20161019.1800")
-Index: node-yarnpkg/scripts/set-installation-method.js
-===================================================================
---- node-yarnpkg.orig/scripts/set-installation-method.js
-+++ node-yarnpkg/scripts/set-installation-method.js
-@@ -1,4 +1,4 @@
--#!/usr/bin/env node
-+#!/usr/bin/env nodejs
- /**
-  * Sets the installationMethod field in package.json. Useful for setting it in
-  * shell scripts.
diff --git a/debian/patches/01-is-ci.diff b/debian/patches/01-is-ci.diff
new file mode 100644
index 0000000..fae095f
--- /dev/null
+++ b/debian/patches/01-is-ci.diff
@@ -0,0 +1,58 @@
+Description: Patch away is-ci (not packaged yet in Debian).
+Forwarded: not-needed
+Author: Paolo Greppi <paolo.greppi at libpf.com>
+
+Index: node-yarnpkg/src/config.js
+===================================================================
+--- node-yarnpkg.orig/src/config.js
++++ node-yarnpkg/src/config.js
+@@ -20,7 +20,6 @@ const detectIndent = require('detect-ind
+ const invariant = require('invariant');
+ const path = require('path');
+ const micromatch = require('micromatch');
+-const isCi = require('is-ci');
+ 
+ export type ConfigOptions = {
+   cwd?: ?string,
+@@ -371,7 +370,7 @@ export default class Config {
+     this.disablePrepublish = !!opts.disablePrepublish;
+ 
+     // $FlowFixMe$
+-    this.nonInteractive = !!opts.nonInteractive || isCi || !process.stdout.isTTY;
++    this.nonInteractive = !!opts.nonInteractive || !process.stdout.isTTY;
+ 
+     this.requestManager.setOptions({
+       offline: !!opts.offline && !opts.preferOffline,
+Index: node-yarnpkg/src/reporters/base-reporter.js
+===================================================================
+--- node-yarnpkg.orig/src/reporters/base-reporter.js
++++ node-yarnpkg/src/reporters/base-reporter.js
+@@ -16,7 +16,6 @@ import type {LanguageKeys} from './lang/
+ import type {Formatter} from './format.js';
+ import {defaultFormatter} from './format.js';
+ import * as languages from './lang/index.js';
+-import isCI from 'is-ci';
+ 
+ const util = require('util');
+ const EventEmitter = require('events').EventEmitter;
+@@ -60,7 +59,7 @@ export default class BaseReporter {
+     this.stderr = opts.stderr || process.stderr;
+     this.stdin = opts.stdin || this._getStandardInput();
+     this.emoji = !!opts.emoji;
+-    this.noProgress = !!opts.noProgress || isCI;
++    this.noProgress = !!opts.noProgress;
+     this.isVerbose = !!opts.verbose;
+ 
+     // $FlowFixMe: this is valid!
+Index: node-yarnpkg/src/reporters/noop-reporter.js
+===================================================================
+--- node-yarnpkg.orig/src/reporters/noop-reporter.js
++++ node-yarnpkg/src/reporters/noop-reporter.js
+@@ -16,7 +16,6 @@ import type {LanguageKeys} from './lang/
+ import type {Formatter} from './format.js';
+ import {defaultFormatter} from './format.js';
+ import * as languages from './lang/index.js';
+-import isCI from 'is-ci';
+ import BaseReporter from './base-reporter.js';
+ 
+ export default class NoopReporter extends BaseReporter {
diff --git a/debian/patches/02-is-ci.diff b/debian/patches/02-is-ci.diff
deleted file mode 100644
index a2f98f9..0000000
--- a/debian/patches/02-is-ci.diff
+++ /dev/null
@@ -1,48 +0,0 @@
-Description: Patch away is-ci (not packaged yet in Debian).
-Forwarded: not-needed
-Author: Paolo Greppi <paolo.greppi at libpf.com>
-
-Index: node-yarnpkg/src/cli/commands/install.js
-===================================================================
---- node-yarnpkg.orig/src/cli/commands/install.js
-+++ node-yarnpkg/src/cli/commands/install.js
-@@ -27,7 +27,6 @@ import {sortAlpha} from '../../util/misc
- const invariant = require('invariant');
- const semver = require('semver');
- const emoji = require('node-emoji');
--const isCI = require('is-ci');
- const path = require('path');
- 
- const {version: YARN_VERSION, installationMethod: YARN_INSTALL_METHOD} = require('../../../package.json');
-@@ -725,8 +724,8 @@ export class Install {
-    */
- 
-   checkUpdate() {
--    if (!process.stdout.isTTY || isCI) {
--      // don't show upgrade dialog on CI or non-TTY terminals
-+    if (!process.stdout.isTTY) {
-+      // don't show upgrade dialog on non-TTY terminals
-       return;
-     }
- 
-Index: node-yarnpkg/src/reporters/base-reporter.js
-===================================================================
---- node-yarnpkg.orig/src/reporters/base-reporter.js
-+++ node-yarnpkg/src/reporters/base-reporter.js
-@@ -15,7 +15,6 @@ import type {LanguageKeys} from './lang/
- import type {Formatter} from './format.js';
- import {defaultFormatter} from './format.js';
- import * as languages from './lang/index.js';
--import isCI from 'is-ci';
- 
- const util = require('util');
- 
-@@ -54,7 +53,7 @@ export default class BaseReporter {
-     this.stderr = opts.stderr || process.stderr;
-     this.stdin = opts.stdin || process.stdin;
-     this.emoji = !!opts.emoji;
--    this.noProgress = !!opts.noProgress || isCI;
-+    this.noProgress = !!opts.noProgress;
-     this.isVerbose = !!opts.verbose;
- 
-     // $FlowFixMe: this is valid!
diff --git a/debian/patches/03-leven.diff b/debian/patches/02-leven.diff
similarity index 82%
rename from debian/patches/03-leven.diff
rename to debian/patches/02-leven.diff
index d834de0..b5b6b05 100644
--- a/debian/patches/03-leven.diff
+++ b/debian/patches/02-leven.diff
@@ -7,16 +7,16 @@ Index: node-yarnpkg/src/cli/commands/run.js
 ===================================================================
 --- node-yarnpkg.orig/src/cli/commands/run.js
 +++ node-yarnpkg/src/cli/commands/run.js
-@@ -17,7 +17,7 @@ import {registries} from '../../resolver
+@@ -8,7 +8,7 @@ import {registries} from '../../resolver
  import * as fs from '../../util/fs.js';
  import map from '../../util/map.js';
  
 -const leven = require('leven');
 +const levenshtein = require('fast-levenshtein');
  const path = require('path');
+ const {quoteForShell, sh, unquoted} = require('puka');
  
- export async function run(
-@@ -73,7 +73,7 @@ export async function run(
+@@ -87,7 +87,7 @@ export async function run(config: Config
        let suggestion;
  
        for (const commandName in scripts) {
diff --git a/debian/patches/05-gulp-watch.diff b/debian/patches/03-gulp-watch.diff
similarity index 82%
rename from debian/patches/05-gulp-watch.diff
rename to debian/patches/03-gulp-watch.diff
index 4eaa95b..c633ded 100644
--- a/debian/patches/05-gulp-watch.diff
+++ b/debian/patches/03-gulp-watch.diff
@@ -14,10 +14,10 @@ Index: node-yarnpkg/gulpfile.js
  const gutil = require('gulp-util');
  const gulpif = require('gulp-if');
  const gulp = require('gulp');
-@@ -39,9 +38,3 @@ gulp.task('build-modern', () => {
- gulp.task('build-legacy', () => {
-   return build('lib-legacy', babelRc.env['pre-node5']);
- });
+@@ -35,9 +34,3 @@ gulp.task('default', ['build']);
+ gulp.task('build', () =>
+   build('lib', babelRc.env[majorVer >= 5 ? 'node5' : 'pre-node5'])
+ );
 -
 -gulp.task('watch', ['build'], () => {
 -  watch('src/**/*', () => {
diff --git a/debian/patches/06-gulp-if.diff b/debian/patches/04-gulp-if.diff
similarity index 60%
rename from debian/patches/06-gulp-if.diff
rename to debian/patches/04-gulp-if.diff
index 4961dcc..c735e89 100644
--- a/debian/patches/06-gulp-if.diff
+++ b/debian/patches/04-gulp-if.diff
@@ -14,15 +14,15 @@ Index: node-yarnpkg/gulpfile.js
  const gulp = require('gulp');
  const path = require('path');
  const fs = require('fs');
-@@ -21,9 +20,9 @@ function build(lib, opts) {
-       },
-     }))
-     .pipe(newer(lib))
--    .pipe(gulpif(argv.sourcemaps, sourcemaps.init()))
-+    .pipe(sourcemaps.init())
-     .pipe(babel(opts))
--    .pipe(gulpif(argv.sourcemaps, sourcemaps.write('.')))
-+    .pipe(sourcemaps.write('.'))
-     .pipe(gulp.dest(lib));
- }
+@@ -24,9 +23,9 @@ const build = (lib, opts) =>
+         },
+       }))
+       .pipe(newer(lib))
+-      .pipe(gulpif(argv.sourcemaps, sourcemaps.init()))
++      .pipe(sourcemaps.init())
+       .pipe(babel(opts))
+-      .pipe(gulpif(argv.sourcemaps, sourcemaps.write('.')))
++      .pipe(sourcemaps.write('.'))
+       .pipe(gulp.dest(lib));
  
+ gulp.task('default', ['build']);
diff --git a/debian/patches/04-user-home.diff b/debian/patches/04-user-home.diff
deleted file mode 100644
index 289892f..0000000
--- a/debian/patches/04-user-home.diff
+++ /dev/null
@@ -1,47 +0,0 @@
-Description: Patch user-home away as we are on nodejs >= 4.
- see: https://nodejs.org/api/os.html#os_os_homedir
-Forwarded: not-needed
-Author: Paolo Greppi <paolo.greppi at libpf.com>
-
-Index: node-yarnpkg/src/constants.js
-===================================================================
---- node-yarnpkg.orig/src/constants.js
-+++ node-yarnpkg/src/constants.js
-@@ -1,7 +1,8 @@
- /* @flow */
- 
- const path = require('path');
--let userHome = require('user-home');
-+const os = require('os');
-+let userHome = os.homedir();
- 
- if (process.platform === 'linux' && process.env.USER === 'root') {
-   userHome = path.resolve('/usr/local/share');
-Index: node-yarnpkg/src/registries/npm-registry.js
-===================================================================
---- node-yarnpkg.orig/src/registries/npm-registry.js
-+++ node-yarnpkg/src/registries/npm-registry.js
-@@ -11,7 +11,8 @@ import Registry from './base-registry.js
- import {addSuffix, removePrefix} from '../util/misc';
- 
- const defaults = require('defaults');
--const userHome = require('user-home');
-+const os = require('os');
-+const userHome = os.homedir();
- const path = require('path');
- const url = require('url');
- const ini = require('ini');
-Index: node-yarnpkg/src/registries/yarn-registry.js
-===================================================================
---- node-yarnpkg.orig/src/registries/yarn-registry.js
-+++ node-yarnpkg/src/registries/yarn-registry.js
-@@ -8,7 +8,8 @@ import stringify from '../lockfile/strin
- import parse from '../lockfile/parse.js';
- import * as fs from '../util/fs.js';
- 
--const userHome = require('user-home');
-+const os = require('os');
-+const userHome = os.homedir();
- const defaults = require('defaults');
- const path = require('path');
- const pkg: { version: string } = require('../../package.json');
diff --git a/debian/patches/07-gulp-babel.diff b/debian/patches/07-gulp-babel.diff
deleted file mode 100644
index 6e642a6..0000000
--- a/debian/patches/07-gulp-babel.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-Description: Temporarily disable babel transpiling.
-Forwarded: not-needed
-Author: Paolo Greppi <paolo.greppi at libpf.com>
-
-Index: node-yarnpkg/gulpfile.js
-===================================================================
---- node-yarnpkg.orig/gulpfile.js
-+++ node-yarnpkg/gulpfile.js
-@@ -3,7 +3,7 @@
- const argv = require('yargs').argv;
- const plumber = require('gulp-plumber');
- const newer = require('gulp-newer');
--const babel = require('gulp-babel');
-+// const babel = require('gulp-babel');
- const sourcemaps = require('gulp-sourcemaps');
- const gutil = require('gulp-util');
- const gulp = require('gulp');
-@@ -21,7 +21,7 @@ function build(lib, opts) {
-     }))
-     .pipe(newer(lib))
-     .pipe(sourcemaps.init())
--    .pipe(babel(opts))
-+//    .pipe(babel(opts))
-     .pipe(sourcemaps.write('.'))
-     .pipe(gulp.dest(lib));
- }
diff --git a/debian/patches/series b/debian/patches/series
index 9defdc0..fb00719 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,8 +1,5 @@
-00-nodejs.diff
-01-cmd-shim.diff
-02-is-ci.diff
-03-leven.diff
-04-user-home.diff
-05-gulp-watch.diff
-06-gulp-if.diff
-07-gulp-babel.diff
+00-cmd-shim.diff
+01-is-ci.diff
+02-leven.diff
+03-gulp-watch.diff
+04-gulp-if.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-yarnpkg.git



More information about the Pkg-javascript-commits mailing list