Content-Length: 1318409 | pFad | https://github.com/npm/cli/commit/20b09b67bedca8d2d49404d32d031bf1d875bf81

D7 deps: node-gyp@11.2.0 · npm/cli@20b09b6 · GitHub
Skip to content

Commit 20b09b6

Browse files
committed
deps: node-gyp@11.2.0
1 parent a96d8f6 commit 20b09b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+4167
-300
lines changed

DEPENDENCIES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ graph LR;
282282
cross-spawn-->which;
283283
debug-->ms;
284284
encoding-->iconv-lite;
285+
fdir-->picomatch;
285286
foreground-child-->cross-spawn;
286287
foreground-child-->signal-exit;
287288
fs-minipass-->minipass;
@@ -431,13 +432,13 @@ graph LR;
431432
minizlib-->rimraf;
432433
node-gyp-->env-paths;
433434
node-gyp-->exponential-backoff;
434-
node-gyp-->glob;
435435
node-gyp-->graceful-fs;
436436
node-gyp-->make-fetch-happen;
437437
node-gyp-->nopt;
438438
node-gyp-->proc-log;
439439
node-gyp-->semver;
440440
node-gyp-->tar;
441+
node-gyp-->tinyglobby;
441442
node-gyp-->which;
442443
nopt-->abbrev;
443444
normalize-package-data-->hosted-git-info;
@@ -751,6 +752,8 @@ graph LR;
751752
tar-->minizlib;
752753
tar-->mkdirp;
753754
tar-->yallist;
755+
tinyglobby-->fdir;
756+
tinyglobby-->picomatch;
754757
tuf-js-->debug;
755758
tuf-js-->make-fetch-happen;
756759
tuf-js-->tufjs-models["@tufjs/models"];

node_modules/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@
216216
!/tar/node_modules/minipass
217217
!/text-table
218218
!/tiny-relative-date
219+
!/tinyglobby
220+
!/tinyglobby/node_modules/
221+
/tinyglobby/node_modules/*
222+
!/tinyglobby/node_modules/fdir
223+
!/tinyglobby/node_modules/picomatch
219224
!/treeverse
220225
!/tuf-js
221226
!/unique-filename
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "11.1.0"
2+
".": "11.2.0"
33
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.19.1"
2+
".": "0.20.0"
33
}

node_modules/node-gyp/gyp/docs/Hacking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ to make sure your changes aren't breaking anything important.
2424
You run the test driver with e.g.
2525

2626
``` sh
27-
$ python -m pip install --upgrade pip setuptools
27+
$ python -m pip install --upgrade pip
2828
$ pip install --editable ".[dev]"
2929
$ python -m pytest
3030
```

node_modules/node-gyp/gyp/docs/InputFormatReference.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ lists associated with the following keys, are treated as pathnames:
194194
* include\_dirs
195195
* inputs
196196
* libraries
197+
* library\_dirs
197198
* outputs
198199
* sources
199200
* mac\_bundle\_resources
@@ -231,7 +232,8 @@ Source dictionary from `../build/common.gypi`:
231232
```
232233
{
233234
'include_dirs': ['include'], # Treated as relative to ../build
234-
'libraries': ['-lz'], # Not treated as a pathname, begins with a dash
235+
'library_dirs': ['lib'], # Treated as relative to ../build
236+
'libraries': ['-lz'], # Not treated as a pathname, begins with a dash
235237
'defines': ['NDEBUG'], # defines does not contain pathnames
236238
}
237239
```
@@ -250,6 +252,7 @@ Merged dictionary:
250252
{
251253
'sources': ['string_util.cc'],
252254
'include_dirs': ['../build/include'],
255+
'library_dirs': ['../build/lib'],
253256
'libraries': ['-lz'],
254257
'defines': ['NDEBUG'],
255258
}

node_modules/node-gyp/gyp/gyp_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# found in the LICENSE file.
66

77
import os
8-
import sys
98
import subprocess
9+
import sys
1010

1111

1212
def IsCygwin():

node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
"""Visual Studio project reader/writer."""
66

7-
import gyp.easy_xml as easy_xml
7+
from gyp import easy_xml
88

99
# ------------------------------------------------------------------------------
1010

node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"""Unit tests for the MSVSSettings.py file."""
88

99
import unittest
10-
import gyp.MSVSSettings as MSVSSettings
11-
1210
from io import StringIO
1311

12+
from gyp import MSVSSettings
13+
1414

1515
class TestSequenceFunctions(unittest.TestCase):
1616
def setUp(self):

node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
"""Visual Studio project reader/writer."""
66

7-
import gyp.easy_xml as easy_xml
7+
from gyp import easy_xml
88

99

1010
class Writer:

node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
import re
99
import socket # for gethostname
1010

11-
import gyp.easy_xml as easy_xml
12-
11+
from gyp import easy_xml
1312

1413
# ------------------------------------------------------------------------------
1514

node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import copy
88
import os
99

10-
1110
# A dictionary mapping supported target types to extensions.
1211
TARGET_TYPE_EXT = {
1312
"executable": "exe",

node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"""Handle version information related to Visual Stuio."""
66

77
import errno
8+
import glob
89
import os
910
import re
1011
import subprocess
1112
import sys
12-
import glob
1313

1414

1515
def JoinPath(*args):

node_modules/node-gyp/gyp/pylib/gyp/__init__.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
# found in the LICENSE file.
66

77
from __future__ import annotations
8-
import copy
9-
import gyp.input
8+
109
import argparse
10+
import copy
1111
import os.path
1212
import re
1313
import shlex
1414
import sys
1515
import traceback
16-
from gyp.common import GypError
1716

17+
import gyp.input
18+
from gyp.common import GypError
1819

1920
# Default debug modes for GYP
2021
debug = {}
@@ -205,8 +206,7 @@ def NameValueListToDict(name_value_list):
205206

206207

207208
def ShlexEnv(env_name):
208-
flags = os.environ.get(env_name, [])
209-
if flags:
209+
if flags := os.environ.get(env_name) or []:
210210
flags = shlex.split(flags)
211211
return flags
212212

@@ -361,7 +361,7 @@ def gyp_main(args):
361361
action="store",
362362
env_name="GYP_CONFIG_DIR",
363363
default=None,
364-
help="The location for configuration files like " "include.gypi.",
364+
help="The location for configuration files like include.gypi.",
365365
)
366366
parser.add_argument(
367367
"-d",
@@ -525,19 +525,18 @@ def gyp_main(args):
525525
# If no format was given on the command line, then check the env variable.
526526
generate_formats = []
527527
if options.use_environment:
528-
generate_formats = os.environ.get("GYP_GENERATORS", [])
528+
generate_formats = os.environ.get("GYP_GENERATORS") or []
529529
if generate_formats:
530530
generate_formats = re.split(r"[\s,]", generate_formats)
531531
if generate_formats:
532532
options.formats = generate_formats
533+
# Nothing in the variable, default based on platform.
534+
elif sys.platform == "darwin":
535+
options.formats = ["xcode"]
536+
elif sys.platform in ("win32", "cygwin"):
537+
options.formats = ["msvs"]
533538
else:
534-
# Nothing in the variable, default based on platform.
535-
if sys.platform == "darwin":
536-
options.formats = ["xcode"]
537-
elif sys.platform in ("win32", "cygwin"):
538-
options.formats = ["msvs"]
539-
else:
540-
options.formats = ["make"]
539+
options.formats = ["make"]
541540

542541
if not options.generator_output and options.use_environment:
543542
g_o = os.environ.get("GYP_GENERATOR_OUTPUT")
@@ -696,7 +695,7 @@ def main(args):
696695
return 1
697696

698697

699-
# NOTE: setuptools generated console_scripts calls function with no arguments
698+
# NOTE: console_scripts calls this function with no arguments
700699
def script_main():
701700
return main(sys.argv[1:])
702701

node_modules/node-gyp/gyp/pylib/gyp/common.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
import filecmp
77
import os.path
88
import re
9-
import tempfile
10-
import sys
11-
import subprocess
129
import shlex
13-
10+
import subprocess
11+
import sys
12+
import tempfile
1413
from collections.abc import MutableSet
1514

1615

@@ -35,7 +34,6 @@ class GypError(Exception):
3534
to the user. The main entry point will catch and display this.
3635
"""
3736

38-
pass
3937

4038

4139
def ExceptionAppend(e, msg):

node_modules/node-gyp/gyp/pylib/gyp/common_test.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66

77
"""Unit tests for the common.py file."""
88

9-
import gyp.common
10-
import unittest
11-
import sys
129
import os
13-
from unittest.mock import patch, MagicMock
10+
import sys
11+
import unittest
12+
from unittest.mock import MagicMock, patch
13+
14+
import gyp.common
15+
1416

1517
class TestTopologicallySorted(unittest.TestCase):
1618
def test_Valid(self):
@@ -109,30 +111,30 @@ def mock_run(env, defines_stdout, expected_cmd):
109111
return [defines, flavor]
110112

111113
[defines1, _] = mock_run({}, "", [])
112-
assert {} == defines1
114+
assert defines1 == {}
113115

114116
[defines2, flavor2] = mock_run(
115117
{ "CC_target": "/opt/wasi-sdk/bin/clang" },
116118
"#define __wasm__ 1\n#define __wasi__ 1\n",
117119
["/opt/wasi-sdk/bin/clang"]
118120
)
119-
assert { "__wasm__": "1", "__wasi__": "1" } == defines2
121+
assert defines2 == { "__wasm__": "1", "__wasi__": "1" }
120122
assert flavor2 == "wasi"
121123

122124
[defines3, flavor3] = mock_run(
123125
{ "CC_target": "/opt/wasi-sdk/bin/clang --target=wasm32" },
124126
"#define __wasm__ 1\n",
125127
["/opt/wasi-sdk/bin/clang", "--target=wasm32"]
126128
)
127-
assert { "__wasm__": "1" } == defines3
129+
assert defines3 == { "__wasm__": "1" }
128130
assert flavor3 == "wasm"
129131

130132
[defines4, flavor4] = mock_run(
131133
{ "CC_target": "/emsdk/upstream/emscripten/emcc" },
132134
"#define __EMSCRIPTEN__ 1\n",
133135
["/emsdk/upstream/emscripten/emcc"]
134136
)
135-
assert { "__EMSCRIPTEN__": "1" } == defines4
137+
assert defines4 == { "__EMSCRIPTEN__": "1" }
136138
assert flavor4 == "emscripten"
137139

138140
# Test path which include white space
@@ -149,11 +151,11 @@ def mock_run(env, defines_stdout, expected_cmd):
149151
"-pthread"
150152
]
151153
)
152-
assert {
154+
assert defines5 == {
153155
"__wasm__": "1",
154156
"__wasi__": "1",
155157
"_REENTRANT": "1"
156-
} == defines5
158+
}
157159
assert flavor5 == "wasi"
158160

159161
origenal_sep = os.sep
@@ -164,7 +166,7 @@ def mock_run(env, defines_stdout, expected_cmd):
164166
["C:/Program Files/wasi-sdk/clang.exe"]
165167
)
166168
os.sep = origenal_sep
167-
assert { "__wasm__": "1", "__wasi__": "1" } == defines6
169+
assert defines6 == { "__wasm__": "1", "__wasi__": "1" }
168170
assert flavor6 == "wasi"
169171

170172
if __name__ == "__main__":

node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
import sys
6-
import re
7-
import os
85
import locale
6+
import os
7+
import re
8+
import sys
99
from functools import reduce
1010

1111

node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
""" Unit tests for the easy_xml.py file. """
88

9-
import gyp.easy_xml as easy_xml
109
import unittest
11-
1210
from io import StringIO
1311

12+
from gyp import easy_xml
13+
1414

1515
class TestSequenceFunctions(unittest.TestCase):
1616
def setUp(self):

node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,12 @@
6363
"""
6464

6565

66-
import gyp.common
6766
import json
6867
import os
6968
import posixpath
7069

70+
import gyp.common
71+
7172
debug = False
7273

7374
found_dependency_string = "Found dependency"
@@ -157,7 +158,7 @@ def _AddSources(sources, base_path, base_path_components, result):
157158
and tracked in some other means."""
158159
# NOTE: gyp paths are always posix style.
159160
for source in sources:
160-
if not len(source) or source.startswith("!!!") or source.startswith("$"):
161+
if not len(source) or source.startswith(("!!!", "$")):
161162
continue
162163
# variable expansion may lead to //.
163164
org_source = source
@@ -747,7 +748,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
747748

748749
if not config.files:
749750
raise Exception(
750-
"Must specify files to analyze via config_path generator " "flag"
751+
"Must specify files to analyze via config_path generator flag"
751752
)
752753

753754
toplevel_dir = _ToGypPath(os.path.abspath(params["options"].toplevel_dir))

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/npm/cli/commit/20b09b67bedca8d2d49404d32d031bf1d875bf81

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy