Skip to content

Commit bcc3e06

Browse files
chore(fdr): remove fdr-cjs-sdk from generators and CI/CD (#4737)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Deep Singhvi <[email protected]>
1 parent e8ef803 commit bcc3e06

File tree

8 files changed

+2
-142
lines changed

8 files changed

+2
-142
lines changed

.github/workflows/publish-fdr-sdk.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,3 @@ jobs:
9393
cat package.json.workspace | sed "${workspace_replace}" > package.json
9494
rm -rf package.json.tmp package.json.workspace
9595
npm publish --access public --tag latest
96-
97-
- name: Publish CJS SDK
98-
run: |
99-
git_version="$(scripts/fdr-version.sh)"
100-
fern generate --api fdr --group fdr-cjs-sdk --version ${git_version} --log-level debug

LOCAL_TESTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ pnpm fdr:link-to-cli
5757
This will:
5858
- Build and pack `@fern-api/ui-core-utils` (dependency)
5959
- Build and pack `@fern-api/fdr-sdk`
60-
- Generate and pack `@fern-fern/fdr-cjs-sdk`
6160
- Use pnpm overrides to install these local versions in the CLI
6261

6362
**Important**: The local SDK may have API differences from the published version the CLI expects, which can cause TypeScript errors. You'll need to update the CLI code to match the local SDK API.
@@ -206,4 +205,4 @@ DATABASE_URL="postgresql://fdr:fdr1!@localhost:5432/fdr?schema=public" pnpm tsx
206205
```bash
207206
cd servers/fdr
208207
DATABASE_URL="postgresql://fdr:fdr1!@localhost:5432/fdr?schema=public" pnpm tsx scripts/verify-test-docs.ts
209-
```
208+
```

fern/apis/fdr/generators.yml

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -48,43 +48,6 @@ groups:
4848
useLegacyExports: false
4949
namespaceExport: FdrLambda
5050

51-
fdr-cjs-sdk:
52-
generators:
53-
- name: fernapi/fern-typescript-node-sdk
54-
version: 0.51.7
55-
disable-examples: true
56-
output:
57-
location: npm
58-
url: npm.buildwithfern.com
59-
package-name: "@fern-fern/fdr-cjs-sdk"
60-
config:
61-
useBrandedStringAliases: true
62-
noSerdeLayer: true
63-
noOptionalProperties: true
64-
neverThrowErrors: true
65-
timeoutInSeconds: infinity
66-
packageJson:
67-
devDependencies:
68-
"typescript": "~5.7.2"
69-
70-
local-fdr-cjs-sdk:
71-
generators:
72-
- name: fernapi/fern-typescript-node-sdk
73-
version: 0.51.7
74-
disable-examples: true
75-
output:
76-
location: local-file-system
77-
path: ../../../.local-sdk-output/fdr-cjs-sdk
78-
config:
79-
useBrandedStringAliases: true
80-
noSerdeLayer: true
81-
noOptionalProperties: true
82-
neverThrowErrors: true
83-
timeoutInSeconds: infinity
84-
packageJson:
85-
devDependencies:
86-
"typescript": "~5.7.2"
87-
8851
generators-sdk:
8952
audiences:
9053
- generators

pnpm-lock.yaml

Lines changed: 0 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/generate-fdr-cjs-sdk-local.sh

Lines changed: 0 additions & 50 deletions
This file was deleted.

scripts/link-fdr-sdk-to-cli.sh

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -89,32 +89,7 @@ fi
8989

9090
echo "✅ Created FDR SDK tarball: $TARBALL"
9191

92-
# Step 5: Generate and pack fdr-cjs-sdk
93-
echo ""
94-
echo "📦 Generating fdr-cjs-sdk locally..."
95-
bash "$SCRIPT_DIR/generate-fdr-cjs-sdk-local.sh"
96-
97-
echo ""
98-
echo "📦 Creating fdr-cjs-sdk package tarball..."
99-
cd "$PLATFORM_ROOT/.local-sdk-output/fdr-cjs-sdk"
100-
101-
# Clean up any old tarballs
102-
rm -f /tmp/fern-fern-fdr-cjs-sdk-*.tgz
103-
104-
# Pack the SDK
105-
npm pack --pack-destination /tmp > /dev/null 2>&1
106-
107-
# Find the created tarball
108-
CJS_TARBALL=$(ls -t /tmp/fern-fern-fdr-cjs-sdk-*.tgz 2>/dev/null | head -1)
109-
110-
if [ -z "$CJS_TARBALL" ]; then
111-
echo "❌ Error: Failed to create fdr-cjs-sdk tarball"
112-
exit 1
113-
fi
114-
115-
echo "✅ Created fdr-cjs-sdk tarball: $CJS_TARBALL"
116-
117-
# Step 6: Create or update pnpm overrides in CLI
92+
# Step 5: Create or update pnpm overrides in CLI
11893
echo ""
11994
echo "🔧 Configuring pnpm overrides in CLI..."
12095
cd "$CLI_ROOT"
@@ -134,7 +109,6 @@ if (!pkg.pnpm.overrides) {
134109
pkg.pnpm.overrides = {};
135110
}
136111
137-
pkg.pnpm.overrides['@fern-fern/fdr-cjs-sdk'] = 'file:$CJS_TARBALL';
138112
pkg.pnpm.overrides['@fern-api/fdr-sdk'] = 'file:$TARBALL';
139113
pkg.pnpm.overrides['@fern-api/ui-core-utils'] = 'file:$UI_CORE_UTILS_TARBALL';
140114

scripts/unlink-fdr-sdk-from-cli.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const pkgPath = path.join('$CLI_ROOT', 'package.json');
2929
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
3030
3131
if (pkg.pnpm && pkg.pnpm.overrides) {
32-
delete pkg.pnpm.overrides['@fern-fern/fdr-cjs-sdk'];
3332
delete pkg.pnpm.overrides['@fern-api/fdr-sdk'];
3433
delete pkg.pnpm.overrides['@fern-api/ui-core-utils'];
3534
@@ -57,7 +56,6 @@ echo ""
5756
echo "🧹 Cleaning up temporary files..."
5857
rm -f /tmp/fern-api-fdr-sdk-*.tgz
5958
rm -f /tmp/fern-api-ui-core-utils-*.tgz
60-
rm -f /tmp/fern-fern-fdr-cjs-sdk-*.tgz
6159

6260
echo ""
6361
echo "✅ Successfully unlinked local FDR SDK from CLI!"

servers/fdr/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"@fern-docs/search-ask-fern": "workspace:*",
4747
"@fern-docs/search-keyword": "workspace:*",
4848
"@fern-docs/search-utils": "workspace:*",
49-
"@fern-fern/fdr-cjs-sdk": "0.0.6432",
5049
"@fern-fern/fern-docs-sdk": "0.0.5",
5150
"@fern-fern/revalidation-sdk": "0.0.9",
5251
"@fern-platform/configs": "workspace:*",

0 commit comments

Comments
 (0)