pnpm 6.17.2 → 6.20.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.
Files changed (41) hide show
  1. package/README.md +26 -24
  2. package/dist/node_modules/make-fetch-happen/{agent.js → lib/agent.js} +14 -29
  3. package/dist/node_modules/make-fetch-happen/lib/cache/entry.js +460 -0
  4. package/dist/node_modules/make-fetch-happen/lib/cache/errors.js +10 -0
  5. package/dist/node_modules/make-fetch-happen/lib/cache/index.js +45 -0
  6. package/dist/node_modules/make-fetch-happen/lib/cache/key.js +17 -0
  7. package/dist/node_modules/make-fetch-happen/lib/cache/policy.js +161 -0
  8. package/dist/node_modules/make-fetch-happen/lib/fetch.js +100 -0
  9. package/dist/node_modules/make-fetch-happen/lib/index.js +40 -0
  10. package/dist/node_modules/make-fetch-happen/lib/options.js +44 -0
  11. package/dist/node_modules/make-fetch-happen/lib/remote.js +102 -0
  12. package/dist/node_modules/make-fetch-happen/package.json +21 -17
  13. package/dist/node_modules/negotiator/LICENSE +24 -0
  14. package/dist/node_modules/negotiator/index.js +124 -0
  15. package/dist/node_modules/negotiator/lib/charset.js +169 -0
  16. package/dist/node_modules/negotiator/lib/encoding.js +184 -0
  17. package/dist/node_modules/negotiator/lib/language.js +179 -0
  18. package/dist/node_modules/negotiator/lib/mediaType.js +294 -0
  19. package/dist/node_modules/negotiator/package.json +42 -0
  20. package/dist/node_modules/node-gyp/.github/workflows/tests.yml +1 -1
  21. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +16 -1
  22. package/dist/node_modules/node-gyp/gyp/setup.py +1 -1
  23. package/dist/node_modules/node-gyp/lib/configure.js +5 -97
  24. package/dist/node_modules/node-gyp/lib/create-config-gypi.js +119 -0
  25. package/dist/node_modules/node-gyp/package.json +2 -2
  26. package/dist/node_modules/socks-proxy-agent/dist/agent.js +4 -3
  27. package/dist/node_modules/socks-proxy-agent/dist/agent.js.map +1 -1
  28. package/dist/node_modules/socks-proxy-agent/dist/index.js.map +1 -1
  29. package/dist/node_modules/socks-proxy-agent/package.json +20 -20
  30. package/dist/pnpm.cjs +13490 -13531
  31. package/dist/pnpmrc +2 -0
  32. package/dist/pnpx.cjs +6 -4
  33. package/package.json +34 -33
  34. package/dist/node_modules/make-fetch-happen/cache.js +0 -260
  35. package/dist/node_modules/make-fetch-happen/index.js +0 -457
  36. package/dist/node_modules/make-fetch-happen/utils/configure-options.js +0 -32
  37. package/dist/node_modules/make-fetch-happen/utils/initialize-cache.js +0 -26
  38. package/dist/node_modules/make-fetch-happen/utils/is-header-conditional.js +0 -17
  39. package/dist/node_modules/make-fetch-happen/utils/iterable-to-object.js +0 -9
  40. package/dist/node_modules/make-fetch-happen/utils/make-policy.js +0 -19
  41. package/dist/node_modules/make-fetch-happen/warning.js +0 -24
@@ -0,0 +1,294 @@
1
+ /**
2
+ * negotiator
3
+ * Copyright(c) 2012 Isaac Z. Schlueter
4
+ * Copyright(c) 2014 Federico Romero
5
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
6
+ * MIT Licensed
7
+ */
8
+
9
+ 'use strict';
10
+
11
+ /**
12
+ * Module exports.
13
+ * @public
14
+ */
15
+
16
+ module.exports = preferredMediaTypes;
17
+ module.exports.preferredMediaTypes = preferredMediaTypes;
18
+
19
+ /**
20
+ * Module variables.
21
+ * @private
22
+ */
23
+
24
+ var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;
25
+
26
+ /**
27
+ * Parse the Accept header.
28
+ * @private
29
+ */
30
+
31
+ function parseAccept(accept) {
32
+ var accepts = splitMediaTypes(accept);
33
+
34
+ for (var i = 0, j = 0; i < accepts.length; i++) {
35
+ var mediaType = parseMediaType(accepts[i].trim(), i);
36
+
37
+ if (mediaType) {
38
+ accepts[j++] = mediaType;
39
+ }
40
+ }
41
+
42
+ // trim accepts
43
+ accepts.length = j;
44
+
45
+ return accepts;
46
+ }
47
+
48
+ /**
49
+ * Parse a media type from the Accept header.
50
+ * @private
51
+ */
52
+
53
+ function parseMediaType(str, i) {
54
+ var match = simpleMediaTypeRegExp.exec(str);
55
+ if (!match) return null;
56
+
57
+ var params = Object.create(null);
58
+ var q = 1;
59
+ var subtype = match[2];
60
+ var type = match[1];
61
+
62
+ if (match[3]) {
63
+ var kvps = splitParameters(match[3]).map(splitKeyValuePair);
64
+
65
+ for (var j = 0; j < kvps.length; j++) {
66
+ var pair = kvps[j];
67
+ var key = pair[0].toLowerCase();
68
+ var val = pair[1];
69
+
70
+ // get the value, unwrapping quotes
71
+ var value = val && val[0] === '"' && val[val.length - 1] === '"'
72
+ ? val.substr(1, val.length - 2)
73
+ : val;
74
+
75
+ if (key === 'q') {
76
+ q = parseFloat(value);
77
+ break;
78
+ }
79
+
80
+ // store parameter
81
+ params[key] = value;
82
+ }
83
+ }
84
+
85
+ return {
86
+ type: type,
87
+ subtype: subtype,
88
+ params: params,
89
+ q: q,
90
+ i: i
91
+ };
92
+ }
93
+
94
+ /**
95
+ * Get the priority of a media type.
96
+ * @private
97
+ */
98
+
99
+ function getMediaTypePriority(type, accepted, index) {
100
+ var priority = {o: -1, q: 0, s: 0};
101
+
102
+ for (var i = 0; i < accepted.length; i++) {
103
+ var spec = specify(type, accepted[i], index);
104
+
105
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
106
+ priority = spec;
107
+ }
108
+ }
109
+
110
+ return priority;
111
+ }
112
+
113
+ /**
114
+ * Get the specificity of the media type.
115
+ * @private
116
+ */
117
+
118
+ function specify(type, spec, index) {
119
+ var p = parseMediaType(type);
120
+ var s = 0;
121
+
122
+ if (!p) {
123
+ return null;
124
+ }
125
+
126
+ if(spec.type.toLowerCase() == p.type.toLowerCase()) {
127
+ s |= 4
128
+ } else if(spec.type != '*') {
129
+ return null;
130
+ }
131
+
132
+ if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) {
133
+ s |= 2
134
+ } else if(spec.subtype != '*') {
135
+ return null;
136
+ }
137
+
138
+ var keys = Object.keys(spec.params);
139
+ if (keys.length > 0) {
140
+ if (keys.every(function (k) {
141
+ return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase();
142
+ })) {
143
+ s |= 1
144
+ } else {
145
+ return null
146
+ }
147
+ }
148
+
149
+ return {
150
+ i: index,
151
+ o: spec.i,
152
+ q: spec.q,
153
+ s: s,
154
+ }
155
+ }
156
+
157
+ /**
158
+ * Get the preferred media types from an Accept header.
159
+ * @public
160
+ */
161
+
162
+ function preferredMediaTypes(accept, provided) {
163
+ // RFC 2616 sec 14.2: no header = */*
164
+ var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');
165
+
166
+ if (!provided) {
167
+ // sorted list of all types
168
+ return accepts
169
+ .filter(isQuality)
170
+ .sort(compareSpecs)
171
+ .map(getFullType);
172
+ }
173
+
174
+ var priorities = provided.map(function getPriority(type, index) {
175
+ return getMediaTypePriority(type, accepts, index);
176
+ });
177
+
178
+ // sorted list of accepted types
179
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {
180
+ return provided[priorities.indexOf(priority)];
181
+ });
182
+ }
183
+
184
+ /**
185
+ * Compare two specs.
186
+ * @private
187
+ */
188
+
189
+ function compareSpecs(a, b) {
190
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
191
+ }
192
+
193
+ /**
194
+ * Get full type string.
195
+ * @private
196
+ */
197
+
198
+ function getFullType(spec) {
199
+ return spec.type + '/' + spec.subtype;
200
+ }
201
+
202
+ /**
203
+ * Check if a spec has any quality.
204
+ * @private
205
+ */
206
+
207
+ function isQuality(spec) {
208
+ return spec.q > 0;
209
+ }
210
+
211
+ /**
212
+ * Count the number of quotes in a string.
213
+ * @private
214
+ */
215
+
216
+ function quoteCount(string) {
217
+ var count = 0;
218
+ var index = 0;
219
+
220
+ while ((index = string.indexOf('"', index)) !== -1) {
221
+ count++;
222
+ index++;
223
+ }
224
+
225
+ return count;
226
+ }
227
+
228
+ /**
229
+ * Split a key value pair.
230
+ * @private
231
+ */
232
+
233
+ function splitKeyValuePair(str) {
234
+ var index = str.indexOf('=');
235
+ var key;
236
+ var val;
237
+
238
+ if (index === -1) {
239
+ key = str;
240
+ } else {
241
+ key = str.substr(0, index);
242
+ val = str.substr(index + 1);
243
+ }
244
+
245
+ return [key, val];
246
+ }
247
+
248
+ /**
249
+ * Split an Accept header into media types.
250
+ * @private
251
+ */
252
+
253
+ function splitMediaTypes(accept) {
254
+ var accepts = accept.split(',');
255
+
256
+ for (var i = 1, j = 0; i < accepts.length; i++) {
257
+ if (quoteCount(accepts[j]) % 2 == 0) {
258
+ accepts[++j] = accepts[i];
259
+ } else {
260
+ accepts[j] += ',' + accepts[i];
261
+ }
262
+ }
263
+
264
+ // trim accepts
265
+ accepts.length = j + 1;
266
+
267
+ return accepts;
268
+ }
269
+
270
+ /**
271
+ * Split a string of parameters.
272
+ * @private
273
+ */
274
+
275
+ function splitParameters(str) {
276
+ var parameters = str.split(';');
277
+
278
+ for (var i = 1, j = 0; i < parameters.length; i++) {
279
+ if (quoteCount(parameters[j]) % 2 == 0) {
280
+ parameters[++j] = parameters[i];
281
+ } else {
282
+ parameters[j] += ';' + parameters[i];
283
+ }
284
+ }
285
+
286
+ // trim parameters
287
+ parameters.length = j + 1;
288
+
289
+ for (var i = 0; i < parameters.length; i++) {
290
+ parameters[i] = parameters[i].trim();
291
+ }
292
+
293
+ return parameters;
294
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "negotiator",
3
+ "description": "HTTP content negotiation",
4
+ "version": "0.6.2",
5
+ "contributors": [
6
+ "Douglas Christopher Wilson <doug@somethingdoug.com>",
7
+ "Federico Romero <federico.romero@outboxlabs.com>",
8
+ "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)"
9
+ ],
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "http",
13
+ "content negotiation",
14
+ "accept",
15
+ "accept-language",
16
+ "accept-encoding",
17
+ "accept-charset"
18
+ ],
19
+ "repository": "jshttp/negotiator",
20
+ "devDependencies": {
21
+ "eslint": "5.16.0",
22
+ "eslint-plugin-markdown": "1.0.0",
23
+ "mocha": "6.1.4",
24
+ "nyc": "14.0.0"
25
+ },
26
+ "files": [
27
+ "lib/",
28
+ "HISTORY.md",
29
+ "LICENSE",
30
+ "index.js",
31
+ "README.md"
32
+ ],
33
+ "engines": {
34
+ "node": ">= 0.6"
35
+ },
36
+ "scripts": {
37
+ "lint": "eslint --plugin markdown --ext js,md .",
38
+ "test": "mocha --reporter spec --check-leaks --bail test/",
39
+ "test-cov": "nyc --reporter=html --reporter=text npm test",
40
+ "test-travis": "nyc --reporter=text npm test"
41
+ }
42
+ }
@@ -9,7 +9,7 @@ jobs:
9
9
  max-parallel: 15
10
10
  matrix:
11
11
  node: [12.x, 14.x, 16.x]
12
- python: [3.6, 3.8, 3.9]
12
+ python: ["3.6", "3.8", "3.10"]
13
13
  os: [macos-latest, ubuntu-latest, windows-latest]
14
14
  runs-on: ${{ matrix.os }}
15
15
  steps:
@@ -269,6 +269,18 @@ def _CreateVersion(name, path, sdk_based=False):
269
269
  if path:
270
270
  path = os.path.normpath(path)
271
271
  versions = {
272
+ "2022": VisualStudioVersion(
273
+ "2022",
274
+ "Visual Studio 2022",
275
+ solution_version="12.00",
276
+ project_version="17.0",
277
+ flat_sln=False,
278
+ uses_vcxproj=True,
279
+ path=path,
280
+ sdk_based=sdk_based,
281
+ default_toolset="v143",
282
+ compatible_sdks=["v8.1", "v10.0"],
283
+ ),
272
284
  "2019": VisualStudioVersion(
273
285
  "2019",
274
286
  "Visual Studio 2019",
@@ -436,6 +448,7 @@ def _DetectVisualStudioVersions(versions_to_check, force_express):
436
448
  2015 - Visual Studio 2015 (14)
437
449
  2017 - Visual Studio 2017 (15)
438
450
  2019 - Visual Studio 2019 (16)
451
+ 2022 - Visual Studio 2022 (17)
439
452
  Where (e) is e for express editions of MSVS and blank otherwise.
440
453
  """
441
454
  version_to_year = {
@@ -447,6 +460,7 @@ def _DetectVisualStudioVersions(versions_to_check, force_express):
447
460
  "14.0": "2015",
448
461
  "15.0": "2017",
449
462
  "16.0": "2019",
463
+ "17.0": "2022",
450
464
  }
451
465
  versions = []
452
466
  for version in versions_to_check:
@@ -522,7 +536,7 @@ def SelectVisualStudioVersion(version="auto", allow_fallback=True):
522
536
  if version == "auto":
523
537
  version = os.environ.get("GYP_MSVS_VERSION", "auto")
524
538
  version_map = {
525
- "auto": ("16.0", "15.0", "14.0", "12.0", "10.0", "9.0", "8.0", "11.0"),
539
+ "auto": ("17.0", "16.0", "15.0", "14.0", "12.0", "10.0", "9.0", "8.0", "11.0"),
526
540
  "2005": ("8.0",),
527
541
  "2005e": ("8.0",),
528
542
  "2008": ("9.0",),
@@ -536,6 +550,7 @@ def SelectVisualStudioVersion(version="auto", allow_fallback=True):
536
550
  "2015": ("14.0",),
537
551
  "2017": ("15.0",),
538
552
  "2019": ("16.0",),
553
+ "2022": ("17.0",),
539
554
  }
540
555
  override_path = os.environ.get("GYP_MSVS_OVERRIDE_PATH")
541
556
  if override_path:
@@ -15,7 +15,7 @@ with open(path.join(here, "README.md")) as in_file:
15
15
 
16
16
  setup(
17
17
  name="gyp-next",
18
- version="0.9.6",
18
+ version="0.10.0",
19
19
  description="A fork of the GYP build system for use in the Node.js projects",
20
20
  long_description=long_description,
21
21
  long_description_content_type="text/markdown",
@@ -7,6 +7,7 @@ const os = require('os')
7
7
  const processRelease = require('./process-release')
8
8
  const win = process.platform === 'win32'
9
9
  const findNodeDirectory = require('./find-node-directory')
10
+ const createConfigGypi = require('./create-config-gypi')
10
11
  const msgFormat = require('util').format
11
12
  var findPython = require('./find-python')
12
13
  if (win) {
@@ -92,107 +93,14 @@ function configure (gyp, argv, callback) {
92
93
  if (err) {
93
94
  return callback(err)
94
95
  }
95
-
96
- var configFilename = 'config.gypi'
97
- var configPath = path.resolve(buildDir, configFilename)
98
-
99
- log.verbose('build/' + configFilename, 'creating config file')
100
-
101
- var config = process.config ? JSON.parse(JSON.stringify(process.config)) : {}
102
- var defaults = config.target_defaults
103
- var variables = config.variables
104
-
105
- // default "config.variables"
106
- if (!variables) {
107
- variables = config.variables = {}
108
- }
109
-
110
- // default "config.defaults"
111
- if (!defaults) {
112
- defaults = config.target_defaults = {}
113
- }
114
-
115
- // don't inherit the "defaults" from node's `process.config` object.
116
- // doing so could cause problems in cases where the `node` executable was
117
- // compiled on a different machine (with different lib/include paths) than
118
- // the machine where the addon is being built to
119
- defaults.cflags = []
120
- defaults.defines = []
121
- defaults.include_dirs = []
122
- defaults.libraries = []
123
-
124
- // set the default_configuration prop
125
- if ('debug' in gyp.opts) {
126
- defaults.default_configuration = gyp.opts.debug ? 'Debug' : 'Release'
127
- }
128
-
129
- if (!defaults.default_configuration) {
130
- defaults.default_configuration = 'Release'
131
- }
132
-
133
- // set the target_arch variable
134
- variables.target_arch = gyp.opts.arch || process.arch || 'ia32'
135
- if (variables.target_arch === 'arm64') {
136
- defaults.msvs_configuration_platform = 'ARM64'
137
- defaults.xcode_configuration_platform = 'arm64'
138
- }
139
-
140
- // set the node development directory
141
- variables.nodedir = nodeDir
142
-
143
- // disable -T "thin" static archives by default
144
- variables.standalone_static_library = gyp.opts.thin ? 0 : 1
145
-
146
- if (win) {
96
+ if (process.platform === 'win32') {
147
97
  process.env.GYP_MSVS_VERSION = Math.min(vsInfo.versionYear, 2015)
148
98
  process.env.GYP_MSVS_OVERRIDE_PATH = vsInfo.path
149
- defaults.msbuild_toolset = vsInfo.toolset
150
- if (vsInfo.sdk) {
151
- defaults.msvs_windows_target_platform_version = vsInfo.sdk
152
- }
153
- if (variables.target_arch === 'arm64') {
154
- if (vsInfo.versionMajor > 15 ||
155
- (vsInfo.versionMajor === 15 && vsInfo.versionMajor >= 9)) {
156
- defaults.msvs_enable_marmasm = 1
157
- } else {
158
- log.warn('Compiling ARM64 assembly is only available in\n' +
159
- 'Visual Studio 2017 version 15.9 and above')
160
- }
161
- }
162
- variables.msbuild_path = vsInfo.msBuild
163
99
  }
164
-
165
- // loop through the rest of the opts and add the unknown ones as variables.
166
- // this allows for module-specific configure flags like:
167
- //
168
- // $ node-gyp configure --shared-libxml2
169
- Object.keys(gyp.opts).forEach(function (opt) {
170
- if (opt === 'argv') {
171
- return
172
- }
173
- if (opt in gyp.configDefs) {
174
- return
175
- }
176
- variables[opt.replace(/-/g, '_')] = gyp.opts[opt]
100
+ createConfigGypi({ gyp, buildDir, nodeDir, vsInfo }, (err, configPath) => {
101
+ configs.push(configPath)
102
+ findConfigs(err)
177
103
  })
178
-
179
- // ensures that any boolean values from `process.config` get stringified
180
- function boolsToString (k, v) {
181
- if (typeof v === 'boolean') {
182
- return String(v)
183
- }
184
- return v
185
- }
186
-
187
- log.silly('build/' + configFilename, config)
188
-
189
- // now write out the config.gypi file to the build/ dir
190
- var prefix = '# Do not edit. File was generated by node-gyp\'s "configure" step'
191
-
192
- var json = JSON.stringify(config, boolsToString, 2)
193
- log.verbose('build/' + configFilename, 'writing out config file: %s', configPath)
194
- configs.push(configPath)
195
- fs.writeFile(configPath, [prefix, json, ''].join('\n'), findConfigs)
196
104
  }
197
105
 
198
106
  function findConfigs (err) {
@@ -0,0 +1,119 @@
1
+ 'use strict'
2
+
3
+ const fs = require('graceful-fs')
4
+ const log = require('npmlog')
5
+ const path = require('path')
6
+
7
+ function getBaseConfigGypi () {
8
+ const config = JSON.parse(JSON.stringify(process.config))
9
+ if (!config.target_defaults) {
10
+ config.target_defaults = {}
11
+ }
12
+ if (!config.variables) {
13
+ config.variables = {}
14
+ }
15
+ return config
16
+ }
17
+
18
+ function getCurrentConfigGypi ({ gyp, nodeDir, vsInfo }) {
19
+ const config = getBaseConfigGypi()
20
+ const defaults = config.target_defaults
21
+ const variables = config.variables
22
+
23
+ // don't inherit the "defaults" from the base config.gypi.
24
+ // doing so could cause problems in cases where the `node` executable was
25
+ // compiled on a different machine (with different lib/include paths) than
26
+ // the machine where the addon is being built to
27
+ defaults.cflags = []
28
+ defaults.defines = []
29
+ defaults.include_dirs = []
30
+ defaults.libraries = []
31
+
32
+ // set the default_configuration prop
33
+ if ('debug' in gyp.opts) {
34
+ defaults.default_configuration = gyp.opts.debug ? 'Debug' : 'Release'
35
+ }
36
+
37
+ if (!defaults.default_configuration) {
38
+ defaults.default_configuration = 'Release'
39
+ }
40
+
41
+ // set the target_arch variable
42
+ variables.target_arch = gyp.opts.arch || process.arch || 'ia32'
43
+ if (variables.target_arch === 'arm64') {
44
+ defaults.msvs_configuration_platform = 'ARM64'
45
+ defaults.xcode_configuration_platform = 'arm64'
46
+ }
47
+
48
+ // set the node development directory
49
+ variables.nodedir = nodeDir
50
+
51
+ // disable -T "thin" static archives by default
52
+ variables.standalone_static_library = gyp.opts.thin ? 0 : 1
53
+
54
+ if (process.platform === 'win32') {
55
+ defaults.msbuild_toolset = vsInfo.toolset
56
+ if (vsInfo.sdk) {
57
+ defaults.msvs_windows_target_platform_version = vsInfo.sdk
58
+ }
59
+ if (variables.target_arch === 'arm64') {
60
+ if (vsInfo.versionMajor > 15 ||
61
+ (vsInfo.versionMajor === 15 && vsInfo.versionMajor >= 9)) {
62
+ defaults.msvs_enable_marmasm = 1
63
+ } else {
64
+ log.warn('Compiling ARM64 assembly is only available in\n' +
65
+ 'Visual Studio 2017 version 15.9 and above')
66
+ }
67
+ }
68
+ variables.msbuild_path = vsInfo.msBuild
69
+ }
70
+
71
+ // loop through the rest of the opts and add the unknown ones as variables.
72
+ // this allows for module-specific configure flags like:
73
+ //
74
+ // $ node-gyp configure --shared-libxml2
75
+ Object.keys(gyp.opts).forEach(function (opt) {
76
+ if (opt === 'argv') {
77
+ return
78
+ }
79
+ if (opt in gyp.configDefs) {
80
+ return
81
+ }
82
+ variables[opt.replace(/-/g, '_')] = gyp.opts[opt]
83
+ })
84
+
85
+ return config
86
+ }
87
+
88
+ function createConfigGypi ({ gyp, buildDir, nodeDir, vsInfo }, callback) {
89
+ const configFilename = 'config.gypi'
90
+ const configPath = path.resolve(buildDir, configFilename)
91
+
92
+ log.verbose('build/' + configFilename, 'creating config file')
93
+
94
+ const config = getCurrentConfigGypi({ gyp, nodeDir, vsInfo })
95
+
96
+ // ensures that any boolean values in config.gypi get stringified
97
+ function boolsToString (k, v) {
98
+ if (typeof v === 'boolean') {
99
+ return String(v)
100
+ }
101
+ return v
102
+ }
103
+
104
+ log.silly('build/' + configFilename, config)
105
+
106
+ // now write out the config.gypi file to the build/ dir
107
+ const prefix = '# Do not edit. File was generated by node-gyp\'s "configure" step'
108
+
109
+ const json = JSON.stringify(config, boolsToString, 2)
110
+ log.verbose('build/' + configFilename, 'writing out config file: %s', configPath)
111
+ fs.writeFile(configPath, [prefix, json, ''].join('\n'), (err) => {
112
+ callback(err, configPath)
113
+ })
114
+ }
115
+
116
+ module.exports = createConfigGypi
117
+ module.exports.test = {
118
+ getCurrentConfigGypi: getCurrentConfigGypi
119
+ }
@@ -11,7 +11,7 @@
11
11
  "bindings",
12
12
  "gyp"
13
13
  ],
14
- "version": "8.2.0",
14
+ "version": "8.3.0",
15
15
  "installVersion": 9,
16
16
  "author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)",
17
17
  "repository": {
@@ -25,7 +25,7 @@
25
25
  "env-paths": "^2.2.0",
26
26
  "glob": "^7.1.4",
27
27
  "graceful-fs": "^4.2.6",
28
- "make-fetch-happen": "^8.0.14",
28
+ "make-fetch-happen": "^9.1.0",
29
29
  "nopt": "^5.0.0",
30
30
  "npmlog": "^4.1.2",
31
31
  "rimraf": "^3.0.2",
@@ -127,6 +127,7 @@ class SocksProxyAgent extends agent_base_1.Agent {
127
127
  const parsedProxy = parseSocksProxy(opts);
128
128
  this.lookup = parsedProxy.lookup;
129
129
  this.proxy = parsedProxy.proxy;
130
+ this.tlsConnectionOptions = opts.tls || {};
130
131
  }
131
132
  /**
132
133
  * Initiates a SOCKS connection to the specified SOCKS proxy server,
@@ -158,9 +159,9 @@ class SocksProxyAgent extends agent_base_1.Agent {
158
159
  // The proxy is connecting to a TLS server, so upgrade
159
160
  // this socket connection to a TLS connection.
160
161
  debug('Upgrading socket connection to TLS');
161
- const servername = opts.servername || host;
162
- return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket,
163
- servername }));
162
+ const servername = opts.servername || opts.host;
163
+ return tls_1.default.connect(Object.assign(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket,
164
+ servername }), this.tlsConnectionOptions));
164
165
  }
165
166
  return socket;
166
167
  });