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

fix(bunfig): fix and test preloads #16329

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

DonIsaac
Copy link
Contributor

@DonIsaac DonIsaac commented Jan 11, 2025

What does this PR do?

Preloads are currently problematic (#16289, etc). I'm adding a bunch of tests for them (in this PR) and fixing what I find (in upstack PRs)

Please review the tests I've added and give feedback on expected behavior.

How did you verify your code works?

These are all test changes.

@robobun
Copy link

robobun commented Jan 11, 2025

Updated 9:40 PM PT - Jan 13th, 2025

@DonIsaac, your commit 58d60bc has passed in #9564! 🎉


🧪   try this PR locally:

bunx bun-pr 16329

Copy link
Contributor Author

DonIsaac commented Jan 11, 2025

@DonIsaac DonIsaac force-pushed the don/fix/bunfig-preload branch from 46741e1 to 6afdbbc Compare January 11, 2025 04:56
@DonIsaac DonIsaac force-pushed the 01-10-fix_toml_cursor_pos_for_duplicate_key_errors branch from 9f6b1e4 to 0d6749a Compare January 11, 2025 04:58
@DonIsaac DonIsaac force-pushed the don/fix/bunfig-preload branch from 6afdbbc to cd45010 Compare January 11, 2025 04:59
Base automatically changed from 01-10-fix_toml_cursor_pos_for_duplicate_key_errors to main January 11, 2025 07:13
expect(code).toBe(0);
});

// FIXME: relative paths are being resolved to cwd, not the file's directory
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a bug.

//
"--preload ./preload3.ts",
"--preload=./preload3.ts",
// FIXME: Tests are failing due to active bugs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are bugs. The last pair suffers the same problem as --config. At the very least, run --preload=./file.ts should be allowed.

describe("Given a `bunfig.toml` file with a relative path without a leading './'", () => {
const dir = fixturePath("relative");

// FIXME: currently treaded as an import to an external package
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a bug.

@DonIsaac DonIsaac force-pushed the don/fix/bunfig-preload branch from af01c9d to 58d60bc Compare January 14, 2025 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants