Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fbjs

Package Overview
Dependencies
Maintainers
4
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fbjs - npm Package Compare versions

Comparing version 0.1.0-alpha.10 to 0.1.0-alpha.11

scripts/babel/inline-requires.js

2

package.json
{
"name": "fbjs",
"version": "0.1.0-alpha.10",
"version": "0.1.0-alpha.11",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -12,4 +12,13 @@ /**

var babelPluginModules = require('../babel/rewrite-modules');
var babelPluginModules = require('./rewrite-modules');
var inlineRequires = require('./inline-requires');
var plugins = [babelPluginModules];
if (process.env.NODE_ENV === 'test') {
plugins.push({
position: 'after',
transformer: inlineRequires,
});
}
module.exports = {

@@ -24,3 +33,3 @@ nonStandard: true,

stage: 1,
plugins: [babelPluginModules],
plugins: plugins,
_moduleMap: {

@@ -27,0 +36,0 @@ 'core-js/library/es6/map': 'core-js/library/es6/map',

@@ -0,18 +1,29 @@

/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var assign = require('object-assign');
var babel = require('babel');
var babelDefaultOptions = require('../babel/default-options');
var createCacheKeyFunction = require('./createCacheKeyFunction');
var babelOpts = assign({}, babelDefaultOptions, {
retainLines: true,
});
module.exports = {
process: function(src, filename) {
return babel.transform(src, assign(
{},
babelDefaultOptions,
{
filename: filename,
retainLines: true
}
)).code;
},
module.exports = {
process: function(src, path) {
// TODO: Use preprocessorIgnorePatterns when it works.
// See https://github.com/facebook/jest/issues/385.
if (!path.match(/\/node_modules\//) && !path.match(/\/third_party\//)) {
return babel.transform(src, assign({filename: path}, babelOpts)).code;
}
return src;
}
// Generate a cache key that is based on the module and transform data.
getCacheKey: createCacheKeyFunction([__filename])
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc