A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/cli/commit/7fd70fa2660c549cb564f956db0f5d0d2363db98 below:

node-gyp@11.1.0 · npm/cli@7fd70fa · GitHub

File tree Expand file treeCollapse file tree 26 files changed

+202

-169

lines changed

Filter options

Expand file treeCollapse file tree 26 files changed

+202

-169

lines changed Original file line number Diff line number Diff line change

@@ -1,3 +1,3 @@

1 1

{

2 -

".": "11.0.0"

2 +

".": "11.1.0"

3 3

}

Original file line number Diff line number Diff line change

@@ -1,3 +1,3 @@

1 1

{

2 -

".": "0.18.1"

2 +

".": "0.19.1"

3 3

}

Original file line number Diff line number Diff line change

@@ -34,7 +34,7 @@ See [Testing](Testing.md) for more details on the test framework.

34 34

Note that it can be handy to look at the project files output by the tests

35 35

to diagnose problems. The easiest way to do that is by kindly asking the

36 36

test driver to leave the temporary directories it creates in-place.

37 -

This is done by setting the enviroment variable "PRESERVE", e.g.

37 +

This is done by setting the environment variable "PRESERVE", e.g.

38 38 39 39

```

40 40

set PRESERVE=all # On Windows

Original file line number Diff line number Diff line change

@@ -157,7 +157,7 @@ have structural meaning for target definitions:

157 157

| `all_dependent_settings` | A dictionary of settings to be applied to all dependents of the target, transitively. This includes direct dependents and the entire set of their dependents, and so on. This section may contain anything found within a `target` dictionary, except `configurations`, `target_name`, and `type` sections. Compare `direct_dependent_settings` and `link_settings`. |

158 158

| `configurations` | A list of dictionaries defining build configurations for the target. See the "Configurations" section below. |

159 159

| `copies` | A list of copy actions to perform. See the "Copies" section below. |

160 -

| `defines` | A list of preprocesor definitions to be passed on the command line to the C/C++ compiler (via `-D` or `/D` options). |

160 +

| `defines` | A list of preprocessor definitions to be passed on the command line to the C/C++ compiler (via `-D` or `/D` options). |

161 161

| `dependencies` | A list of targets on which this target depends. Targets in other `.gyp` files are specified as `../path/to/other.gyp:target_we_want`. |

162 162

| `direct_dependent_settings` | A dictionary of settings to be applied to other targets that depend on this target. These settings will only be applied to direct dependents. This section may contain anything found within a `target` dictionary, except `configurations`, `target_name`, and `type` sections. Compare with `all_dependent_settings` and `link_settings`. |

163 163

| `include_dirs` | A list of include directories to be passed on the command line to the C/C++ compiler (via `-I` or `/I` options). |

@@ -208,8 +208,8 @@ Configuration dictionaries may also contain these elements:

208 208 209 209

Conditionals may appear within any dictionary in a `.gyp` file. There

210 210

are two tpes of conditionals, which differ only in the timing of their

211 -

processing. `conditons` sections are processed shortly after loading

212 -

`.gyp` files, and `target_conditons` sections are processed after all

211 +

processing. `conditions` sections are processed shortly after loading

212 +

`.gyp` files, and `target_conditions` sections are processed after all

213 213

dependencies have been computed.

214 214 215 215

A conditional section is introduced with a `conditions` or

Original file line number Diff line number Diff line change

@@ -392,15 +392,15 @@ fails the test if it does.

392 392 393 393

Verifies that the output string contains all of the "lines" in the specified

394 394

list of lines. In practice, the lines can be any substring and need not be

395 -

`\n`-terminaed lines per se. If any line is missing, the test fails.

395 +

`\n`-terminated lines per se. If any line is missing, the test fails.

396 396 397 397

```

398 398

test.must_not_contain_any_lines(output, lines)

399 399

```

400 400 401 401

Verifies that the output string does _not_ contain any of the "lines" in the

402 402

specified list of lines. In practice, the lines can be any substring and need

403 -

not be `\n`-terminaed lines per se. If any line exists in the output string,

403 +

not be `\n`-terminated lines per se. If any line exists in the output string,

404 404

the test fails.

405 405 406 406

```

@@ -409,7 +409,7 @@ the test fails.

409 409 410 410

Verifies that the output string contains at least one of the "lines" in the

411 411

specified list of lines. In practice, the lines can be any substring and need

412 -

not be `\n`-terminaed lines per se. If none of the specified lines is present,

412 +

not be `\n`-terminated lines per se. If none of the specified lines is present,

413 413

the test fails.

414 414 415 415

### Reading file contents

Original file line number Diff line number Diff line change

@@ -104,7 +104,7 @@ describing all the information necessary to build the target.

104 104 105 105

`'conditions'`: A list of condition specifications that can modify the

106 106

contents of the items in the global dictionary defined by this `.gyp`

107 -

file based on the values of different variablwes. As implied by the

107 +

file based on the values of different variables. As implied by the

108 108

above example, the most common use of a `conditions` section in the

109 109

top-level dictionary is to add platform-specific targets to the

110 110

`targets` list.

@@ -375,7 +375,7 @@ If your platform-specific file does not contain a

375 375

already in the `conditions` for the target), and you can't change the

376 376

file name, there are two patterns that can be used.

377 377 378 -

**Prefererred**: Add the file to the `sources` list of the appropriate

378 +

**Preferred**: Add the file to the `sources` list of the appropriate

379 379

dictionary within the `targets` list. Add an appropriate `conditions`

380 380

section to exclude the specific files name:

381 381

@@ -807,7 +807,7 @@ directory:

807 807

```

808 808 809 809

Adding a library often involves updating multiple `.gyp` files, adding

810 -

the target to the approprate `.gyp` file (possibly a newly-added `.gyp`

810 +

the target to the appropriate `.gyp` file (possibly a newly-added `.gyp`

811 811

file), and updating targets in the other `.gyp` files that depend on

812 812

(link with) the new library.

813 813

@@ -858,7 +858,7 @@ because of those settings' being listed in the

858 858

`direct_dependent_settings` block.

859 859 860 860

Note that these settings will likely need to be replicated in the

861 -

settings for the library target itsef, so that the library will build

861 +

settings for the library target itself, so that the library will build

862 862

with the same options. This does not prevent the target from defining

863 863

additional options for its "internal" use when compiling its own source

864 864

files. (In the above example, these are the `LOCAL_DEFINE_FOR_LIBBAR`

Original file line number Diff line number Diff line change

@@ -171,7 +171,7 @@ def ValidateMSBuild(self, value):

171 171

int(value, self._msbuild_base)

172 172 173 173

def ConvertToMSBuild(self, value):

174 -

msbuild_format = (self._msbuild_base == 10) and "%d" or "0x%04x"

174 +

msbuild_format = ((self._msbuild_base == 10) and "%d") or "0x%04x"

175 175

return msbuild_format % int(value)

176 176 177 177 Original file line number Diff line number Diff line change

@@ -69,7 +69,7 @@ def UsesVcxproj(self):

69 69 70 70

def ProjectExtension(self):

71 71

"""Returns the file extension for the project."""

72 -

return self.uses_vcxproj and ".vcxproj" or ".vcproj"

72 +

return (self.uses_vcxproj and ".vcxproj") or ".vcproj"

73 73 74 74

def Path(self):

75 75

"""Returns the path to Visual Studio installation."""

Original file line number Diff line number Diff line change

@@ -4,7 +4,7 @@

4 4

# Use of this source code is governed by a BSD-style license that can be

5 5

# found in the LICENSE file.

6 6 7 - 7 +

from __future__ import annotations

8 8

import copy

9 9

import gyp.input

10 10

import argparse

@@ -24,6 +24,18 @@

24 24

DEBUG_VARIABLES = "variables"

25 25

DEBUG_INCLUDES = "includes"

26 26 27 +

def EscapeForCString(string: bytes | str) -> str:

28 +

if isinstance(string, str):

29 +

string = string.encode(encoding='utf8')

30 + 31 +

backslash_or_double_quote = {ord('\\'), ord('"')}

32 +

result = ''

33 +

for char in string:

34 +

if char in backslash_or_double_quote or not 32 <= char < 127:

35 +

result += '\\%03o' % char

36 +

else:

37 +

result += chr(char)

38 +

return result

27 39 28 40

def DebugOutput(mode, message, *args):

29 41

if "all" in gyp.debug or mode in gyp.debug:

@@ -106,18 +118,19 @@ def Load(

106 118 107 119

output_dir = params["options"].generator_output or params["options"].toplevel_dir

108 120

if default_variables["GENERATOR"] == "ninja":

109 -

default_variables.setdefault(

110 -

"PRODUCT_DIR_ABS",

111 -

os.path.join(

112 -

output_dir, "out", default_variables.get("build_type", "default")

113 -

),

121 +

product_dir_abs = os.path.join(

122 +

output_dir, "out", default_variables.get("build_type", "default")

114 123

)

115 124

else:

116 -

default_variables.setdefault(

117 -

"PRODUCT_DIR_ABS",

118 -

os.path.join(output_dir, default_variables["CONFIGURATION_NAME"]),

125 +

product_dir_abs = os.path.join(

126 +

output_dir, default_variables["CONFIGURATION_NAME"]

119 127

)

120 128 129 +

default_variables.setdefault("PRODUCT_DIR_ABS", product_dir_abs)

130 +

default_variables.setdefault(

131 +

"PRODUCT_DIR_ABS_CSTR", EscapeForCString(product_dir_abs)

132 +

)

133 + 121 134

# Give the generator the opportunity to set additional variables based on

122 135

# the params it will receive in the output phase.

123 136

if getattr(generator, "CalculateVariables", None):

@@ -253,7 +266,7 @@ def Noop(value):

253 266

for name, metadata in options._regeneration_metadata.items():

254 267

opt = metadata["opt"]

255 268

value = getattr(options, name)

256 -

value_predicate = metadata["type"] == "path" and FixPath or Noop

269 +

value_predicate = (metadata["type"] == "path" and FixPath) or Noop

257 270

action = metadata["action"]

258 271

env_name = metadata["env_name"]

259 272

if action == "append":

Original file line number Diff line number Diff line change

@@ -699,7 +699,7 @@ def find_matching_test_target_names(self):

699 699

) & set(self._root_targets)

700 700

if matching_test_targets_contains_all:

701 701

# Remove any of the targets for all that were not explicitly supplied,

702 -

# 'all' is subsequentely added to the matching names below.

702 +

# 'all' is subsequently added to the matching names below.

703 703

matching_test_targets = list(

704 704

set(matching_test_targets) & set(test_targets_no_all)

705 705

)

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4