
Security News
OpenCode User Hit with Hostile Backlash After Reporting Free AI Loophole
An OpenCode user faced harassment after reporting a free AI usage loophole, drawing a bitter backlash in a GitHub thread that has since been deleted.
@pierre/path-store
Advanced tools
Underlying data structure to be used to power a file tree UI.
For the detailed architecture and implementation plan, see IMPLEMENTATION.md.
Current limitation:
flattenEmptyDirectories flattens single-child directory chains in the
visible projection while leaving canonical topology unchanged. It defaults to
true; pass false to disable it when you want one row per canonical
directory.Current useful API:
initialExpansion can seed directory visibility as 'closed', 'open', or a
numeric depth, with initialExpandedPaths acting as explicit overrides on
top.store.on(...) now emits typed semantic events with:
canonicalChangedprojectionChangedvisibleCountDeltapath, from, and tomarkDirectoryUnloaded(path)beginChildLoad(path)applyChildPatch(attempt, patch)completeChildLoad(attempt)failChildLoad(attempt, errorMessage?)getDirectoryLoadState(path)PathStoreChildPatch.metadata is currently reserved for future async/count
hints and is intentionally ignored in Phase 7A.markDirectoryUnloaded(path) is intentionally narrow in 7A: it only works for
directories that do not currently have known children.isLoading is the fast convenience flagloadState only appears when a directory row is not in the default loaded
stateknownChildCount product behavior remain
deferred to later work.createPathStoreScheduler({ store, ... })chunkBudgetMs is wall time between yields, so awaited createPatch() work
also counts against the same slice budgetstore.cleanup() defaults to stable mode and preserves IDsstore.cleanup({ mode: 'aggressive' }) is explicit and may reset IDs for
denser compactionStaticPathStore:
list(), getVisibleCount(), getVisibleSlice(), expand(), collapse()linux-5x scenariosBenchmark workflow:
bun ws path-store benchmark -- --filter '^visible-middle/linux-5x/200$'bun ws path-store benchmark -- --filter '^visible-middle/linux-5x/200$' --json --samplesbun ws path-store benchmark -- --compare baseline.json candidate.jsonChrome profiler workflow:
bun ws path-store profile:demobun ws path-store profile:demo -- --all-actionsbun ws path-store profile:demo -- --action rename-visible-folder --runs 5bun ws path-store profile:demo -- --workload demo-small --action collapse-folder-above-viewport --visible-count 30 --offset 8bun ws path-store profile:demo -- --workload demo-small --action cooperative-apply-async-patch-yieldy --runs 1Cooperative helper benchmark workflow:
bun ws path-store benchmark -- --preset full --filter '^(async/apply-child-patch/linux-5x/200|cooperative/apply-child-patch/linux-5x/200|cooperative/apply-child-patch-yieldy/linux-5x/200|cooperative/cancel-mid-queue/linux-5x/200)$'bun ws path-store benchmark -- --preset asyncbun ws path-store benchmark -- --preset mutationbun ws path-store benchmark -- --preset cleanupbun ws path-store benchmark -- --preset staticUse --json --samples when you want confidence-aware comparisons for an
automated optimization loop. Compare mode accepts a candidate when the p50
improvement clears the configured threshold and its bootstrap confidence
interval stays on the improvement side.
store.addstore.removestore.movestore.on(modification, …)import {
PathStore,
StaticPathStore,
createPathStoreScheduler,
} from '@pierre/path-store';
const paths = [
'src/components/index.ts',
'src/components/Button.tsx',
'src/components/Checkbox.tsx',
'src/index.ts',
'tmp/', // empty folders end with `/`
'package.json',
'README.md',
];
// Create a new store
const store = new PathStore({
paths,
});
// Listen for modifications
store.on('*', (event) => {
console.log('modification:', {
operation: event.operation,
projectionChanged: event.projectionChanged,
visibleCountDelta: event.visibleCountDelta,
});
});
// Perform modifications
store.add('src/components/Card.tsx');
// log: modification: {
// operation: 'add',
// path: 'src/components/Card.tsx',
// canonicalChanged: true,
// projectionChanged: true,
// visibleCountDelta: 0,
// }
store.remove('README.md');
// log: modification: {
// operation: 'remove',
// path: 'README.md',
// recursive: false,
// canonicalChanged: true,
// projectionChanged: true,
// visibleCountDelta: -1,
// }
store.move('package.json', 'src/package.json');
// log: modification: {
// operation: 'move',
// from: 'package.json',
// to: 'src/package.json',
// canonicalChanged: true,
// projectionChanged: true,
// visibleCountDelta: 0,
// }
// Rename is just a move
store.move('src/index.ts', 'src/index.mjs');
// log: modification: {
// operation: 'move',
// from: 'src/index.ts',
// to: 'src/index.mjs',
// canonicalChanged: true,
// projectionChanged: true,
// visibleCountDelta: 0,
// }
// Compute just the subtree of paths below here and return
store.list('src/components/');
/*
// Note: I haven't decided if it's better to return full paths or relative paths here
[
'index.ts',
'Button.tsx',
'Card.tsx',
'Checkbox.tsx',
];
*/
// Compute the entire tree and list paths
store.list();
/*
[
'src/components/index.ts',
'src/components/Button.tsx',
'src/components/Card.tsx',
'src/components/Checkbox.tsx',
'src/index.mjs',
'src/package.json',
'tmp/',
];
*/
store.getVisibleSlice(0, 9);
const scheduler = createPathStoreScheduler({
chunkBudgetMs: 8,
maxTasksPerSlice: 1,
store,
});
scheduler.enqueue({
completeOnSuccess: false,
createPatch() {
return {
operations: [{ path: 'tmp/file.txt', type: 'add' }],
};
},
path: 'tmp/',
priority: 100,
});
const cleanupResult = store.cleanup();
console.log(cleanupResult.idsPreserved); // true
const aggressiveCleanupResult = store.cleanup({ mode: 'aggressive' });
console.log(aggressiveCleanupResult.idsPreserved); // false
const staticStore = new StaticPathStore({
initialExpansion: 'open',
paths,
});
staticStore.collapse('src/components/');
staticStore.expand('src/components/');
staticStore.getVisibleSlice(0, 9);
Thank you to @lukasbach for
@headless-tree/core. This project
initially used headless-tree and it many of its ideas still exist in our
implementation. More details and original license in NOTICE.md.
FAQs
Unknown package
The npm package @pierre/path-store receives a total of 6 weekly downloads. As such, @pierre/path-store popularity was classified as not popular.
We found that @pierre/path-store demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.

Security News
An OpenCode user faced harassment after reporting a free AI usage loophole, drawing a bitter backlash in a GitHub thread that has since been deleted.

Threat Research
/Security News
319 browser extensions installed by 13.4 million users hijack searches, capture queries, and collect referral payments from Yahoo and Bing.

Threat Research
Malicious Firefox extensions mimic Phantom, Jupiter, and Bitget wallets to steal recovery phrases and private keys, with one fetching its payload remotely.