@mehmetb/rollup-plugin-node-builtins 3.0.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -40,7 +40,6 @@ The following modules include ES6 specific version which allow you to do named i
40
40
  - repl∆
41
41
  - tls∆
42
42
  - fs˚
43
- - crypto˚
44
43
 
45
44
  \* requires [node-globals plugin](https://github.com/calvinmetcalf/rollup-plugin-node-globals)
46
45
 
@@ -54,10 +53,6 @@ The following modules include ES6 specific version which allow you to do named i
54
53
 
55
54
  ˚ optional, add option to enable browserified shim
56
55
 
57
- Crypto is not shimmed and and we just provide the commonjs one from browserify and it will likely not work, if you really want it please pass `{crypto: true}` as an option.
58
-
59
-
60
-
61
56
  Not all included modules rollup equally, streams (and by extension anything that requires it like http) are a mess of circular references that are pretty much impossible to tree-shake out, similarly url methods are actually a shortcut to a url object so those methods don't tree shake out very well, punycode, path, querystring, events, util, and process tree shake very well especially if you do named imports.
62
57
 
63
58
  config for using this with something simple like events or querystring
@@ -32,7 +32,6 @@ libs.set('vm', require.resolve(path.join('..', 'src', 'es6', 'vm')));
32
32
  libs.set('zlib', require.resolve(path.join('..', 'src', 'es6', 'zlib')));
33
33
  libs.set('tty', require.resolve(path.join('..', 'src', 'es6', 'tty')));
34
34
  libs.set('domain', require.resolve(path.join('..', 'src', 'es6', 'domain')));
35
- var CRYPTO_PATH = require.resolve('crypto-browserify');
36
35
  var FS_PATH = require.resolve('browserify-fs');
37
36
  var EMPTY_PATH = require.resolve(path.join('..', 'src', 'es6', 'empty'));
38
37
 
@@ -48,11 +47,7 @@ libs.set('repl', EMPTY_PATH);
48
47
  libs.set('tls', EMPTY_PATH);
49
48
  function index (opts) {
50
49
  opts = opts || {};
51
- var cryptoPath = EMPTY_PATH;
52
50
  var fsPath = EMPTY_PATH;
53
- if (opts.crypto) {
54
- cryptoPath = CRYPTO_PATH;
55
- }
56
51
  if (opts.fs) {
57
52
  fsPath = FS_PATH;
58
53
  }
@@ -64,9 +59,6 @@ function index (opts) {
64
59
  if (libs.has(importee)) {
65
60
  return libs.get(importee);
66
61
  }
67
- if (importee === 'crypto') {
68
- return cryptoPath;
69
- }
70
62
  if (importee === 'fs') {
71
63
  return fsPath;
72
64
  }
@@ -30,7 +30,6 @@ libs.set('vm', require.resolve(join('..', 'src', 'es6', 'vm')));
30
30
  libs.set('zlib', require.resolve(join('..', 'src', 'es6', 'zlib')));
31
31
  libs.set('tty', require.resolve(join('..', 'src', 'es6', 'tty')));
32
32
  libs.set('domain', require.resolve(join('..', 'src', 'es6', 'domain')));
33
- var CRYPTO_PATH = require.resolve('crypto-browserify');
34
33
  var FS_PATH = require.resolve('browserify-fs');
35
34
  var EMPTY_PATH = require.resolve(join('..', 'src', 'es6', 'empty'));
36
35
 
@@ -46,11 +45,7 @@ libs.set('repl', EMPTY_PATH);
46
45
  libs.set('tls', EMPTY_PATH);
47
46
  function index (opts) {
48
47
  opts = opts || {};
49
- var cryptoPath = EMPTY_PATH;
50
48
  var fsPath = EMPTY_PATH;
51
- if (opts.crypto) {
52
- cryptoPath = CRYPTO_PATH;
53
- }
54
49
  if (opts.fs) {
55
50
  fsPath = FS_PATH;
56
51
  }
@@ -62,9 +57,6 @@ function index (opts) {
62
57
  if (libs.has(importee)) {
63
58
  return libs.get(importee);
64
59
  }
65
- if (importee === 'crypto') {
66
- return cryptoPath;
67
- }
68
60
  if (importee === 'fs') {
69
61
  return fsPath;
70
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mehmetb/rollup-plugin-node-builtins",
3
- "version": "3.0.1",
3
+ "version": "4.0.0",
4
4
  "description": "use node builtins in browser with rollup",
5
5
  "main": "dist/rollup-plugin-node-builtins.cjs.js",
6
6
  "jsnext:main": "dist/rollup-plugin-node-builtins.es6.js",
@@ -21,7 +21,6 @@
21
21
  "dependencies": {
22
22
  "browserify-fs": "^1.0.0",
23
23
  "buffer-es6": "^4.9.3",
24
- "crypto-browserify": "^3.12.1",
25
24
  "process-es6": "^0.11.6"
26
25
  },
27
26
  "devDependencies": {
package/src/index.js CHANGED
@@ -30,7 +30,6 @@ libs.set('zlib', require.resolve(join('..', 'src', 'es6', 'zlib')));
30
30
  libs.set('tty', require.resolve(join('..', 'src', 'es6', 'tty')));
31
31
  libs.set('domain', require.resolve(join('..', 'src', 'es6', 'domain')));
32
32
 
33
- const CRYPTO_PATH = require.resolve('crypto-browserify');
34
33
  const FS_PATH = require.resolve('browserify-fs');
35
34
  const EMPTY_PATH = require.resolve(join('..', 'src', 'es6', 'empty'));
36
35
 
@@ -48,11 +47,7 @@ libs.set('tls', EMPTY_PATH);
48
47
 
49
48
  export default function (opts) {
50
49
  opts = opts || {};
51
- let cryptoPath = EMPTY_PATH;
52
50
  let fsPath = EMPTY_PATH;
53
- if (opts.crypto) {
54
- cryptoPath = CRYPTO_PATH;
55
- }
56
51
  if (opts.fs) {
57
52
  fsPath = FS_PATH;
58
53
  }
@@ -63,9 +58,6 @@ export default function (opts) {
63
58
  if (libs.has(importee)) {
64
59
  return libs.get(importee);
65
60
  }
66
- if (importee === 'crypto') {
67
- return cryptoPath;
68
- }
69
61
  if (importee === 'fs') {
70
62
  return fsPath;
71
63
  }