Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"hashchange",
"havings",
"hidedevtools",
"HOLDLOCK",
"hrana",
"hypot",
"importmap",
Expand Down Expand Up @@ -155,6 +156,7 @@
"nkzw",
"nocheck",
"Noll",
"nvarchar",
"nwse",
"oddr",
"ogawa",
Expand All @@ -169,6 +171,7 @@
"partyserver",
"partysocket",
"parvovirus",
"passwordless",
"Patryk",
"Pearce",
"Persistable",
Expand All @@ -182,6 +185,7 @@
"prettierrc",
"primodiumxyz",
"reconnections",
"recordset",
"relationshipinhtmltable",
"requiredness",
"resultsortablegrid",
Expand All @@ -191,6 +195,7 @@
"Riedl",
"Romniyi",
"Rosso",
"rowversion",
"sandboxed",
"savepoints",
"schematizer",
Expand Down
16 changes: 9 additions & 7 deletions gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const ALL_MODULES = [
'persisters/persister-file',
'persisters/persister-indexed-db',
'persisters/persister-libsql',
'persisters/persister-mssql',
'persisters/persister-partykit-client',
'persisters/persister-partykit-server',
'persisters/persister-pg',
Expand Down Expand Up @@ -241,10 +242,12 @@ const copyPackageFiles = async (forProd = false) => {
await promises.copyFile('agents.md', join(DIST_DIR, 'agents.md'));
};

let labelBlocks;
const getLabelBlocks = async () => {
if (labelBlocks == null) {
labelBlocks = new Map();
// The promise is memoized rather than the Map, since callers run concurrently
// and would otherwise be handed the Map before it has been filled.
let labelBlocksPromise;
const getLabelBlocks = () =>
(labelBlocksPromise ??= (async () => {
const labelBlocks = new Map();
await allModules(async (module) => {
[
...(
Expand All @@ -257,9 +260,8 @@ const getLabelBlocks = async () => {
labelBlocks.set(label, block);
});
});
}
return labelBlocks;
};
return labelBlocks;
})());

const copyDefinition = async (dir, module) => {
const labelBlocks = await getLabelBlocks();
Expand Down
Loading