You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 82fcfba
Browse filesBrowse the repository at this point in the historyBrowse files
fix(release): pin our own packages exactly in canary publishes
Root cause of `navigationController.resolveIdsFrom is not a function` on canary
builds, and the companion react-i18next instance warning.
Canary publishes ran `lerna version` without --exact, so the dependencies between
our own packages were written as caret ranges:
"@firecms/core": "^3.4.0-canary.abc1234"
That range also matches the stable 3.4.0, and npm installs the HIGHEST match. So
a canary install silently pulled *stable* transitive packages, which in turn
require "@firecms/core": "^3.4.0" — which the canary core does not satisfy — and
npm nested a second copy of core inside them.
Measured on the published 3.3.0-canary.5906216. Installing core, ui, firebase and
data_export all at that one version gave five copies of @firecms/core:
3.3.0-canary.5906216 @firecms/core
3.3.0 @firecms/collection_editor/node_modules/@firecms/core
3.3.0 @firecms/data_import/node_modules/@firecms/core
3.3.0 @firecms/data_enhancement/node_modules/@firecms/core
3.3.0 @firecms/data_import_export/node_modules/@firecms/core
Two copies of core is two React context objects: the app's <FireCMS> fills one,
the plugin reads the other and gets an empty controller, so every method on it is
undefined. Pinning exactly keeps a canary install internally consistent.
This supersedes the peer-dependency conversion in 42ba35b, now reverted. That
change also stopped the duplicate, but it altered the install contract of 13
published packages to fix what is a release-tooling bug. Package manifests are
byte-identical to 3.3.0 again: upgrading stays "change the version numbers".
Also sets the canary base version to 3.4.0. Only lerna.json is bumped, which is
what the workflow reads for BASE_VERSION; bumping the package versions would
point their sibling ranges at an unpublished 3.4.0 and break CI's
`pnpm install --frozen-lockfile`.
Build 27/27, tests 528 across 13 projects, frozen-lockfile install clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,11 @@
1
1
## [Unreleased]
2
2
3
-
-**`@firecms/core`, `@firecms/ui` and `@firecms/formex` are now peer dependencies of every plugin package**:
4
-
- Fixes `navigationController.resolveIdsFrom is not a function`, and the companion `react-i18next:: You will need to pass in an i18next instance` warning.
5
-
- These three packages hold React context (`@firecms/core` alone has 18 context objects). They were declared as regular `dependencies` of the plugin packages, which lets a package manager install a second, private copy inside a plugin whenever its version differs from the one in your app. Two copies means two distinct context objects: your `<FireCMS>` provider fills one, the plugin reads the other, gets the empty default, and every method on it is `undefined`.
6
-
- This is easiest to hit when mixing versions — for example an app on a `canary` build with a plugin still resolving `^3.3.0`, since a prerelease does not satisfy a stable range. Measured directly: with the old declaration, `npm install @firecms/core@canary @firecms/data_export@3.3.0` produced **two** copies of `@firecms/core`; as a peer dependency it produces **one**.
-**No action needed for most projects.** Any app already installs `@firecms/core` directly, which satisfies the peer. npm and pnpm resolve peers automatically. If you use a package manager that does not, or you had relied on a plugin pulling core in for you, add it explicitly: `npm i @firecms/core@<same version as your other @firecms packages>`.
9
-
- Keep all `@firecms/*` packages on the same version. A mismatch is now a visible peer warning at install time instead of a silently broken app.
10
-
-`@firecms/schema_inference` holds no context and remains a regular dependency.
3
+
-**Fixed duplicate `@firecms/core` in prerelease installs**:
4
+
- Fixes `navigationController.resolveIdsFrom is not a function`, and the companion `react-i18next:: You will need to pass in an i18next instance` warning, when using a `canary` build.
5
+
- Canary releases pinned the dependencies between our own packages with a caret, e.g. `"@firecms/core": "^3.4.0-canary.abc1234"`. That range also matches the stable `3.4.0`, and npm installs the highest match — so a canary install quietly pulled **stable** transitive packages. Those in turn require `"@firecms/core": "^3.4.0"`, which the canary core does not satisfy, so npm nested a second copy of `@firecms/core` inside them. Two copies means two React context objects: the app's `<FireCMS>` provider fills one, the plugin reads the other and gets an empty controller.
6
+
- Canary publishes now pin our own packages exactly, so a canary install is internally consistent. Verified: installing `@firecms/core`, `@firecms/ui`, `@firecms/firebase` and `@firecms/data_export` at the same canary version previously produced five copies of `@firecms/core` (one canary, four stable); it now produces one.
7
+
- Stable releases were never affected, and no package manifests changed — **nothing to do when upgrading beyond changing the version numbers**, as before.
8
+
- As always, keep every `@firecms/*` package on the same version.
11
9
-**CLI (`firecms init`)**:
12
10
- Fixed `firecms init my-app` scaffolding into a directory called `init` and ignoring the name given. The `init` subcommand was being passed through to the argument parser, so the positional directory name was read one position too early. `create-firecms-app` was unaffected.
13
11
- Fixed the Firebase project id sometimes not being substituted into a new project, leaving the raw `[REPLACE_WITH_PROJECT_ID]` placeholder in the generated files. The substitution used callback-style `fs` calls inside an `await`, so the writes were fire-and-forget and the CLI could exit before they landed — non-deterministically, which is why it went unnoticed.
Copy file name to clipboardExpand all lines: discord-bot/src/index.ts
+37-5Lines changed: 37 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,16 @@ MODES OF OPERATION:
80
80
- Do not provide any explanation when ignoring, just output the exact string "IGNORE".
81
81
`;
82
82
83
+
// Cheap relevance check used before the expensive answer call. The instruction above
84
+
// embeds the entire documentation (~500 KB), so running it on every message in every
85
+
// channel would burn tokens on ordinary chatter. This one carries no docs and returns
86
+
// a single word, so unsolicited messages are filtered out at a fraction of the cost.
87
+
consttriageInstruction=`You triage messages for a Discord bot that supports FireCMS and Firebase.
88
+
Reply with exactly one word and nothing else.
89
+
Reply "ANSWER" only if the message is a clear question asking for help with FireCMS or Firebase — for example "how do I configure X?", "why does Y fail?", "does FireCMS support Z?".
90
+
Reply "IGNORE" for everything else: statements, explanations, replies aimed at someone else, code snippets or configuration without a question, bug reports that ask nothing, greetings, casual conversation, and any subject other than FireCMS or Firebase.
console.log(`Eavesdropping: Ignored message from ${message.author.tag} ("${cleanedCurrentContent}")`);
225
+
return;
226
+
}
227
+
console.log(`Eavesdropping: Answering message from ${message.author.tag} ("${cleanedCurrentContent}")`);
228
+
}
229
+
199
230
// Build contents for Gemini API
200
231
constcontents: Content[]=[];
201
232
202
233
if(isEavesdropping){
203
-
// In eavesdropping mode, only process the single current message without history to avoid confusion
234
+
// Triage already judged this relevant, so ask for a real answer. Sent without
235
+
// channel history: the bot was not part of the conversation that preceded it.
204
236
contents.push({
205
237
role: "user",
206
-
parts: [{text: `[Eavesdropping Mode - Answer only if this is a clear question about FireCMS or Firebase, otherwise respond with IGNORE]: ${cleanedCurrentContent}`}]
0 commit comments