Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(internal): Replace yarn with pnpm #5400

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:
POSTHOG_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
run: |
pnpm --filter @fern-api/cli dist:cli:prod
cli_path="$(pwd)/packages/cli/cli/dist/prod/cli.cjs"
cli_path="$(pwd)/packages/cli/cli/dist/prod/cli.cjs"
node $cli_path generate --docs --log-level debug --instance fern.docs.buildwithfern.com/learn

# - name: Install fern-dev CLI
# run: |
# npm config set //registry.npmjs.org/:_authToken ${{ secrets.YARN_NPM_AUTH_TOKEN }}
# npm install -g @fern-api/fern-api-dev --prefix=$HOME/.local
# pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.YARN_NPM_AUTH_TOKEN }}
# pnpm install -g @fern-api/fern-api-dev --prefix=$HOME/.local

# - name: Publish Docs to dev
# env:
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "node",
"request": "launch",
"name": "Debug current test file",
"runtimeExecutable": "yarn",
"runtimeExecutable": "pnpm",
"runtimeArgs": [
"run",
"--inspect-brk",
Expand All @@ -25,4 +25,4 @@
"console": "integratedTerminal"
}
]
}
}
17 changes: 12 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
{
"search.exclude": {
"**/.pnp.*": true,
"**/.yarn": true,
"**/.pnpm": true,
},
"eslint.nodePath": ".yarn/sdks",
"eslint.execArgv": ["--max_old_space_size=16384"],
"eslint.workingDirectories": [ "./packages", "./generators" ],
"eslint.execArgv": [
"--max_old_space_size=16384"
],
"eslint.workingDirectories": [
"./packages",
"./generators"
],
"prettier.prettierPath": "node_modules/prettier/index.js",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": ["source.fixAll", "source.sortMembers"],
"editor.codeActionsOnSave": [
"source.fixAll",
"source.sortMembers"
],
"editor.defaultFormatter": null,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ in the generator.

### Generator Testing

**Note**: Please make sure that the docker daemon is running before running commands below.
**Note**: Please make sure that the docker daemon is running before running commands below.

To test our generators we have built a CLI called seed.

Expand All @@ -122,7 +122,7 @@ Seed handles building the generators from source and running them against all of
Each generator configures a `seed.yml`. For example, the TypeScript generator's configuration lives [here](./seed/ts-sdk/seed.yml).

Seed also handles running scripts against the generated code to make sure that the generated code compiles and works
as intended. For example, in the TypeScript generator seed runs `yarn install` and `yarn build` to compile the source code.
as intended. For example, in the TypeScript generator seed runs `pnpm install` and `pnpm build` to compile the source code.

To build seed, simply run

Expand Down
4 changes: 2 additions & 2 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
1. Install [nvm](https://github.com/nvm-sh/nvm#install--update-script)
2. Clone repo
3. `nvm use 18`
4. `npm install --global yarn`
5. `yarn`
4. `npm install --global pnpm`
5. `pnpm install`
2 changes: 1 addition & 1 deletion docker/seed/Dockerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN yarn add \
# qs
[email protected] \
@types/[email protected] \
# url join
# url join
[email protected] \
@types/[email protected] \
# readable stream
Expand Down
2 changes: 1 addition & 1 deletion generators/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test": "vitest --run",
"test:update": "vitest --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion generators/browser-compatible-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test": "vitest --passWithNoTests --run",
"test:update": "vitest --passWithNoTests --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion generators/csharp/codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "vitest --run",
"test:update": "vitest --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
Expand Down
1 change: 0 additions & 1 deletion generators/csharp/model/.depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"globals",
"@types/node",
"esbuild",
"@yarnpkg/esbuild-plugin-pnp",
"@fern-fern/ir-sdk"
],
"ignore-patterns": [
Expand Down
1 change: 0 additions & 1 deletion generators/csharp/model/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ RUN apk --no-cache add bash curl git zip && git config --global user.name "fern"

RUN dotnet tool install -g csharpier
ENV PATH="$PATH:/root/.dotnet/tools"
ENV YARN_CACHE_FOLDER=/.yarn

COPY generators/csharp/model/dist /dist

Expand Down
5 changes: 2 additions & 3 deletions generators/csharp/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"test": "vitest --passWithNoTests --run",
"test:update": "vitest --passWithNoTests --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
"depcheck": "depcheck",
"dist:cli": "pnpm compile && tsup ./src/cli.ts --format cjs && cp -R ../codegen/src/asIs dist",
"publish:cli": "pnpm dist:cli && cd dist && yarn npm publish",
"publish:cli": "pnpm dist:cli && cd dist && pnpm publish",
"dockerTagLatest": "pnpm dist:cli && docker build -f ./Dockerfile -t fernapi/fern-csharp-model:latest ../../.."
},
"devDependencies": {
Expand All @@ -37,7 +37,6 @@
"zod": "^3.22.3",
"@types/jest": "^29.5.12",
"@types/node": "18.7.18",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.14",
"depcheck": "^1.4.6",
"esbuild": "^0.24.0",
"eslint": "^8.56.0",
Expand Down
1 change: 0 additions & 1 deletion generators/csharp/sdk/.depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"globals",
"@types/node",
"esbuild",
"@yarnpkg/esbuild-plugin-pnp",
"@fern-fern/ir-sdk"
],
"ignore-patterns": [
Expand Down
1 change: 0 additions & 1 deletion generators/csharp/sdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ RUN apk --no-cache add bash curl git zip && git config --global user.name "fern"

RUN dotnet tool install -g csharpier
ENV PATH="$PATH:/root/.dotnet/tools"
ENV YARN_CACHE_FOLDER=/.yarn

COPY generators/csharp/sdk/dist /dist
COPY generators/csharp/sdk/features.yml /assets/features.yml
Expand Down
5 changes: 2 additions & 3 deletions generators/csharp/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"test": "vitest --passWithNoTests --run",
"test:update": "vitest --passWithNoTests --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
"depcheck": "depcheck",
"dist:cli": "rm -rf ./lib && rm -rf ./dist && pnpm compile && tsup ./src/cli.ts --format cjs && cp -R ../codegen/src/asIs dist",
"publish:cli": "pnpm dist:cli && cd dist && yarn npm publish",
"publish:cli": "pnpm dist:cli && cd dist && pnpm publish",
"dockerTagLatest": "pnpm dist:cli && docker build -f ./Dockerfile -t fernapi/fern-csharp-sdk:latest ../../.."
},
"devDependencies": {
Expand All @@ -45,7 +45,6 @@
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@types/node": "18.7.18",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.14",
"depcheck": "^1.4.6",
"esbuild": "^0.24.0",
"eslint": "^8.56.0",
Expand Down
4 changes: 2 additions & 2 deletions generators/go-v2/ast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "vitest --run",
"test:update": "vitest --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
Expand All @@ -47,4 +47,4 @@
"vitest": "^2.1.4",
"zod": "^3.22.3"
}
}
}
1 change: 0 additions & 1 deletion generators/go-v2/base/.depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"globals",
"@types/node",
"esbuild",
"@yarnpkg/esbuild-plugin-pnp",
"@fern-fern/ir-sdk"
],
"ignore-patterns": [
Expand Down
7 changes: 3 additions & 4 deletions generators/go-v2/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,20 @@
"test": "vitest --passWithNoTests --run",
"test:update": "vitest --passWithNoTests --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
"depcheck": "depcheck",
"dist:cli": "pnpm compile && tsup ./src/cli.ts --format cjs",
"publish:cli": "pnpm dist:cli && cd dist && yarn npm publish",
"publish:cli": "pnpm dist:cli && cd dist && pnpm publish",
"dockerTagLatest": "pnpm dist:cli && docker build -f ./Dockerfile -t fernapi/fern-go-model:latest ../../.."
},
"devDependencies": {
"@fern-api/base-generator": "workspace:*",
"@fern-api/fs-utils": "workspace:*",
"@fern-api/go-ast": "workspace:*",
"@types/node": "18.7.18",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.14",
"depcheck": "^1.4.6",
"esbuild": "^0.24.0",
"eslint": "^8.56.0",
Expand All @@ -44,4 +43,4 @@
"typescript": "4.6.4",
"vitest": "^2.0.5"
}
}
}
4 changes: 2 additions & 2 deletions generators/go-v2/dynamic-snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "vitest --passWithNoTests --run",
"test:update": "vitest --passWithNoTests --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
Expand All @@ -46,4 +46,4 @@
"typescript": "4.6.4",
"vitest": "^2.0.5"
}
}
}
2 changes: 1 addition & 1 deletion generators/go-v2/formatter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "vitest --passWithNoTests --run",
"test:update": "vitest --passWithNoTests --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
Expand Down
1 change: 0 additions & 1 deletion generators/go-v2/model/.depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"globals",
"@types/node",
"esbuild",
"@yarnpkg/esbuild-plugin-pnp",
"@fern-fern/ir-sdk"
],
"ignore-patterns": [
Expand Down
7 changes: 3 additions & 4 deletions generators/go-v2/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@
"test": "vitest --passWithNoTests --run",
"test:update": "vitest --passWithNoTests --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
"depcheck": "depcheck",
"dist:cli": "pnpm compile && tsup ./src/cli.ts --format cjs",
"publish:cli": "pnpm dist:cli && cd dist && yarn npm publish",
"publish:cli": "pnpm dist:cli && cd dist && pnpm publish",
"dockerTagLatest": "pnpm dist:cli && docker build -f ./Dockerfile -t fernapi/fern-go-model:latest ../../.."
},
"devDependencies": {
"@types/node": "18.7.18",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.14",
"depcheck": "^1.4.6",
"esbuild": "^0.24.0",
"eslint": "^8.56.0",
Expand All @@ -41,4 +40,4 @@
"typescript": "4.6.4",
"vitest": "^2.0.5"
}
}
}
1 change: 0 additions & 1 deletion generators/go-v2/sdk/.depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"globals",
"@types/node",
"esbuild",
"@yarnpkg/esbuild-plugin-pnp",
"@fern-fern/ir-sdk"
],
"ignore-patterns": [
Expand Down
7 changes: 3 additions & 4 deletions generators/go-v2/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@
"test": "vitest --passWithNoTests --run",
"test:update": "vitest --passWithNoTests --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
"depcheck": "depcheck",
"dist:cli": "pnpm compile && tsup ./src/cli.ts --format cjs",
"publish:cli": "pnpm dist:cli && cd dist && yarn npm publish",
"publish:cli": "pnpm dist:cli && cd dist && pnpm publish",
"dockerTagLatest": "pnpm dist:cli && docker build -f ./Dockerfile -t fernapi/fern-go-sdk:latest ../../.."
},
"devDependencies": {
"@types/node": "18.7.18",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.14",
"depcheck": "^1.4.6",
"esbuild": "^0.24.0",
"eslint": "^8.56.0",
Expand All @@ -41,4 +40,4 @@
"typescript": "4.6.4",
"vitest": "^2.0.5"
}
}
}
2 changes: 1 addition & 1 deletion generators/java/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ build
**/jenkins-junit.xsd.episode

**/node_modules/**
**/yarn.lock
**/pnpm-lock.yaml

**/generated-java/**
1 change: 0 additions & 1 deletion generators/openapi/.depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"globals",
"@types/node",
"esbuild",
"@yarnpkg/esbuild-plugin-pnp",
"ts-loader",
"@fern-fern/ir-sdk"
],
Expand Down
5 changes: 2 additions & 3 deletions generators/openapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"test": "vitest --passWithNoTests --run",
"test:update": "vitest --passWithNoTests --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
"depcheck": "depcheck",
"dist:cli": "pnpm compile && tsup ./src/cli.ts --format cjs",
"publish:cli": "pnpm dist:cli && cd dist && yarn npm publish",
"publish:cli": "pnpm dist:cli && cd dist && pnpm publish",
"dockerTagLatest": "pnpm dist:cli && docker build -f ./Dockerfile -t fernapi/fern-openapi:latest .",
"dockerTagVersion": "pnpm dist:cli && docker build -f ./Dockerfile -t fernapi/fern-openapi:${0} ."
},
Expand All @@ -44,7 +44,6 @@
"@types/js-yaml": "^4.0.8",
"@types/lodash-es": "^4.17.12",
"@types/node": "18.7.18",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.14",
"depcheck": "^1.4.6",
"esbuild": "^0.24.0",
"eslint": "^8.56.0",
Expand Down
Loading
Loading