-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add support for Edge Runtime #110
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,9 +25,16 @@ runs: | |
run: | | ||
git config --global user.email "${{ inputs.git_email }}" | ||
git config --global user.name "${{ inputs.git_username }}" | ||
- name: 'Bump version and commit' | ||
- name: 'Bump version' | ||
shell: bash | ||
run: npm version ${{ inputs.releaseType }} -m '[skip ci] Publish release %s' | ||
run: npm version ${{ inputs.releaseType }} --no-git-tag-version | ||
- name: 'Commit and tag version changes' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These changes plus the addition of the |
||
shell: bash | ||
run: | | ||
git add . | ||
newVersion=$(jq -r '.version' package.json) | ||
git commit -m "[skip ci] Publish release v$newVersion" | ||
git tag "v$newVersion" | ||
- name: 'Output release tag' | ||
shell: bash | ||
id: release-tag-step | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ jobs: | |
jq --arg newVersion "$devVersion" '.version = $newVersion' package.json > package.tmp && mv package.tmp package.json | ||
jq --arg newVersion "$devVersion" '.version = $newVersion' package-lock.json > package-lock.tmp && mv package-lock.tmp package-lock.json | ||
jq --arg newVersion "$devVersion" '.packages[""].version = $newVersion' package-lock.json > package-lock.tmp && mv package-lock.tmp package-lock.json | ||
jq --null-input --arg version "$devVersion" '{"name": "@pinecone-database/pinecone", "version": $version}' > src/version.json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For dev builds, we never relied on the |
||
|
||
- name: 'Publish to npm' | ||
run: npm publish --tag next | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const config = require('./jest.config.integration-node'); | ||
|
||
module.exports = { | ||
...config, | ||
testEnvironment: '@edge-runtime/jest-environment', | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const config = require('./jest.config'); | ||
|
||
module.exports = { | ||
...config, | ||
setupFilesAfterEnv: ['./utils/globalIntegrationTestSetup.ts'], | ||
testPathIgnorePatterns: [], | ||
testEnvironment: 'node', | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need
run
here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is actually a command called
npm version
. It knows how to bump versions and whatnot and commit those changes (unless you disabled that with a flag as we have here).As part of that command run, it executes certain lifecycle scripts. So if you have defined a
version
command in thescripts
section of yourpackage.json
, it will automatically be invoked. There's also apreversion
hook. But you don't need to callnpm run version
yourself. I agree it's confusing that the command name and lifecycle script hooks have the same name.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good to know. Thank you!