File tree 3 files changed +6
-17
lines changed
3 files changed +6
-17
lines changed Original file line number Diff line number Diff line change 42
42
"typings" : " ./lib/index" ,
43
43
"dependencies" : {
44
44
"@msgpack/msgpack" : " ^1.9.3" ,
45
- "lodash.defaults" : " ^4.2.0" ,
46
45
"lodash.omit" : " ^4.5.0" ,
47
46
"semver" : " ^7.1.1" ,
48
47
"winston" : " 3.2.1"
53
52
"@babel/preset-env" : " ^7.3.4" ,
54
53
"@babel/preset-typescript" : " ^7.3.3" ,
55
54
"@types/jest" : " ^24.0.24" ,
56
- "@types/lodash.defaults" : " ^4.2.6" ,
57
55
"@types/lodash.omit" : " ^4.5.6" ,
58
56
"@types/node" : " 10.17.x" ,
59
57
"@types/which" : " ^1.3.2" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import * as path from 'path';
2
2
import * as util from 'util' ;
3
3
import * as vm from 'vm' ;
4
4
5
- import defaults from 'lodash.defaults' ;
6
5
import omit from 'lodash.omit' ;
7
6
8
7
import { Neovim } from '../api/Neovim' ;
@@ -110,7 +109,12 @@ function createSandbox(filename: string): Sandbox {
110
109
console : { } ,
111
110
} ) as Sandbox ;
112
111
113
- defaults ( sandbox , global ) ;
112
+ // Use getOwnPropertyNames to iterate all global variables (#141)
113
+ Object . getOwnPropertyNames ( global )
114
+ . filter ( p => ! sandbox . hasOwnProperty ( p ) )
115
+ . forEach ( prop => {
116
+ sandbox [ prop ] = global [ prop ] ;
117
+ } ) ;
114
118
115
119
// Redirect console calls into logger
116
120
Object . keys ( console ) . forEach ( ( k : keyof Console ) => {
Original file line number Diff line number Diff line change 1804
1804
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339"
1805
1805
integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==
1806
1806
1807
- " @types/lodash.defaults@^4.2.6 " :
1808
- version "4.2.6"
1809
- resolved "https://registry.yarnpkg.com/@types/lodash.defaults/-/lodash.defaults-4.2.6.tgz#4ac29d3dd80a42803397076600f5b129f4aef911"
1810
- integrity sha512-JsUJheQIG2Yf/n/QRUMGXT76/7x4tLU5i0kxIPeoOcTIh9yNzdEzCHWbwD8mTf+VncGwYZiho+F2u1pEBsGswA==
1811
- dependencies :
1812
- " @types/lodash" " *"
1813
-
1814
1807
" @types/lodash.omit@^4.5.6 " :
1815
1808
version "4.5.6"
1816
1809
resolved "https://registry.yarnpkg.com/@types/lodash.omit/-/lodash.omit-4.5.6.tgz#f2a9518259e481a48ff7ec423420fa8fd58933e2"
@@ -5885,11 +5878,6 @@ lodash.clonedeep@^4.5.0:
5885
5878
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
5886
5879
integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
5887
5880
5888
- lodash.defaults@^4.2.0 :
5889
- version "4.2.0"
5890
- resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
5891
- integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=
5892
-
5893
5881
lodash.get@^4.4.2 :
5894
5882
version "4.4.2"
5895
5883
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
@@ -6381,7 +6369,6 @@ neo-async@^2.6.0:
6381
6369
version "4.8.0"
6382
6370
dependencies :
6383
6371
" @msgpack/msgpack" " ^1.9.3"
6384
- lodash.defaults "^4.2.0"
6385
6372
lodash.omit "^4.5.0"
6386
6373
semver "^7.1.1"
6387
6374
winston "3.2.1"
You can’t perform that action at this time.
0 commit comments