Skip to content

Commit

Permalink
bundle dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinmetcalf committed Nov 9, 2016
1 parent b6f6aaf commit ea4eaba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 23 deletions.
15 changes: 1 addition & 14 deletions build/files.js
Expand Up @@ -72,20 +72,7 @@ const headRegexp = /(^module.exports = \w+;?)/m

, isArrayDefine = [
headRegexp
, `$1
/*<replacement>*/
// from https://github.com/juliangruber/isarray/blob/aa39e3199004330bd72daa46207bf22f7ea5be17/index.js
// MIT Licenced
// Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
var toString = {}.toString;
var isArray = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
/*</replacement>*/
`
, '$1\n\n/*<replacement>*/\nvar isArray = require(\'isarray\');\n/*</replacement>*/\n'
]

, isArrayReplacement = [
Expand Down
10 changes: 1 addition & 9 deletions lib/_stream_readable.js
Expand Up @@ -7,15 +7,7 @@ var processNextTick = require('process-nextick-args');
/*</replacement>*/

/*<replacement>*/
// from https://github.com/juliangruber/isarray/blob/aa39e3199004330bd72daa46207bf22f7ea5be17/index.js
// MIT Licenced
// Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>

var toString = {}.toString;

var isArray = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
var isArray = require('isarray');
/*</replacement>*/

Readable.ReadableState = ReadableState;
Expand Down
8 changes: 8 additions & 0 deletions package.json
Expand Up @@ -6,6 +6,7 @@
"dependencies": {
"buffer-shims": "^1.0.0",
"core-util-is": "~1.0.0",
"isarray": "~1.0.0",
"inherits": "~2.0.1",
"process-nextick-args": "~1.0.6",
"string_decoder": "~0.10.x",
Expand All @@ -20,6 +21,13 @@
"tape": "~4.5.1",
"zuul": "~3.10.0"
},
"bundledDependencies": [
"buffer-shims",
"core-util-is",
"isarray",
"process-nextick-args",
"util-deprecate"
],
"scripts": {
"test": "tap test/parallel/*.js test/ours/*.js",
"browser": "npm run write-zuul && zuul --browser-retries 2 -- test/browser.js",
Expand Down

2 comments on commit ea4eaba

@Winnak
Copy link

@Winnak Winnak commented on ea4eaba May 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was isarray readded here?

@mcollina
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot bundle the dependencies because they broke yarn.

Please sign in to comment.