| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,13 @@ | |||
| 1 | 1 | # Changelog | |
| 2 | 2 | ||
| 3 | + ## [0.20.5](https://github.com/nodejs/gyp-next/compare/v0.20.4...v0.20.5) (2025-10-13) | ||
| 4 | + | ||
| 5 | + | ||
| 6 | + ### Bug Fixes | ||
| 7 | + | ||
| 8 | + * Fix ruff v0.13.0 adds ruff rule RUF059 ([bd4491a](https://github.com/nodejs/gyp-next/commit/bd4491a3ba641eeb040b785bbce367f72c3baf19)) | ||
| 9 | + * handle `None` case in xcode_emulation regexes ([#311](https://github.com/nodejs/gyp-next/issues/311)) ([b21ee31](https://github.com/nodejs/gyp-next/commit/b21ee3150eea9fc1a8811e910e5ba64f42e1fb77)) | ||
| 10 | + | ||
| 3 | 11 | ## [0.20.4](https://github.com/nodejs/gyp-next/compare/v0.20.3...v0.20.4) (2025-08-25) | |
| 4 | 12 | ||
| 5 | 13 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -378,7 +378,7 @@ def WriteRules(self, rules, extra_sources, extra_outputs): | |||
| 378 | 378 | inputs = rule.get("inputs") | |
| 379 | 379 | for rule_source in rule.get("rule_sources", []): | |
| 380 | 380 | (rule_source_dirname, rule_source_basename) = os.path.split(rule_source) | |
| 381 | - (rule_source_root, rule_source_ext) = os.path.splitext( | ||
| 381 | + (rule_source_root, _rule_source_ext) = os.path.splitext( | ||
| 382 | 382 | rule_source_basename | |
| 383 | 383 | ) | |
| 384 | 384 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -100,7 +100,7 @@ def resolve(filename): | |||
| 100 | 100 | def GenerateOutput(target_list, target_dicts, data, params): | |
| 101 | 101 | per_config_commands = {} | |
| 102 | 102 | for qualified_target, target in target_dicts.items(): | |
| 103 | - build_file, target_name, toolset = gyp.common.ParseQualifiedTarget( | ||
| 103 | + build_file, _target_name, _toolset = gyp.common.ParseQualifiedTarget( | ||
| 104 | 104 | qualified_target | |
| 105 | 105 | ) | |
| 106 | 106 | if IsMac(params): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,7 +73,7 @@ | |||
| 73 | 73 | def GenerateOutput(target_list, target_dicts, data, params): | |
| 74 | 74 | output_files = {} | |
| 75 | 75 | for qualified_target in target_list: | |
| 76 | - [input_file, target] = gyp.common.ParseQualifiedTarget(qualified_target)[0:2] | ||
| 76 | + [input_file, _target] = gyp.common.ParseQualifiedTarget(qualified_target)[0:2] | ||
| 77 | 77 | ||
| 78 | 78 | if input_file[-4:] != ".gyp": | |
| 79 | 79 | continue | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1169,7 +1169,7 @@ def WriteRules( | |||
| 1169 | 1169 | for rule_source in rule.get("rule_sources", []): | |
| 1170 | 1170 | dirs = set() | |
| 1171 | 1171 | (rule_source_dirname, rule_source_basename) = os.path.split(rule_source) | |
| 1172 | - (rule_source_root, rule_source_ext) = os.path.splitext( | ||
| 1172 | + (rule_source_root, _rule_source_ext) = os.path.splitext( | ||
| 1173 | 1173 | rule_source_basename | |
| 1174 | 1174 | ) | |
| 1175 | 1175 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1666,7 +1666,7 @@ def _HandlePreCompiledHeaders(p, sources, spec): | |||
| 1666 | 1666 | p.AddFileConfig( | |
| 1667 | 1667 | source, _ConfigFullName(config_name, config), {}, tools=[tool] | |
| 1668 | 1668 | ) | |
| 1669 | - basename, extension = os.path.splitext(source) | ||
| 1669 | + _basename, extension = os.path.splitext(source) | ||
| 1670 | 1670 | if extension == ".c": | |
| 1671 | 1671 | extensions_excluded_from_precompile = [".cc", ".cpp", ".cxx"] | |
| 1672 | 1672 | else: | |
@@ -1677,7 +1677,7 @@ def DisableForSourceTree(source_tree): | |||
| 1677 | 1677 | if isinstance(source, MSVSProject.Filter): | |
| 1678 | 1678 | DisableForSourceTree(source.contents) | |
| 1679 | 1679 | else: | |
| 1680 | - basename, extension = os.path.splitext(source) | ||
| 1680 | + _basename, extension = os.path.splitext(source) | ||
| 1681 | 1681 | if extension in extensions_excluded_from_precompile: | |
| 1682 | 1682 | for config_name, config in spec["configurations"].items(): | |
| 1683 | 1683 | tool = MSVSProject.Tool( | |
@@ -3579,7 +3579,7 @@ def _AddSources2( | |||
| 3579 | 3579 | # If the precompiled header is generated by a C source, | |
| 3580 | 3580 | # we must not try to use it for C++ sources, | |
| 3581 | 3581 | # and vice versa. | |
| 3582 | - basename, extension = os.path.splitext(precompiled_source) | ||
| 3582 | + _basename, extension = os.path.splitext(precompiled_source) | ||
| 3583 | 3583 | if extension == ".c": | |
| 3584 | 3584 | extensions_excluded_from_precompile = [ | |
| 3585 | 3585 | ".cc", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -531,7 +531,7 @@ def AddSourceToTarget(source, type, pbxp, xct): | |||
| 531 | 531 | library_extensions = ["a", "dylib", "framework", "o"] | |
| 532 | 532 | ||
| 533 | 533 | basename = posixpath.basename(source) | |
| 534 | - (root, ext) = posixpath.splitext(basename) | ||
| 534 | + (_root, ext) = posixpath.splitext(basename) | ||
| 535 | 535 | if ext: | |
| 536 | 536 | ext = ext[1:].lower() | |
| 537 | 537 | ||
@@ -696,7 +696,7 @@ def GenerateOutput(target_list, target_dicts, data, params): | |||
| 696 | 696 | xcode_targets = {} | |
| 697 | 697 | xcode_target_to_target_dict = {} | |
| 698 | 698 | for qualified_target in target_list: | |
| 699 | - [build_file, target_name, toolset] = gyp.common.ParseQualifiedTarget( | ||
| 699 | + [build_file, target_name, _toolset] = gyp.common.ParseQualifiedTarget( | ||
| 700 | 700 | qualified_target | |
| 701 | 701 | ) | |
| 702 | 702 | ||
@@ -1215,7 +1215,7 @@ def GenerateOutput(target_list, target_dicts, data, params): | |||
| 1215 | 1215 | ||
| 1216 | 1216 | # Add "sources". | |
| 1217 | 1217 | for source in spec.get("sources", []): | |
| 1218 | - (source_root, source_extension) = posixpath.splitext(source) | ||
| 1218 | + (_source_root, source_extension) = posixpath.splitext(source) | ||
| 1219 | 1219 | if source_extension[1:] not in rules_by_ext: | |
| 1220 | 1220 | # AddSourceToTarget will add the file to a root group if it's not | |
| 1221 | 1221 | # already there. | |
@@ -1227,7 +1227,7 @@ def GenerateOutput(target_list, target_dicts, data, params): | |||
| 1227 | 1227 | # it's a bundle of any type. | |
| 1228 | 1228 | if is_bundle: | |
| 1229 | 1229 | for resource in tgt_mac_bundle_resources: | |
| 1230 | - (resource_root, resource_extension) = posixpath.splitext(resource) | ||
| 1230 | + (_resource_root, resource_extension) = posixpath.splitext(resource) | ||
| 1231 | 1231 | if resource_extension[1:] not in rules_by_ext: | |
| 1232 | 1232 | AddResourceToTarget(resource, pbxp, xct) | |
| 1233 | 1233 | else: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2757,7 +2757,7 @@ def ValidateRulesInTarget(target, target_dict, extra_sources_for_rules): | |||
| 2757 | 2757 | source_keys.extend(extra_sources_for_rules) | |
| 2758 | 2758 | for source_key in source_keys: | |
| 2759 | 2759 | for source in target_dict.get(source_key, []): | |
| 2760 | - (source_root, source_extension) = os.path.splitext(source) | ||
| 2760 | + (_source_root, source_extension) = os.path.splitext(source) | ||
| 2761 | 2761 | if source_extension.startswith("."): | |
| 2762 | 2762 | source_extension = source_extension[1:] | |
| 2763 | 2763 | if source_extension == rule_extension: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1534,18 +1534,20 @@ def CLTVersion(): | |||
| 1534 | 1534 | FROM_XCODE_PKG_ID = "com.apple.pkg.DeveloperToolsCLI" | |
| 1535 | 1535 | MAVERICKS_PKG_ID = "com.apple.pkg.CLTools_Executables" | |
| 1536 | 1536 | ||
| 1537 | - regex = re.compile("version: (?P<version>.+)") | ||
| 1537 | + regex = re.compile(r"version: (?P<version>.+)") | ||
| 1538 | 1538 | for key in [MAVERICKS_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID]: | |
| 1539 | 1539 | try: | |
| 1540 | 1540 | output = GetStdout(["/usr/sbin/pkgutil", "--pkg-info", key]) | |
| 1541 | - return re.search(regex, output).groupdict()["version"] | ||
| 1541 | + if m := re.search(regex, output): | ||
| 1542 | + return m.groupdict()["version"] | ||
| 1542 | 1543 | except (GypError, OSError): | |
| 1543 | 1544 | continue | |
| 1544 | 1545 | ||
| 1545 | 1546 | regex = re.compile(r"Command Line Tools for Xcode\s+(?P<version>\S+)") | |
| 1546 | 1547 | try: | |
| 1547 | 1548 | output = GetStdout(["/usr/sbin/softwareupdate", "--history"]) | |
| 1548 | - return re.search(regex, output).groupdict()["version"] | ||
| 1549 | + if m := re.search(regex, output): | ||
| 1550 | + return m.groupdict()["version"] | ||
| 1549 | 1551 | except (GypError, OSError): | |
| 1550 | 1552 | return None | |
| 1551 | 1553 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | 23 | def _WriteWorkspace(main_gyp, sources_gyp, params): | |
| 24 | 24 | """Create a workspace to wrap main and sources gyp paths.""" | |
| 25 | - (build_file_root, build_file_ext) = os.path.splitext(main_gyp) | ||
| 25 | + (build_file_root, _build_file_ext) = os.path.splitext(main_gyp) | ||
| 26 | 26 | workspace_path = build_file_root + ".xcworkspace" | |
| 27 | 27 | options = params["options"] | |
| 28 | 28 | if options.generator_output: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments