Skip to content

Conversation

@RafaelGSS
Copy link
Member

When no package.json is found the loader walks upwards until the root path /. When checking the root, the checkPath is empty ('') and an attempt to read /package.json is made. However, reading from / isn't allowed (considering --allow-fs-read=/Users/ was passed).

This commit fixes this behavior.

@RafaelGSSRafaelGSS added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 9, 2023
@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Mar 9, 2023
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/modules

@github-actionsgithub-actionsbot added request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Mar 9, 2023
@github-actions
Copy link
Contributor

Failed to start CI
- Validating Jenkins credentials ✘ Jenkins credentials invalid
https://github.com/nodejs/node/actions/runs/4376751803

@RafaelGSSRafaelGSSforce-pushed the fix/permission-model-package-json branch from 05b939b to f01ff0eCompareMarch 9, 2023 19:15
@RafaelGSSRafaelGSS requested a review from aduh95March 9, 2023 19:16
@aduh95aduh95 added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. labels Mar 9, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 9, 2023
@RafaelGSSRafaelGSSforce-pushed the fix/permission-model-package-json branch from f01ff0e to 0c16b39CompareMarch 9, 2023 23:18
@RafaelGSSRafaelGSSforce-pushed the fix/permission-model-package-json branch from 0c16b39 to ed41d3dCompareMarch 10, 2023 00:24
@RafaelGSSRafaelGSSforce-pushed the fix/permission-model-package-json branch from ed41d3d to ceca668CompareMarch 10, 2023 19:47
@RafaelGSSRafaelGSS added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 10, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 10, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@RafaelGSSRafaelGSSforce-pushed the fix/permission-model-package-json branch from ceca668 to a2f399bCompareMarch 14, 2023 23:27
@RafaelGSSRafaelGSS added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 14, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 14, 2023
@nodejs-github-bot
Copy link
Collaborator

@RafaelGSSRafaelGSS added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 15, 2023
@nodejs-github-botnodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Mar 15, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/47030 ✔ Done loading data for nodejs/node/pull/47030 ----------------------------------- PR info ------------------------------------ Title permission: add path separator to loader check (#47030) Author Rafael Gonzaga (@RafaelGSS) Branch RafaelGSS:fix/permission-model-package-json -> nodejs:main Labels needs-ci Commits 1 - permission: add path separator to loader check Committers 1 - RafaelGSS PR-URL: https://github.com/nodejs/node/pull/47030 Reviewed-By: Geoffrey Booth Reviewed-By: Benjamin Gruenbaum ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/47030 Reviewed-By: Geoffrey Booth Reviewed-By: Benjamin Gruenbaum -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - permission: add path separator to loader check ℹ This PR was created on Thu, 09 Mar 2023 16:26:17 GMT ✔ Approvals: 2 ✔ - Geoffrey Booth (@GeoffreyBooth) (TSC): https://github.com/nodejs/node/pull/47030#pullrequestreview-1334118656 ✔ - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/47030#pullrequestreview-1335554726 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2023-03-14T23:34:49Z: https://ci.nodejs.org/job/node-test-pull-request/50383/ - Querying data for job/node-test-pull-request/50383/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/4426823538

Copy link
Contributor

@ShogunPandaShogunPanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@RafaelGSSRafaelGSS added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Mar 15, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 15, 2023
@nodejs-github-botnodejs-github-bot merged commit 1726da9 into nodejs:mainMar 15, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 1726da9

@RafaelGSSRafaelGSS added backport-blocked-v16.x dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. and removed dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. backport-blocked-v16.x labels Apr 3, 2023
@tniessentniessen added the permission Issues and PRs related to the Permission Model label Aug 10, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ciPRs that need a full CI run.permissionIssues and PRs related to the Permission Model

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@RafaelGSS@nodejs-github-bot@ShogunPanda@GeoffreyBooth@benjamingr@cjihrig@aduh95@marco-ippolito@targos@tniessen