fbjs-scripts
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -1,3 +0,7 @@ | ||
## master | ||
## [1.2.0] - 2019-03-20 | ||
### Added | ||
- `check-dependencies` now supports projects using Yarn workspaces. | ||
- `check-dependencies` now supports Yarn selective dependency resolutions. | ||
## [1.1.0] | ||
@@ -4,0 +8,0 @@ |
@@ -10,2 +10,5 @@ /** | ||
var PluginError = require('plugin-error'); | ||
var colors = require('ansi-colors'); | ||
var fancyLog = require('fancy-log'); | ||
var path = require('path'); | ||
@@ -15,5 +18,2 @@ var semver = require('semver'); | ||
var through = require('through2'); | ||
var PluginError = require('plugin-error'); | ||
var colors = require('ansi-colors'); | ||
var fancyLog = require('fancy-log'); | ||
@@ -43,3 +43,4 @@ var PLUGIN_NAME = 'check-dependencies'; | ||
.filter(Boolean) | ||
.map(d => JSON.parse(d))[1]['data']['body']; | ||
.map(d => JSON.parse(d)) | ||
.filter(j => j.type === 'table')[0].data; | ||
} catch (e) { | ||
@@ -50,9 +51,25 @@ console.log('error', e) | ||
// Convert ["Package", "Current",...] to {"Package": 0, ...} | ||
const name2idx = {}; | ||
outdatedData.head.forEach((key, idx) => name2idx[key] = idx); | ||
const { | ||
Package: NAME, | ||
Current: CURRENT, | ||
"Package Type": TYPE | ||
} = name2idx; | ||
var failures = []; | ||
outdatedData.forEach(function(row) { | ||
var name = row[0]; | ||
var current = row[1]; | ||
var type = row[4]; | ||
var requested = pkgData[type][name]; | ||
outdatedData.body.forEach(function(row) { | ||
var name = row[NAME]; | ||
var current = row[CURRENT]; | ||
var type = row[TYPE]; | ||
var pkgDeps = pkgData[type]; | ||
if (!pkgDeps) { | ||
fancyLog(`Found missing dependency category ${type}.`); | ||
return; | ||
} | ||
var requested = pkgDeps[name]; | ||
if (!requested) { | ||
@@ -59,0 +76,0 @@ fancyLog('Found extraneous outdated dependency. Consider running `npm prune`'); |
@@ -0,3 +1,10 @@ | ||
/** | ||
* Copyright (c) 2013-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
require('core-js/es6'); | ||
global.__DEV__ = true; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* Copyright (c) 2013-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
/*eslint-disable max-len*/ | ||
@@ -2,0 +9,0 @@ 'use strict'; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* Copyright (c) 2013-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
'use strict'; | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "fbjs-scripts", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "A bundle of helpful scripts used in projects consuming fbjs.", | ||
@@ -10,3 +10,3 @@ "repository": "facebook/fbjs", | ||
"ansi-colors": "^1.0.1", | ||
"babel-preset-fbjs": "^3.0.0", | ||
"babel-preset-fbjs": "^3.2.0", | ||
"core-js": "^2.4.1", | ||
@@ -13,0 +13,0 @@ "cross-spawn": "^5.1.0", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
56483
402
1
Updatedbabel-preset-fbjs@^3.2.0