Skip to content

Conversation

joyeecheung
Copy link
Member

To keep pre_execution.js focusing on bootstrap instead of
domain-specific logic.

To keep pre_execution.js focusing on bootstrap instead of
domain-specific logic.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels Jun 1, 2022
// no bare specifiers for now
let manifestURLObject;
if (isAbsolute(policyPath)) {
manifestURLObject = new URL(`file://${policyPath}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

What if the path contains a char that has a special meaning in URL (e.g. ?)? @watilde since you're the one who committed this line, do you know if that should be that instead:

Suggested change
manifestURLObject = new URL(`file://${policyPath}`);
manifestURLObject = pathToFileUrl(policyPath);

(non-blocking for this PR)

Copy link
Member Author

@joyeecheung joyeecheung Jun 6, 2022

Choose a reason for hiding this comment

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

I'd rather leave this to other PRs as this one only tries to move things to a different palce (same with other suggestions below, but I can apply the first ones since they are only added in this PR).

Comment on lines +33 to +35
const cwdURL = pathToFileURL(process.cwd());
cwdURL.pathname += '/';
manifestURLObject = new URL(policyPath, cwdURL);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, I think it should be:

Suggested change
const cwdURL = pathToFileURL(process.cwd());
cwdURL.pathname += '/';
manifestURLObject = new URL(policyPath, cwdURL);
manifestURLObject = pathToFileURL(join(process.cwd(), policyPath));

for (let i = 0; i < integrityEntries.length; i++) {
const {
algorithm,
value: expected
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
value: expected
value: expected,

@nodejs-github-bot
Copy link
Collaborator

@joyeecheung
Copy link
Member Author

Looks like the CI failures are genuine, there are some TDZ problems with the worker code path

@joyeecheung joyeecheung added the blocked PRs that are blocked by other issues or PRs. label Jun 10, 2022
@avivkeller
Copy link
Member

I'm sure you've heard, but the policy model is being deprecated and removed.

@joyeecheung joyeecheung closed this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked PRs that are blocked by other issues or PRs. needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants