@browserless/function 9.6.6 → 9.6.7

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/vm.js +2 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@browserless/function",
3
3
  "description": "Run abritrary JavaScript inside a browser sandbox",
4
4
  "homepage": "https://browserless.js.org",
5
- "version": "9.6.6",
5
+ "version": "9.6.7",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -39,7 +39,7 @@
39
39
  "p-timeout": "~4.1.0",
40
40
  "require-one-of": "~1.0.16",
41
41
  "serialize-error": "~8.1.0",
42
- "vm2": "~3.9.9"
42
+ "vm2": "~3.9.11"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@browserless/test": "latest",
@@ -61,5 +61,5 @@
61
61
  "timeout": "30s",
62
62
  "verbose": true
63
63
  },
64
- "gitHead": "74da0ac7388ee354aec0517218afb143ec6a095d"
64
+ "gitHead": "ca9f66c91b35160b92828f41f603bcc7e15274a7"
65
65
  }
package/src/vm.js CHANGED
@@ -8,6 +8,7 @@ const path = require('path')
8
8
  const DEFAULT_VM_OPTS = {
9
9
  console: 'off',
10
10
  sandbox: {},
11
+ strict: true,
11
12
  require: {
12
13
  resolve: pkgName => path.resolve(process.cwd(), 'node_modules', pkgName),
13
14
  external: {
@@ -19,7 +20,7 @@ const DEFAULT_VM_OPTS = {
19
20
  const createVm = (opts = {}) => new NodeVM(merge(DEFAULT_VM_OPTS, opts))
20
21
 
21
22
  const compile = (vm, fn, scriptPath) => {
22
- const code = `'use strict'; module.exports = ${fn.toString()}`
23
+ const code = `module.exports = ${fn.toString()}`
23
24
  return vm.run(code, scriptPath)
24
25
  }
25
26