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

Dependency: Remove node-fetch #28160

Merged
merged 2 commits into from
Jul 3, 2024
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
23 changes: 0 additions & 23 deletions docs/_snippets/loader-story.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import type { Meta, StoryObj } from '@storybook/angular';

import { moduleMetadata } from '@storybook/angular';

import fetch from 'node-fetch';

import { CommonModule } from '@angular/common';

import { TodoItem } from './TodoItem';
Expand Down Expand Up @@ -43,8 +41,6 @@ export const Primary: Story = {
```

```js filename="TodoItem.stories.js|jsx" renderer="react" language="js"
import fetch from 'node-fetch';

import { TodoItem } from './TodoItem';

/*
Expand All @@ -69,8 +65,6 @@ export const Primary = {
```tsx filename="MyComponent.stories.ts|tsx" renderer="react" language="ts-4-9"
import type { Meta, StoryObj } from '@storybook/react';

import fetch from 'node-fetch';

import { TodoItem } from './TodoItem';

/*
Expand Down Expand Up @@ -98,8 +92,6 @@ export const Primary: Story = {
```tsx filename="MyComponent.stories.ts|tsx" renderer="react" language="ts"
import type { Meta, StoryObj } from '@storybook/react';

import fetch from 'node-fetch';

import { TodoItem } from './TodoItem';

/*
Expand Down Expand Up @@ -201,8 +193,6 @@ export const Primary: Story = {
```

```js filename="TodoItem.stories.js" renderer="svelte" language="js"
import fetch from 'node-fetch';

import TodoItem from './TodoItem.svelte';

export default {
Expand Down Expand Up @@ -233,8 +223,6 @@ export const Primary = {
```ts filename="TodoItem.stories.ts" renderer="svelte" language="ts-4-9"
import type { Meta, StoryObj } from '@storybook/svelte';

import fetch from 'node-fetch';

import TodoItem from './TodoItem.svelte';

/*
Expand Down Expand Up @@ -268,8 +256,6 @@ export const Primary: Story = {
```ts filename="TodoItem.stories.ts" renderer="svelte" language="ts"
import type { Meta, StoryObj } from '@storybook/svelte';

import fetch from 'node-fetch';

import TodoItem from './TodoItem.svelte';

/*
Expand Down Expand Up @@ -303,8 +289,6 @@ export const Primary: Story = {
```js filename="TodoItem.stories.js" renderer="vue" language="js"
import TodoItem from './TodoItem.vue';

import fetch from 'node-fetch';

export default {
component: TodoItem,
};
Expand Down Expand Up @@ -335,8 +319,6 @@ import type { Meta, StoryObj } from '@storybook/vue3';

import TodoItem from './TodoItem.vue';

import fetch from 'node-fetch';

const meta = {
component: TodoItem,
} satisfies Meta<typeof TodoItem>;
Expand Down Expand Up @@ -370,8 +352,6 @@ import type { Meta, StoryObj } from '@storybook/vue3';

import TodoItem from './TodoItem.vue';

import fetch from 'node-fetch';

const meta: Meta<typeof TodoItem> = {
component: TodoItem,
};
Expand Down Expand Up @@ -401,7 +381,6 @@ export const Primary: Story = {
```

```js filename="TodoItem.stories.js" renderer="web-components" language="js"
import fetch from 'node-fetch';
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/api/csf
Expand All @@ -424,8 +403,6 @@ export const Primary = {
```ts filename="TodoItem.stories.ts" renderer="web-components" language="ts"
import type { Meta, StoryObj } from '@storybook/web-components';

import fetch from 'node-fetch';

/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/api/csf
Expand Down
2 changes: 0 additions & 2 deletions docs/_snippets/storybook-preview-global-loader.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
```js filename=".storybook/preview.js" renderer="common" language="js"
import fetch from 'node-fetch';

export default {
loaders: [
async () => ({
Expand Down
1 change: 0 additions & 1 deletion scripts/event-log-checker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import chalk from 'chalk';
import assert from 'assert';
import fetch from 'node-fetch';
import { esMain } from './utils/esmain';
import { allTemplates } from '../code/lib/cli/src/sandbox-templates';
import versions from '../code/core/src/common/versions';
Expand Down
2 changes: 0 additions & 2 deletions scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
"@types/jest": "^29.5.5",
"@types/lodash": "^4",
"@types/node": "^18.0.0",
"@types/node-fetch": "^2.5.7",
"@types/prettier": "^3.0.0",
"@types/pretty-hrtime": "^1.0.0",
"@types/prompts": "2.0.11",
Expand Down Expand Up @@ -141,7 +140,6 @@
"lint-staged": "^10.5.4",
"lodash": "^4.17.21",
"memoizerific": "^1.11.3",
"node-fetch": "^2.7.0",
"node-gyp": "^9.3.1",
"nx": "18.0.6",
"ora": "^5.4.1",
Expand Down
1 change: 0 additions & 1 deletion scripts/release/is-version-published.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import chalk from 'chalk';
import program from 'commander';
import { setOutput } from '@actions/core';
import fetch from 'node-fetch';
import { esMain } from '../utils/esmain';
import { getCurrentVersion } from './get-current-version';

Expand Down
3 changes: 1 addition & 2 deletions scripts/release/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import program from 'commander';
import semver from 'semver';
import { z } from 'zod';
import { readJson } from 'fs-extra';
import fetch from 'node-fetch';
import { dedent } from 'ts-dedent';
import dedent from 'ts-dedent';
import pRetry from 'p-retry';
import { execaCommand } from 'execa';
import { esMain } from '../utils/esmain';
Expand Down
1 change: 0 additions & 1 deletion scripts/release/utils/get-github-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

import DataLoader from 'dataloader';
import fetch from 'node-fetch';

const validRepoNameRegex = /^[\w.-]+\/[\w.-]+$/;

Expand Down
1 change: 0 additions & 1 deletion scripts/release/utils/github-client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { GraphQlQueryResponseData } from '@octokit/graphql';
import { graphql } from '@octokit/graphql';
import { request } from '@octokit/request';
import fetch from 'node-fetch';

export interface PullRequest {
number: number;
Expand Down
1 change: 0 additions & 1 deletion scripts/sandbox/utils/git.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import fetch from 'node-fetch';
import invariant from 'tiny-invariant';

import { execaCommand } from 'execa';
Expand Down
2 changes: 0 additions & 2 deletions scripts/utils/githubClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'node-fetch';

const GITHUB_API = 'https://api.github.com/graphql';

export const githubClient = (apiKey: string) => {
Expand Down
25 changes: 11 additions & 14 deletions scripts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,6 @@ __metadata:
"@types/jest": "npm:^29.5.5"
"@types/lodash": "npm:^4"
"@types/node": "npm:^18.0.0"
"@types/node-fetch": "npm:^2.5.7"
"@types/prettier": "npm:^3.0.0"
"@types/pretty-hrtime": "npm:^1.0.0"
"@types/prompts": "npm:2.0.11"
Expand Down Expand Up @@ -1481,7 +1480,6 @@ __metadata:
lint-staged: "npm:^10.5.4"
lodash: "npm:^4.17.21"
memoizerific: "npm:^1.11.3"
node-fetch: "npm:^2.7.0"
node-gyp: "npm:^9.3.1"
nx: "npm:18.0.6"
ora: "npm:^5.4.1"
Expand Down Expand Up @@ -1936,16 +1934,6 @@ __metadata:
languageName: node
linkType: hard

"@types/node-fetch@npm:^2.5.7":
version: 2.6.8
resolution: "@types/node-fetch@npm:2.6.8"
dependencies:
"@types/node": "npm:*"
form-data: "npm:^4.0.0"
checksum: 10c0/f572c3139a8f0840cff93c66ee667d1589b75850efa34376058c1cc00ead0e239b84442907c2972a3ca01406a73893424a7ce02acdd95d9b37f32430d235c5dc
languageName: node
linkType: hard

"@types/node@npm:*, @types/node@npm:>= 8, @types/node@npm:^20.0.0, @types/node@npm:~20.11.3":
version: 20.11.30
resolution: "@types/node@npm:20.11.30"
Expand Down Expand Up @@ -8841,7 +8829,7 @@ __metadata:
languageName: node
linkType: hard

"magic-string@npm:^0.30.4, magic-string@npm:^0.30.5":
"magic-string@npm:^0.30.4":
version: 0.30.10
resolution: "magic-string@npm:0.30.10"
dependencies:
Expand All @@ -8850,6 +8838,15 @@ __metadata:
languageName: node
linkType: hard

"magic-string@npm:^0.30.5":
version: 0.30.5
resolution: "magic-string@npm:0.30.5"
dependencies:
"@jridgewell/sourcemap-codec": "npm:^1.4.15"
checksum: 10c0/38ac220ca7539e96da7ea2f38d85796bdf5c69b6bcae728c4bc2565084e6dc326b9174ee9770bea345cf6c9b3a24041b767167874fab5beca874d2356a9d1520
languageName: node
linkType: hard

"magicast@npm:^0.3.3":
version: 0.3.3
resolution: "magicast@npm:0.3.3"
Expand Down Expand Up @@ -10013,7 +10010,7 @@ __metadata:
languageName: node
linkType: hard

"node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7, node-fetch@npm:^2.6.9, node-fetch@npm:^2.7.0":
"node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7, node-fetch@npm:^2.6.9":
version: 2.7.0
resolution: "node-fetch@npm:2.7.0"
dependencies:
Expand Down