Skip to content

Commit

Permalink
Set @typespec/compiler as a peerDependency in library templates (#…
Browse files Browse the repository at this point in the history
…4685)

As specified in [the
documentation](https://typespec.io/docs/extending-typespec/basics#step-3-defining-dependencies):
> Use `peerDependencies` for all TypeSpec libraries (and the compiler)
that you use in your own library or emitter.

---------

Co-authored-by: Mark Cowlishaw <[email protected]>
  • Loading branch information
steverice and markcowl authored Nov 21, 2024
1 parent f892353 commit 0664147
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .chronus/changes/peer-dependencies-2024-9-10-22-53-58.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- "@typespec/compiler"
---

Set `@typespec/compiler` as a `peerDependency` in library templates
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
"default": "./dist/src/testing/index.js"
}
},
"dependencies": {
"peerDependencies": {
"@typespec/compiler": "latest"
},
"devDependencies": {
"@types/node": "latest",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typespec/compiler": "latest",
"eslint": "^8.45.0",
"typescript": "^5.3.3",
"prettier": "^3.0.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
"default": "./dist/src/testing/index.js"
}
},
"dependencies": {
"peerDependencies": {
"@typespec/compiler": "latest"
},
"devDependencies": {
"@types/node": "latest",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typespec/compiler": "latest",
"@typespec/library-linter": "latest",
"eslint": "^8.45.0",
"prettier": "^3.0.3",
Expand Down
3 changes: 2 additions & 1 deletion packages/compiler/templates/emitter-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
"default": "./dist/src/testing/index.js"
}
},
"dependencies": {
"peerDependencies": {
"@typespec/compiler": "latest"
},
"devDependencies": {
"@types/node": "latest",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typespec/compiler": "latest",
"eslint": "^8.45.0",
"typescript": "^5.3.3",
"prettier": "^3.0.3"
Expand Down
3 changes: 2 additions & 1 deletion packages/compiler/templates/library-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
"default": "./dist/src/testing/index.js"
}
},
"dependencies": {
"peerDependencies": {
"@typespec/compiler": "latest"
},
"devDependencies": {
"@types/node": "latest",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typespec/compiler": "latest",
"@typespec/library-linter": "latest",
"eslint": "^8.45.0",
"prettier": "^3.0.3",
Expand Down

0 comments on commit 0664147

Please sign in to comment.