Skip to content

Commit

Permalink
Use native fetch in node over node-fetch (vercel#2985)
Browse files Browse the repository at this point in the history
  • Loading branch information
wbinnssmith authored Dec 13, 2022
1 parent 5507548 commit 7dd754c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-google-fonts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-node
- run: node ./scripts/fetch-google-font-data.js > crates/next-core/src/next_font_google/__generated__/font-data.json
- run: node --experimental-fetch ./scripts/fetch-google-font-data.js > crates/next-core/src/next_font_google/__generated__/font-data.json
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Google font-data.json (${{ github.sha }})
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"husky": "^8.0.2",
"lint-staged": "^13.1.0",
"next": "^13.0.6",
"node-fetch": "^3.3.0",
"prettier": "^2.8.1",
"semver": "^7.3.8",
"simple-git-hooks": "^2.8.1",
Expand Down
41 changes: 0 additions & 41 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions scripts/fetch-google-font-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Only includes generating the font-data.json, as TypeScript typings are maintained in the `next` npm package in the Next.js repo.
// This script writes the single file to stdout instead of directly to disk.

const fetch = require("node-fetch");

(async () => {
const { familyMetadataList } = await fetch(
"https://fonts.google.com/metadata/fonts"
Expand Down

0 comments on commit 7dd754c

Please sign in to comment.