Compare commits

..

2 Commits

Author SHA1 Message Date
autofix-ci[bot]
e222414173 [autofix.ci] apply automated fixes 2026-02-26 19:57:27 +00:00
Claude Bot
8267c13a37 fix(docs): correct bcrypt rounds description from log10 to log2
The bcrypt cost parameter is a power-of-2 exponent (e.g., cost=10 means
2^10 = 1,024 rounds), not log10. This is confirmed by the implementation
in PasswordObject.zig which uses the cost as `rounds_log` with a valid
range of 4-31 (2^4 through 2^31).

Fixes #27474

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-26 19:55:17 +00:00
4 changed files with 15 additions and 83 deletions

View File

@@ -228,16 +228,16 @@ To build for macOS x64:
The order of the `--target` flag does not matter, as long as they're delimited by a `-`.
| --target | Operating System | Architecture | Modern | Baseline | Libc |
| --------------------- | ---------------- | ------------ | ------ | -------- | ----- |
| bun-linux-x64 | Linux | x64 | ✅ | ✅ | glibc |
| bun-linux-arm64 | Linux | arm64 | ✅ | N/A | glibc |
| bun-windows-x64 | Windows | x64 | ✅ | ✅ | - |
| bun-windows-arm64 | Windows | arm64 | ✅ | N/A | - |
| bun-darwin-x64 | macOS | x64 | ✅ | ✅ | - |
| bun-darwin-arm64 | macOS | arm64 | ✅ | N/A | - |
| bun-linux-x64-musl | Linux | x64 | ✅ | ✅ | musl |
| bun-linux-arm64-musl | Linux | arm64 | ✅ | N/A | musl |
| --target | Operating System | Architecture | Modern | Baseline | Libc |
| -------------------- | ---------------- | ------------ | ------ | -------- | ----- |
| bun-linux-x64 | Linux | x64 | ✅ | ✅ | glibc |
| bun-linux-arm64 | Linux | arm64 | ✅ | N/A | glibc |
| bun-windows-x64 | Windows | x64 | ✅ | ✅ | - |
| bun-windows-arm64 | Windows | arm64 | ✅ | N/A | - |
| bun-darwin-x64 | macOS | x64 | ✅ | ✅ | - |
| bun-darwin-arm64 | macOS | arm64 | ✅ | N/A | - |
| bun-linux-x64-musl | Linux | x64 | ✅ | ✅ | musl |
| bun-linux-arm64-musl | Linux | arm64 | ✅ | N/A | musl |
<Warning>
On x64 platforms, Bun uses SIMD optimizations which require a modern CPU supporting AVX2 instructions. The `-baseline`

View File

@@ -96,7 +96,7 @@ $2b$10$Lyj9kHYZtiyfxh2G60TEfeqs7xkkGiEFFDi3iJGc50ZG/XJ1sxIFi;
The format is composed of:
- `bcrypt`: `$2b`
- `rounds`: `$10` - rounds (log10 of the actual number of rounds)
- `rounds`: `$10` - rounds (log2 of the actual number of rounds)
- `salt`: `$Lyj9kHYZtiyfxh2G60TEfeqs7xkkGiEFFDi3iJGc50ZG/XJ1sxIFi`
- `hash`: `$GzJ8PuBi+K+BVojzPfS5mjnC8OpLGtv8KJqF99eP6a4`

View File

@@ -4209,18 +4209,13 @@ pub const BundleV2 = struct {
});
result.ast.import_records = import_records;
// Set is_export_star_target for barrel optimization.
// In dev server mode, source_index is not saved on JS import
// records, so fall back to resolving via the path map.
const path_to_source_index_map = this.pathToSourceIndexMap(result.ast.target);
// Set is_export_star_target for barrel optimization
for (result.ast.export_star_import_records) |star_record_idx| {
if (star_record_idx < import_records.len) {
const star_ir = import_records.slice()[star_record_idx];
const resolved_index = if (star_ir.source_index.isValid())
star_ir.source_index.get()
else
path_to_source_index_map.getPath(&star_ir.path) orelse continue;
graph.input_files.items(.flags)[resolved_index].is_export_star_target = true;
if (star_ir.source_index.isValid()) {
graph.input_files.items(.flags)[star_ir.source_index.get()].is_export_star_target = true;
}
}
}

View File

@@ -550,69 +550,6 @@ devTest("barrel optimization: multi-file imports preserved across rebuilds", {
},
});
devTest("barrel optimization: export star target not deferred (#27521)", {
files: {
"index.html": emptyHtmlFile({ scripts: ["index.ts"] }),
// The user imports from consumer-lib, which is a non-barrel package
// that imports QueryClient from outer-lib.
"index.ts": `
import { useQuery } from 'consumer-lib';
console.log('result: ' + useQuery());
`,
// consumer-lib is NOT a barrel — it has real code that uses
// QueryClient from outer-lib. This mirrors @refinedev/core
// importing QueryClient from @tanstack/react-query.
"node_modules/consumer-lib/package.json": JSON.stringify({
name: "consumer-lib",
version: "1.0.0",
main: "./index.js",
}),
"node_modules/consumer-lib/index.js": `
import { QueryClient } from 'outer-lib';
export function useQuery() {
const client = new QueryClient();
return client instanceof QueryClient ? 'PASS' : 'FAIL';
}
`,
// outer-lib is a barrel with sideEffects:false that re-exports
// everything from inner-lib via export *. Mirrors @tanstack/react-query.
"node_modules/outer-lib/package.json": JSON.stringify({
name: "outer-lib",
version: "1.0.0",
main: "./index.js",
sideEffects: false,
}),
"node_modules/outer-lib/index.js": `
export * from 'inner-lib';
export { Unrelated } from './unrelated.js';
`,
"node_modules/outer-lib/unrelated.js": `export const Unrelated = "X";`,
// inner-lib is a barrel with sideEffects:false that re-exports
// from submodules. Mirrors @tanstack/query-core. Without the fix,
// the barrel optimizer defers queryClient.js because it doesn't
// know inner-lib is an export-star target (source_index is not
// set in dev-server mode), so QueryClient becomes undefined.
"node_modules/inner-lib/package.json": JSON.stringify({
name: "inner-lib",
version: "1.0.0",
main: "./index.js",
sideEffects: false,
}),
"node_modules/inner-lib/index.js": `
export { QueryClient } from './queryClient.js';
export { Other } from './other.js';
`,
"node_modules/inner-lib/queryClient.js": `
export class QueryClient { constructor() { this.ready = true; } }
`,
"node_modules/inner-lib/other.js": `export const Other = "OTHER";`,
},
async test(dev) {
await using c = await dev.client("/");
await c.expectMessage("result: PASS");
},
});
devTest("barrel optimization: two export-from blocks pointing to the same source", {
files: {
"index.html": emptyHtmlFile({ scripts: ["index.ts"] }),