Skip to content

Commit a74a19c

Browse files
committed
1 parent f5f6cf7 commit a74a19c

17 files changed

+46
-36
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "12.1.0"
2+
".": "12.2.0"
33
}

node_modules/node-gyp/CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Contributing to node-gyp
22

3+
## Making changes to gyp-next
4+
5+
Changes in the subfolder `gyp/` should be submitted to the
6+
[`gyp-next`][] repository first. The `gyp/` folder is regularly
7+
synced from [`gyp-next`][] with GitHub Actions workflow
8+
[`update-gyp-next.yml`](.github/workflows/update-gyp-next.yml),
9+
and any changes in this folder would be overridden by the workflow.
10+
311
## Code of Conduct
412

513
Please read the
@@ -32,3 +40,5 @@ By making a contribution to this project, I certify that:
3240
personal information I submit with it, including my sign-off) is
3341
maintained indefinitely and may be redistributed consistent with
3442
this project or the open source license(s) involved.
43+
44+
[`gyp-next`]: https://github.com/nodejs/gyp-next

node_modules/node-gyp/bin/node-gyp.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ function errorMessage () {
125125
log.error('cwd', process.cwd())
126126
log.error('node -v', process.version)
127127
log.error('node-gyp -v', 'v' + prog.package.version)
128+
// print the npm package version
129+
for (const env of ['npm_package_name', 'npm_package_version']) {
130+
const value = process.env[env]
131+
if (value != null) {
132+
log.error(`$${env}`, value)
133+
}
134+
}
128135
}
129136

130137
function issueMessage () {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.21.0"
2+
".": "0.21.1"
33
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def MakeGuid(name, seed="msvs_new"):
3434
3535
Args:
3636
name: Target name.
37-
seed: Seed for MD5 hash.
37+
seed: Seed for SHA-256 hash.
3838
Returns:
3939
A GUID-line string calculated from the name and seed.
4040
@@ -44,8 +44,8 @@ def MakeGuid(name, seed="msvs_new"):
4444
determine the GUID to refer to explicitly. It also means that the GUID will
4545
not change when the project for a target is rebuilt.
4646
"""
47-
# Calculate a MD5 signature for the seed and name.
48-
d = hashlib.md5((str(seed) + str(name)).encode("utf-8")).hexdigest().upper()
47+
# Calculate a SHA-256 signature for the seed and name.
48+
d = hashlib.sha256((str(seed) + str(name)).encode("utf-8")).hexdigest().upper()
4949
# Convert most of the signature to GUID form (discard the rest)
5050
guid = (
5151
"{"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ def WriteMakeRule(
21692169
# - The multi-output rule will have an do-nothing recipe.
21702170

21712171
# Hash the target name to avoid generating overlong filenames.
2172-
cmddigest = hashlib.sha1(
2172+
cmddigest = hashlib.sha256(
21732173
(command or self.target).encode("utf-8")
21742174
).hexdigest()
21752175
intermediate = "%s.intermediate" % cmddigest

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -809,9 +809,8 @@ def cygwin_munge(path):
809809
outputs = [self.GypPathToNinja(o, env) for o in outputs]
810810
if self.flavor == "win":
811811
# WriteNewNinjaRule uses unique_name to create a rsp file on win.
812-
extra_bindings.append(
813-
("unique_name", hashlib.md5(outputs[0]).hexdigest())
814-
)
812+
unique_name = hashlib.sha256(outputs[0].encode("utf-8")).hexdigest()
813+
extra_bindings.append(("unique_name", unique_name))
815814

816815
self.ninja.build(
817816
outputs,
@@ -2803,7 +2802,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, config_name
28032802
build_file, name, toolset
28042803
)
28052804
qualified_target_for_hash = qualified_target_for_hash.encode("utf-8")
2806-
hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest()
2805+
hash_for_rules = hashlib.sha256(qualified_target_for_hash).hexdigest()
28072806

28082807
base_path = os.path.dirname(build_file)
28092808
obj = "obj"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def _HashUpdate(hash, data):
429429
hash.update(data)
430430

431431
if seed_hash is None:
432-
seed_hash = hashlib.sha1()
432+
seed_hash = hashlib.sha256()
433433

434434
hash = seed_hash.copy()
435435

node_modules/node-gyp/gyp/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "gyp-next"
7-
version = "0.21.0"
7+
version = "0.21.1"
88
authors = [
99
{ name="Node.js contributors", email="[email protected]" },
1010
]

node_modules/node-gyp/lib/build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ async function build (gyp, argv) {
163163
if (!isNaN(j) && j > 0) {
164164
argv.push('/m:' + j)
165165
} else if (jobs.toUpperCase() === 'MAX') {
166-
argv.push('/m:' + require('os').cpus().length)
166+
argv.push('/m:' + require('os').availableParallelism())
167167
}
168168
}
169169
} else {
@@ -178,7 +178,7 @@ async function build (gyp, argv) {
178178
argv.push(j)
179179
} else if (jobs.toUpperCase() === 'MAX') {
180180
argv.push('--jobs')
181-
argv.push(require('os').cpus().length)
181+
argv.push(require('os').availableParallelism())
182182
}
183183
}
184184
}

0 commit comments

Comments
 (0)