-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace InvariantCulture{IgnoreCase} with Ordinal{IgnoreCase} #552
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StringComparison.InvariantCulture{IgnoreCase} is _almost_ never the right answer; usually Ordinal{IgnoreCase} is what's desirable, and happily is also faster. Along the way I fixed a few things touching the code I was updating, like some unnecessary ToUpperInvariant calls, dead methods, and duplicate IndexOf calls.
dluc
approved these changes
Apr 20, 2023
dehoward
pushed a commit
to lemillermicrosoft/semantic-kernel
that referenced
this pull request
Jun 1, 2023
…oft#552) ### Motivation and Context Fix likely erroneous use of StringComparison.InvariantCulture{IgnoreCase}. ### Description StringComparison.InvariantCulture{IgnoreCase} is _almost_ never the right answer (linguistic comparison rules in a culture similar to en-US); usually Ordinal{IgnoreCase} is what's desirable, and happily is also faster. Along the way I fixed a few things touching the code I was updating, like some unnecessary ToUpperInvariant calls, dead methods, and duplicate IndexOf calls.
Bryan-Roe
pushed a commit
to BMR-Cloud-Dev/semantic
that referenced
this pull request
Aug 17, 2024
…oft#552) Bumps the npm_and_yarn group with 2 updates in the /vscode-azure-account-main directory: [semver](https://github.com/npm/node-semver) and [webpack](https://github.com/webpack/webpack). Updates `semver` from 7.5.3 to 7.5.4 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/npm/node-semver/releases">semver's releases</a>.</em></p> <blockquote> <h2>v7.5.4</h2> <h2><a href="https://github.com/npm/node-semver/compare/v7.5.3...v7.5.4">7.5.4</a> (2023-07-07)</h2> <h3>Bug Fixes</h3> <ul> <li><a href="https://github.com/npm/node-semver/commit/cc6fde2d34b95cb600d126649d926901bd2a9703"><code>cc6fde2</code></a> <a href="https://redirect.github.com/npm/node-semver/pull/588">#588</a> trim each range set before parsing (<a href="https://github.com/lukekarrys"><code>@lukekarrys</code></a>)</li> <li><a href="https://github.com/npm/node-semver/commit/99d8287516a1d2abf0286033e2e26eca6b69c09f"><code>99d8287</code></a> <a href="https://redirect.github.com/npm/node-semver/pull/583">#583</a> correctly parse long build ids as valid (<a href="https://redirect.github.com/npm/node-semver/issues/583">#583</a>) (<a href="https://github.com/lukekarrys"><code>@lukekarrys</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/npm/node-semver/blob/main/CHANGELOG.md">semver's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/npm/node-semver/compare/v7.5.3...v7.5.4">7.5.4</a> (2023-07-07)</h2> <h3>Bug Fixes</h3> <ul> <li><a href="https://github.com/npm/node-semver/commit/cc6fde2d34b95cb600d126649d926901bd2a9703"><code>cc6fde2</code></a> <a href="https://redirect.github.com/npm/node-semver/pull/588">#588</a> trim each range set before parsing (<a href="https://github.com/lukekarrys"><code>@lukekarrys</code></a>)</li> <li><a href="https://github.com/npm/node-semver/commit/99d8287516a1d2abf0286033e2e26eca6b69c09f"><code>99d8287</code></a> <a href="https://redirect.github.com/npm/node-semver/pull/583">#583</a> correctly parse long build ids as valid (<a href="https://redirect.github.com/npm/node-semver/issues/583">#583</a>) (<a href="https://github.com/lukekarrys"><code>@lukekarrys</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/npm/node-semver/commit/36cd334708ec1f85a71445622fb1864bceee0f4e"><code>36cd334</code></a> chore: release 7.5.4</li> <li><a href="https://github.com/npm/node-semver/commit/8456d87971a447ce295d9f1a396b37b29a972a63"><code>8456d87</code></a> chore: postinstall for dependabot template-oss PR</li> <li><a href="https://github.com/npm/node-semver/commit/dde1f002baadf7b4cc45504c4046d13586de11b7"><code>dde1f00</code></a> chore: postinstall for dependabot template-oss PR</li> <li><a href="https://github.com/npm/node-semver/commit/dffcd1b07ec6a192bc0fb405d30d19da46fdc690"><code>dffcd1b</code></a> chore: bump <code>@npmcli/template-oss</code> from 4.16.0 to 4.17.0</li> <li><a href="https://github.com/npm/node-semver/commit/d619f66513a0fa953177882ecee2c365a65efe97"><code>d619f66</code></a> chore: postinstall for dependabot template-oss PR</li> <li><a href="https://github.com/npm/node-semver/commit/3bc42477d1a69361eb79978851be090e5fb4bc2a"><code>3bc4247</code></a> chore: bump <code>@npmcli/template-oss</code> from 4.15.1 to 4.16.0</li> <li><a href="https://github.com/npm/node-semver/commit/cc6fde2d34b95cb600d126649d926901bd2a9703"><code>cc6fde2</code></a> fix: trim each range set before parsing</li> <li><a href="https://github.com/npm/node-semver/commit/99d8287516a1d2abf0286033e2e26eca6b69c09f"><code>99d8287</code></a> fix: correctly parse long build ids as valid (<a href="https://redirect.github.com/npm/node-semver/issues/583">#583</a>)</li> <li><a href="https://github.com/npm/node-semver/commit/4f0f6b19a54b1ba7e1c62af2dfba61f7a4fa68d5"><code>4f0f6b1</code></a> chore: fix arguments in whitespace test (<a href="https://redirect.github.com/npm/node-semver/issues/574">#574</a>)</li> <li><a href="https://github.com/npm/node-semver/commit/6bd1a37f95904512015353a3a5dd726f785c9eb8"><code>6bd1a37</code></a> chore: remove duplicate test in semver class (<a href="https://redirect.github.com/npm/node-semver/issues/575">#575</a>)</li> <li>See full diff in <a href="https://github.com/npm/node-semver/compare/v7.5.3...v7.5.4">compare view</a></li> </ul> </details> <br /> Updates `webpack` from 5.76.1 to 5.76.2 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/webpack/webpack/releases">webpack's releases</a>.</em></p> <blockquote> <h2>v5.76.2</h2> <h2>Bugfixes</h2> <ul> <li>Fix bug where a missing semicolon in generated bundle output for <code>publicPathRuntime</code> would cause concatenated runtime errors by <a href="https://github.com/snitin315"><code>@snitin315</code></a> in <a href="https://redirect.github.com/webpack/webpack/pull/16811">webpack/webpack#16811</a></li> <li>Remove redundant semicolons generated in bundle runtime code after <code>onScriptComplete</code> function by <a href="https://github.com/ahaoboy"><code>@ahaoboy</code></a> in <a href="https://redirect.github.com/webpack/webpack/pull/16347">webpack/webpack#16347</a></li> <li>Fix bug where <code>RealContentHashPlugin</code> was not respecting <code>output.hashSalt</code>'s ability to cause a force recalculation of <code>[contenthash]</code> for emitted assets by <a href="https://github.com/dmichon-msft"><code>@dmichon-msft</code></a> <a href="https://redirect.github.com/webpack/webpack/issues/16789">#16789</a></li> </ul> <h2>Performance</h2> <ul> <li>Improve memory and runtime performance of sourcemaps via hoisting Regular Expression literals to stored variables by <a href="https://github.com/TheLarkInn"><code>@TheLarkInn</code></a> in <a href="https://redirect.github.com/webpack/webpack/pull/15722">webpack/webpack#15722</a></li> <li>Correct v8 deoptimization in <code>ModuleGraph</code> due to instance property declarations occurring outside of constructor by <a href="https://github.com/snitin315"><code>@snitin315</code></a> in <a href="https://redirect.github.com/webpack/webpack/pull/16830">webpack/webpack#16830</a></li> </ul> <h2>Developer Experience</h2> <ul> <li>Improved internal typings to match <code>webpack-sources</code> typings for <code>Source</code> instances by <a href="https://github.com/snitin315"><code>@snitin315</code></a> in <a href="https://redirect.github.com/webpack/webpack/pull/16805">webpack/webpack#16805</a></li> <li>Update repo examples to include missing quotation by <a href="https://github.com/snitin315"><code>@snitin315</code></a> in <a href="https://redirect.github.com/webpack/webpack/pull/16812">webpack/webpack#16812</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/ahaoboy"><code>@ahaoboy</code></a> made their first contribution in <a href="https://redirect.github.com/webpack/webpack/pull/16347">webpack/webpack#16347</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/webpack/webpack/compare/v5.76.1...v5.76.2">https://github.com/webpack/webpack/compare/v5.76.1...v5.76.2</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/webpack/webpack/commit/dbf7bf39ab96e1462603435c150d601bb69ebe4e"><code>dbf7bf3</code></a> 5.76.2</li> <li><a href="https://github.com/webpack/webpack/commit/125449fcd6729dd6315a57dc4c3267d7722f2d8a"><code>125449f</code></a> Merge pull request <a href="https://redirect.github.com/webpack/webpack/issues/16830">#16830</a> from snitin315/fix/module-graph</li> <li><a href="https://github.com/webpack/webpack/commit/3943ccefca455839e6a5388082c5f333a0d390e5"><code>3943cce</code></a> fix: initialize <code>this._cacheStage</code> in ModuleGraph constructor</li> <li><a href="https://github.com/webpack/webpack/commit/796b51175c768d1a7938c6638f9ced8e64ca3bb3"><code>796b511</code></a> Merge pull request <a href="https://redirect.github.com/webpack/webpack/issues/16805">#16805</a> from snitin315/fix/improve-source-types</li> <li><a href="https://github.com/webpack/webpack/commit/be54e43851a9454e591f334a60b2687afb538392"><code>be54e43</code></a> Merge pull request <a href="https://redirect.github.com/webpack/webpack/issues/16811">#16811</a> from snitin315/fix/add-missing-semicolon</li> <li><a href="https://github.com/webpack/webpack/commit/976320d0b4605be99e3ca1819c4471a46c42924e"><code>976320d</code></a> test: update StatsTestCases snapshots</li> <li><a href="https://github.com/webpack/webpack/commit/44256c25cf2ff608943028dff64cd50322eb9283"><code>44256c2</code></a> fix: add missing semicolon in <code>AutoPublicPathRuntimeModule</code></li> <li><a href="https://github.com/webpack/webpack/commit/9ca77a3cba5dae5a5bfc20f483e8a36bb8642a45"><code>9ca77a3</code></a> Merge pull request <a href="https://redirect.github.com/webpack/webpack/issues/15722">#15722</a> from webpack/feat/issue-15720</li> <li><a href="https://github.com/webpack/webpack/commit/8f1b5ffd23b4aa7d82bd0c08ccd94fd9b8da0c74"><code>8f1b5ff</code></a> Merge pull request <a href="https://redirect.github.com/webpack/webpack/issues/16347">#16347</a> from ahaoboy/main</li> <li><a href="https://github.com/webpack/webpack/commit/0f82297ff21e877353b46b49e9755574a20e5959"><code>0f82297</code></a> docs: fix typo in examples</li> <li>Additional commits viewable in <a href="https://github.com/webpack/webpack/compare/v5.76.1...v5.76.2">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/Bryan-Roe/semantic-kernel/network/alerts). </details>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Fix likely erroneous use of StringComparison.InvariantCulture{IgnoreCase}.
Description
StringComparison.InvariantCulture{IgnoreCase} is almost never the right answer (linguistic comparison rules in a culture similar to en-US); usually Ordinal{IgnoreCase} is what's desirable, and happily is also faster. Along the way I fixed a few things touching the code I was updating, like some unnecessary ToUpperInvariant calls, dead methods, and duplicate IndexOf calls.
Contribution Checklist
dotnet format