-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make @parcel/watcher optional (#9506)
- Loading branch information
Showing
8 changed files
with
136 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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,5 @@ | ||
--- | ||
'@graphql-codegen/cli': major | ||
--- | ||
|
||
Make @parcel/watcher optional |
This file contains 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 contains 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 contains 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 contains 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 contains 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 contains 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,5 +1,6 @@ | ||
{ | ||
"graphql-cli": "GraphQL-CLI Deprecation", | ||
"from-0-18": "v0.18 -> v1.0", | ||
"from-0-13": "v0.13 -> v0.17" | ||
"from-0-13": "v0.13 -> v0.17", | ||
"from-4-0": "v4.0 -> v5.0" | ||
} |
This file contains 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,95 @@ | ||
--- | ||
description: Migrating to 5.0.0. What has changed? How to migrate? What are the new features? | ||
--- | ||
|
||
import { Tabs, Tab } from '@theguild/components' | ||
|
||
# Migration to 5.0.0 | ||
|
||
## What has changed? | ||
|
||
There was an outstanding issue with `@parcel/watcher` which prevented it to be installed in certain environments, or needed an extra amount of dependencies to be built. | ||
This release focuses on improving the usage of `@graphql-codegen/cli` in those environments by making it an optional peer dependency. | ||
NPM (or Yarn) will not emit errors when an optional peer dependency is missing. | ||
|
||
## How to migrate? | ||
|
||
To use `@graphql-codegen/cli`'s watch mode (based on @parcel/watcher) you need to provide it in a package that uses `@graphql-codegen/cli` from now on. | ||
|
||
Start by updating your package.json | ||
|
||
<Tabs items={['Before', 'After']}> | ||
<Tab> | ||
```json filename="package.json" | ||
{ | ||
"devDependencies": { | ||
"@graphql-codegen/cli": "^1.0.0", | ||
"@graphql-codegen/typescript": "^1.0.0", | ||
"@graphql-codegen/typescript-operations": "^1.0.0" | ||
} | ||
} | ||
``` | ||
</Tab> | ||
|
||
<Tab> | ||
```json filename="package.json" | ||
{ | ||
"devDependencies": { | ||
"@graphql-codegen/cli": "^1.0.0", | ||
"@graphql-codegen/typescript": "^1.0.0", | ||
"@graphql-codegen/typescript-operations": "^1.0.0", | ||
"@parcel/watcher": "^2.1.0" | ||
} | ||
} | ||
``` | ||
</Tab> | ||
</Tabs> | ||
|
||
If you had issues with `@parcel/watcher` previously, you can make NPM and Yarn silently discard any build errors, by using `optionalDependencies` instead: | ||
|
||
<Tabs items={['Before', 'After', 'After (Alternative)']}> | ||
<Tab> | ||
```json filename="package.json" | ||
{ | ||
"devDependencies": { | ||
"@graphql-codegen/cli": "^1.0.0", | ||
"@graphql-codegen/typescript": "^1.0.0", | ||
"@graphql-codegen/typescript-operations": "^1.0.0" | ||
} | ||
} | ||
``` | ||
</Tab> | ||
|
||
<Tab> | ||
```json filename="package.json" | ||
{ | ||
"devDependencies": { | ||
"@graphql-codegen/cli": "^1.0.0", | ||
"@graphql-codegen/typescript": "^1.0.0", | ||
"@graphql-codegen/typescript-operations": "^1.0.0" | ||
}, | ||
"optionalDependencies": { | ||
"@parcel/watcher": "^2.1.0" | ||
} | ||
} | ||
``` | ||
</Tab> | ||
|
||
<Tab> | ||
```json filename="package.json" | ||
{ | ||
"devDependencies": { | ||
"@graphql-codegen/cli": "^1.0.0", | ||
"@graphql-codegen/typescript": "^1.0.0", | ||
"@graphql-codegen/typescript-operations": "^1.0.0", | ||
"@parcel/watcher": "^2.1.0" | ||
}, | ||
"dependenciesMeta": { | ||
"@parcel/watcher": { | ||
"optional": true | ||
} | ||
} | ||
} | ||
``` | ||
</Tab> | ||
</Tabs> |