Skip to content

@angular-devkit/core normalize+relative function return unexpected #27029

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

Closed
1 task
wszgrcy opened this issue Feb 3, 2024 · 1 comment · Fixed by #29306
Closed
1 task

@angular-devkit/core normalize+relative function return unexpected #27029

wszgrcy opened this issue Feb 3, 2024 · 1 comment · Fixed by #29306
Labels
area: @angular-devkit/core freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix

Comments

@wszgrcy
Copy link

wszgrcy commented Feb 3, 2024

Command

other

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Windows drive letters may not be case sensitive?

but use normalize windows path ,C://=>/C/ ,c://=>/c/

Minimal Reproduction

import {
  normalize,
  relative,
} from '@angular-devkit/core';
    let a1 = `E://abc`;
    let a2 = `e://abc/action`;
    let c = relative(normalize(a1), normalize(a2));
    c;

and relative return
image
If I compare directly using the Node API, the return result is normal

    let xxx=path.relative(a1,a2)

Exception or Error

No response

Your Environment

Angular CLI: 17.0.1
Node: 18.18.0
Package Manager: npm 9.8.1
OS: win32 x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1700.1 (cli-only)
@angular-devkit/core         17.0.1 (cli-only)
@angular-devkit/schematics   17.0.1 (cli-only)
@schematics/angular          17.0.1 (cli-only)

Anything else relevant?

No response

@alan-agius4 alan-agius4 added freq1: low Only reported by a handful of users who observe it rarely severity3: broken area: @angular-devkit/core type: bug/fix labels Feb 5, 2024
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 9, 2025
…vity in path functions

This update ensures that path-related functions in account for the case-insensitivity of drive letters on Windows systems. By addressing this inconsistency, the functionality becomes more robust and aligned with Windows filesystem behavior.

Closes angular#27029
alan-agius4 added a commit that referenced this issue Jan 9, 2025
…vity in path functions

This update ensures that path-related functions in account for the case-insensitivity of drive letters on Windows systems. By addressing this inconsistency, the functionality becomes more robust and aligned with Windows filesystem behavior.

Closes #27029

(cherry picked from commit adf9359)
alan-agius4 added a commit that referenced this issue Jan 9, 2025
…vity in path functions

This update ensures that path-related functions in account for the case-insensitivity of drive letters on Windows systems. By addressing this inconsistency, the functionality becomes more robust and aligned with Windows filesystem behavior.

Closes #27029

(cherry picked from commit adf9359)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular-devkit/core freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
2 participants