-
Notifications
You must be signed in to change notification settings - Fork 34
chore: switch from npm to pnpm as package manager #520
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
Open
devin-ai-integration
wants to merge
52
commits into
main
Choose a base branch
from
devin/1779934552-switch-to-pnpm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
74cda02
chore: switch from npm to pnpm as package manager
devin-ai-integration[bot] 0ff25b7
fix: update jsdoc plugin paths for pnpm node_modules structure
devin-ai-integration[bot] 3f5f08a
fix: add explicit puppeteer browser install step in CI
devin-ai-integration[bot] a629a8d
fix: skip puppeteer download during pnpm ci to avoid corrupt cache
devin-ai-integration[bot] 619896d
fix: use npx for puppeteer browser install in CI
devin-ai-integration[bot] eaa7a45
chore: reorder pnpm-workspace.yaml - move policy directives to top
devin-ai-integration[bot] 2c55ec5
Merge remote-tracking branch 'origin/main' into devin/1779934552-swit…
devin-ai-integration[bot] e28d4b6
chore: update start:projects script after publisher-demo removal
devin-ai-integration[bot] 0ee6b2e
fix: use pnpm exec for puppeteer browser install in CI
devin-ai-integration[bot] 284a146
fix: add puppeteer download workaround to new-release.yml
devin-ai-integration[bot] c80f8fc
chore: remove unused nx.json - nx was never installed
devin-ai-integration[bot] f18745c
fix: use node install.mjs for reliable puppeteer browser install in CI
devin-ai-integration[bot] 0c4087c
remove packages for removed apps
nicholi b1bbf9b
drop old package-lock files
nicholi 0c3e22a
drop next workflow stuff
nicholi 7fbf17b
add composite build action
nicholi e0ab82c
skip new-release work for next as well
nicholi 203aa7d
add node-release and pnpm-build-publish workflows
nicholi b261e22
bump to recent workflow versions
nicholi 19a3b52
bump to recent workflow versions
nicholi 8749a36
bump to recent workflow versions
nicholi 9c6d9ef
consistent always use ./ for packages path
nicholi 4637003
consistent always use ./ for packages path
nicholi 820cfc2
seems like we need build-essentials
nicholi a07c105
whoops alpine here
nicholi 6087674
bump unix-dgram to 2.0.7 for better node 24 support
nicholi 734cd7d
remove test
nicholi 94c9124
we don't need to install puppeteer browsers here?
nicholi 70f1263
dependencies first
nicholi 7e48287
also need python3
nicholi 3ab8589
remove test
nicholi 279a07c
ignore PUPPETEER_SKIP_CHROMIUM_DOWNLOAD everywhere
nicholi 4115043
add nvmrc with expected node 24
nicholi bba403b
install chromium manually
nicholi 86bfbcb
need sudo
nicholi 5808400
set PUPPETEER_EXECUTABLE_PATH
nicholi 84504e3
same steps for e2e-test
nicholi 7852fe1
check-tests can be used in place of dryrun here
nicholi dcf942d
move composite action pnpn-build directly into pnpm-build-publish
nicholi a4f7f32
just hardcode pnpm-build-publish to work with millicast-sdk
nicholi 4877871
copy README and changedirs first
nicholi 87fdbe1
un-necessary external script
nicholi d15eee7
skip tests in new-release
nicholi 5400c9f
add problematic packages to trustPolicyExclude
nicholi b7ece2d
drop husky, lint-staged, and git hooks
nicholi f625500
add deploying github pages during node-release
nicholi a88266a
add deploying github pages during node-release
nicholi bc4e1f0
millicast-sdk used next dist-tag historically
nicholi 6926f05
required to use --no-git-checks because we copy the README
nicholi d229688
there are no scripts
nicholi 65c351a
both fully moved out of repo
nicholi fdb7a98
run tests on every commit and every tag, doesn't matter what branch
nicholi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,56 +1,111 @@ | ||
| name: Check tests | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| tags: | ||
| - '**' | ||
| branches: | ||
| - main | ||
|
|
||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| workflow_dispatch: | ||
| - '**' | ||
|
|
||
| jobs: | ||
| eslint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
|
|
||
| - name: Install the dependencies 🧱 | ||
| run: npm ci | ||
| shell: bash | ||
| env: | ||
| PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true | ||
| run: | | ||
| corepack enable | ||
| pnpm ci | ||
|
nicholi marked this conversation as resolved.
|
||
|
|
||
| - name: Check Linter and Build 📑 | ||
| shell: bash | ||
| run: | | ||
| npm run build | ||
| npx eslint . --ext .js,.jsx,.ts,.tsx | ||
| pnpm run build | ||
| pnpm exec eslint . --ext .js,.jsx,.ts,.tsx | ||
|
|
||
| unit-test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
|
|
||
| - name: Install the dependencies 🧱 | ||
| run: npm ci | ||
| shell: bash | ||
| env: | ||
| PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true | ||
| run: | | ||
| corepack enable | ||
| pnpm ci | ||
|
devin-ai-integration[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Install Chromium | ||
| shell: bash | ||
| run: | | ||
| sudo apt-get update -qq -y | ||
| sudo apt-get install -qq -y chromium-browser | ||
| echo "PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser)" >> "${GITHUB_ENV}" | ||
|
|
||
| - name: Unit Testing 🧪 | ||
| shell: bash | ||
| working-directory: './packages/millicast-sdk' | ||
| run: npm run test-unit | ||
| run: pnpm run test-unit | ||
|
|
||
| e2e-test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
|
|
||
| - name: Install the dependencies 🧱 | ||
| run: npm ci | ||
| - name: End-2-End Testing | ||
| shell: bash | ||
| env: | ||
| PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true | ||
| run: | | ||
| corepack enable | ||
| pnpm ci | ||
|
devin-ai-integration[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Install Chromium | ||
| shell: bash | ||
| run: | | ||
| sudo apt-get update -qq -y | ||
| sudo apt-get install -qq -y chromium-browser | ||
| echo "PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser)" >> "${GITHUB_ENV}" | ||
|
|
||
| - name: End-to-End Testing | ||
| shell: bash | ||
| working-directory: './packages/millicast-sdk' | ||
| run: npm run test-e2e | ||
| env: | ||
| ACCOUNT_ID: ${{vars.PUBLISHER_DEMO_ACC_ID}} | ||
| PUBLISH_TOKEN: ${{secrets.PUBLISHER_DEMO_TOKEN}} | ||
| ACCOUNT_ID: ${{ vars.PUBLISHER_DEMO_ACC_ID }} | ||
| PUBLISH_TOKEN: ${{ secrets.PUBLISHER_DEMO_TOKEN }} | ||
| run: pnpm run test-e2e | ||
|
|
||
| build-docs: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
|
|
||
| - name: Install the dependencies 🧱 | ||
| run: npm ci | ||
| shell: bash | ||
| env: | ||
| PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true | ||
| run: | | ||
| corepack enable | ||
| pnpm ci | ||
|
devin-ai-integration[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: build docs | ||
| run: npm run build-docs | ||
| shell: bash | ||
| run: pnpm run build-docs | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: 'RELEASE: Bump version, create tag/release, and pnpm publish' | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| bump_version: | ||
| type: choice | ||
| required: true | ||
| description: Which part of version to bump | ||
| options: | ||
| - patch | ||
| - minor | ||
| - major | ||
| - prerelease | ||
| prerelease_id: | ||
| type: string | ||
| required: false | ||
| # only used if bump_version is 'prerelease' | ||
| # otherwise can be ignored | ||
| description: Prerelease identifier | ||
| default: 'next' | ||
| skip_publish: | ||
| type: boolean | ||
| required: false | ||
| description: Skip pnpm publish | ||
| default: false | ||
|
|
||
| jobs: | ||
| next-version: | ||
| uses: millicast/github-actions/.github/workflows/npm-version-release.yml@v1.0.2 | ||
| # should ONLY be used from main | ||
| if: github.ref_name == 'main' || inputs.bump_version == 'prerelease' | ||
| permissions: | ||
| contents: write | ||
| secrets: inherit | ||
| with: | ||
| bump_version: ${{ inputs.bump_version }} | ||
| prerelease_id: ${{ inputs.prerelease_id }} | ||
| skip_tag: ${{ inputs.bump_version == 'prerelease' }} | ||
|
|
||
| build-publish: | ||
| uses: ./.github/workflows/pnpm-build-publish.yml | ||
| needs: [next-version] | ||
| if: success() && inputs.skip_publish != true | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
devin-ai-integration[bot] marked this conversation as resolved.
|
||
| pages: write | ||
| with: | ||
| ref: ${{ inputs.bump_version != 'prerelease' && format('v{0}', needs.next-version.outputs.semVer) || needs.next-version.outputs.newHeadSha }} | ||
| dist_tag: ${{ inputs.bump_version == 'prerelease' && inputs.prerelease_id || '' }} | ||
|
nicholi marked this conversation as resolved.
|
||
|
nicholi marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: pnpm-build-publish | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| ref: | ||
| description: 'git reference to checkout' | ||
| required: true | ||
| type: string | ||
| dist_tag: | ||
| description: 'Distribution tag to publish package with' | ||
| required: false | ||
| type: string | ||
| workflow_call: | ||
| inputs: | ||
| ref: | ||
| required: true | ||
| type: string | ||
| dist_tag: | ||
| required: false | ||
| type: string | ||
|
|
||
| jobs: | ||
| build-publish: | ||
| name: "build-publish ${{ inputs.ref }}" | ||
| runs-on: ubuntu-latest | ||
| container: node:24-alpine | ||
|
nicholi marked this conversation as resolved.
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
devin-ai-integration[bot] marked this conversation as resolved.
|
||
| pages: write | ||
|
|
||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ inputs.ref }} | ||
|
|
||
| - name: Setup GitHub Pages 🛠 | ||
| uses: actions/configure-pages@v6 | ||
|
|
||
| - name: "pnpm build" | ||
| env: | ||
| PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true | ||
| shell: 'ash -e -o pipefail {0}' | ||
| run: | | ||
| # some packages use node-gyp | ||
| apk add --no-cache build-base python3 | ||
|
|
||
| cp README.md ./packages/millicast-sdk/ | ||
| cd ./packages/millicast-sdk/ | ||
|
|
||
| corepack enable | ||
| pnpm ci | ||
|
|
||
| pnpm run build | ||
| pnpm run build-docs | ||
|
|
||
| printf '\nNODE: %s\nPNPM: %s\n\n' "$(node --version)" "$(pnpm --version)" | ||
|
|
||
| - name: Upload artifact ⬆️ | ||
| uses: actions/upload-pages-artifact@v5 | ||
| with: | ||
| path: './packages/millicast-sdk/docs' | ||
|
|
||
| - name: Deploy to GitHub Pages 🚀 | ||
| id: deployment | ||
| uses: actions/deploy-pages@v5 | ||
|
|
||
| - name: "pnpm publish" | ||
| env: | ||
| dist_tag: ${{ inputs.dist_tag }} | ||
| shell: 'ash -e -o pipefail {0}' | ||
| run: | | ||
| cd ./packages/millicast-sdk/ | ||
|
|
||
| set -- | ||
| if [ -n "${dist_tag}" ]; then | ||
| set -- "$@" --tag "${dist_tag}" | ||
| fi | ||
|
|
||
| pnpm publish --provenance --no-git-checks "$@" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.