Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dry-pugs-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@google/generative-ai": patch
---

Swapped the package manager to npm, in order to take advantage of npm audit fix
10 changes: 5 additions & 5 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Doc Change Check (Run "yarn docs" if this fails)
name: Doc Change Check (Run "npm run docs" if this fails)

on: pull_request

Expand All @@ -31,12 +31,12 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
- name: Yarn install
run: yarn
- name: npm install
run: npm install
- name: Run doc generation
run: yarn docs
run: npm run docs
- name: Check for changes in docs-devsite dir (fail if so)
run: git diff --exit-code docs/reference
- name: Reference documentation needs to be updated. See message below.
if: ${{ failure() }}
run: echo "Changes in this PR affect the reference docs. Run \`yarn docs\` locally to regenerate docs and add them to this PR."
run: echo "Changes in this PR affect the reference docs. Run \`npm run docs\` locally to regenerate docs and add them to this PR."
2 changes: 1 addition & 1 deletion .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
node-version: 18

- name: Install Dependencies
run: yarn
run: npm install

- name: Create Release Pull Request
uses: changesets/action@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
node-version: 18

- name: Install Dependencies & build
run: yarn && yarn build
run: npm install && npm run build

- name: Create .npmrc
run: |
Expand All @@ -55,7 +55,7 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: NPM publish
run: yarn changeset publish
run: npx @changesets/cli publish

- name: Git tags
# list tags then try to push them
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: yarn install
run: yarn
- name: npm install
run: npm install

- name: run formatting and license check
run: yarn format:check
run: npm run format:check

- name: run unit tests (includes lint)
run: yarn test
run: npm run test

node-integration-test:
if: github.secret_source == 'Actions'
Expand All @@ -53,15 +53,15 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache: 'npm'

- name: yarn install
run: yarn
- name: npm install
run: npm install

- name: run node iTests
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: yarn test:node:integration
run: npm run test:node:integration

web-integration-test:
if: github.secret_source == 'Actions'
Expand All @@ -75,15 +75,15 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache: 'npm'

- name: yarn install
run: yarn
- name: npm install
run: npm install

- name: run web iTests
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: yarn test:web:integration
run: npm run test:web:integration

interface-alignment-test:
name: Interface Alignment Test
Expand All @@ -94,7 +94,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'
cache: 'npm'

- name: Get VertexAI repo
# Need to npm install inner repo first or there will be errors
Expand All @@ -103,7 +103,7 @@ jobs:
cd nodejs-vertexai
npm install
cd ..
yarn
npm install

- name: Run tests
env:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ temp/
.DS_Store
testfiles
nodejs-vertexai/
samples/yarn.lock
samples/package-lock.json
12 changes: 6 additions & 6 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ Steps to build locally:

1. clone this repo
1. `cd generative-ai-js`
1. Run `yarn` to install dependencies.
1. Run `npm install` to install dependencies.
1. Make changes as needed to source code.
1. Run `yarn build` to build.
1. Run `yarn test` to run unit tests.
1. Run `yarn docs` to generate any changes to reference docs (destination dir is docs/reference).
1. Run `yarn format` to fix formatting and add license headers as needed.
1. Run `yarn changeset` to generate the changeset summary.
1. Run `npm run build` to build.
1. Run `npm run test` to run unit tests.
1. Run `npm run docs` to generate any changes to reference docs (destination dir is docs/reference).
1. Run `npm run format` to fix formatting and add license headers as needed.
1. Run `npx @changeset/cli` to generate the changeset summary.

### Code Reviews

Expand Down
Loading
Loading