Skip to content
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

✅ All tests that run the CLI should set the COREPACK_HOME environment variable to use the test-specific Corepack installation directory #233

Merged
merged 27 commits into from
Jul 3, 2023

Commits on Jul 2, 2023

  1. 💚 [Debug] Display all errors thrown by the CLI

    We need to know why the `npm config get tag-version-prefix` command failing.
    sounisi5011 committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    697081f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cd82128 View commit details
    Browse the repository at this point in the history
  3. 💚 [Debug] Run npm --version command before npm config get ... com…

    …mand
    
    Check to see if the error is caused by the `npm config get ...` command or if npm is throwing an error.
    sounisi5011 committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    81b45bb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a227759 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f6d7bd4 View commit details
    Browse the repository at this point in the history
  6. ⏪ Revert "💚 [Debug] Run npm --version command before `npm config ge…

    …t ...` command"
    
    This reverts commit 81b45bb.
    sounisi5011 committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    08745aa View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9630d74 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ed9f714 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3473762 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a9aa566 View commit details
    Browse the repository at this point in the history
  11. ⏪ Revert "✅ Remove unnecessary npm_* environment variables when run…

    …ning tests"
    
    This reverts commit a9aa566.
    sounisi5011 committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    ddfe27b View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. 💚 Run the test without using the task command

    The `task` command may be the cause of the segmentation fault.
    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    1212228 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1fb8547 View commit details
    Browse the repository at this point in the history
  3. ✨ Ignore all errors from npm config get ... commands executed by th…

    …e `tryNpmConfigGet()` function
    
    The `pnpm version` command executes the `npm version` command as is.
    Therefore, the configuration to be used should be obtained by the `npm config get ...` command.
    
    `tryNpmConfigGet()` tries the `npm config get ...` command for this purpose.
    However, if the `npm config get ...` command fails, we should not force termination there.
    We should be allowed to use the `pnpm config get ...` command instead.
    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    7cee91c View commit details
    Browse the repository at this point in the history
  4. ⏪ Revert "✨ Ignore all errors from npm config get ... commands exec…

    …uted by the `tryNpmConfigGet()` function"
    
    This commit fixes the problem of the `npm config get ...` command being aborted by the `SIGSEGV` signal.
    However, there may be other ways to do this.
    We are reverting this commit to try them.
    
    This reverts commit 7cee91c.
    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    26d7361 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    14501e5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    12ca0c1 View commit details
    Browse the repository at this point in the history
  7. ✅ All exec() functions returned by the initGit() function should …

    …use the `COREPACK_HOME` environment variable
    
    All CLI and package manager commands executed within `test/index.ts` should use the `COREPACK_HOME` environment variable.
    To keep this in mind, we modified our test code as follows:
    
    + Add the `execDefaultEnv` option to the `initGit()` function.
    + Add the `COREPACK_HOME` environment variable to the `execDefaultEnv` option of the `initGit()` function called in `test/index.ts`.
    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    f479280 View commit details
    Browse the repository at this point in the history
  8. ⏪ Revert "💚 [Debug] Add details to the error thrown by the `execFileA…

    …sync()` function"
    
    This reverts commit cd82128.
    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    bf919e7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d270e29 View commit details
    Browse the repository at this point in the history
  10. ⏪ Revert "💩 [Debug] Get details about segmentation faults using the `…

    …segfault-handler` package"
    
    This reverts commit 14501e5.
    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    6b7eef8 View commit details
    Browse the repository at this point in the history
  11. ⏪ Revert "✅ All exec() functions returned by the initGit() functi…

    …on should use the `COREPACK_HOME` environment variable"
    
    This reverts commit f479280.
    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    5f0bc0d View commit details
    Browse the repository at this point in the history
  12. ⏪ Revert "⏪ Revert "✅ All exec() functions returned by the `initGit…

    …()` function should use the `COREPACK_HOME` environment variable""
    
    This reverts commit 5f0bc0d.
    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    90cbafc View commit details
    Browse the repository at this point in the history
  13. ✅ On Windows, pnpm add <folder> command fails when using pnpm insta…

    …lled for testing
    
    The error is as follows:
    
    ```
    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
        at new NodeError (node:internal/errors:399:5)
        at validateString (node:internal/validators:163:11)
        at Object.resolve (node:path:167:9)
        at ../node_modules/.pnpm/@pnpm+npm-conf@2.0.4/node_modules/@pnpm/npm-conf/lib/defaults.js (D:\a\package-version-git-tag\package-version-git-tag\test\.temp\.corepack\pnpm\7.30.5\dist\pnpm.cjs:15236:23)
        at __require (D:\a\package-version-git-tag\package-version-git-tag\test\.temp\.corepack\pnpm\7.30.5\dist\pnpm.cjs:12:50)
        at ../node_modules/.pnpm/@pnpm+npm-conf@2.0.4/node_modules/@pnpm/npm-conf/index.js (D:\a\package-version-git-tag\package-version-git-tag\test\.temp\.corepack\pnpm\7.30.5\dist\pnpm.cjs:15385:21)
        at __require (D:\a\package-version-git-tag\package-version-git-tag\test\.temp\.corepack\pnpm\7.30.5\dist\pnpm.cjs:12:50)
        at ../config/config/lib/index.js (D:\a\package-version-git-tag\package-version-git-tag\test\.temp\.corepack\pnpm\7.30.5\dist\pnpm.cjs:26161:39)
        at __require (D:\a\package-version-git-tag\package-version-git-tag\test\.temp\.corepack\pnpm\7.30.5\dist\pnpm.cjs:12:50)
        at ../cli/cli-utils/lib/getConfig.js (D:\a\package-version-git-tag\package-version-git-tag\test\.temp\.corepack\pnpm\7.30.5\dist\pnpm.cjs:46134:20)
    ```
    
    Probably some kind of bug caused by Windows file paths.
    However, the pnpm versions are the same.
    The only difference is the directory where pnpm is installed (`D:\a\package-version-git-tag\package-version-git-tag\test\.temp\.corepack` is defined in the `COREPACK_HOME` environment variable).
    So I am not sure what kind of bug it is.
    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    729f1fd View commit details
    Browse the repository at this point in the history
  14. ⏪ Revert "✅ On Windows, pnpm add <folder> command fails when using …

    …pnpm installed for testing"
    
    This reverts commit 729f1fd.
    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    9af05b3 View commit details
    Browse the repository at this point in the history
  15. ✅ Fix again problem with "pnpm add" commands failing on Windows

    I inadvertently caused this problem to reappear in the work on commit f479280.
    This is a problem that was previously fixed in commit 2613c17.
    
    Is it back again? I am probably an idiot.
    So I added a comment.
    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    333c03c View commit details
    Browse the repository at this point in the history
  16. 📝 Update CHANGELOG

    sounisi5011 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    c11a224 View commit details
    Browse the repository at this point in the history