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

Move @types/http-cache-semantics from dev to deps #219

Merged
merged 1 commit into from Jan 5, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -32,7 +32,11 @@
"7234",
"compliant"
],
"dependenciesComments": {
"@types/http-cache-semantics": "It needs to be in the dependencies list and not devDependencies because otherwise projects that use this one will be getting `Could not find a declaration file for module 'http-cache-semantics'` error when running `tsc`, see https://github.com/jaredwray/cacheable-request/issues/194 for details"
},
"dependencies": {
"@types/http-cache-semantics": "^4.0.1",
"get-stream": "^6.0.1",
"http-cache-semantics": "^4.1.0",
"keyv": "^4.5.2",
Expand All @@ -42,7 +46,6 @@
},
"devDependencies": {
"@keyv/sqlite": "^3.6.4",
"@types/http-cache-semantics": "^4.0.1",
"@types/delay": "^3.1.0",
"@types/get-stream": "^3.0.2",
"@types/jest": "^29.2.4",
Expand Down
13 changes: 13 additions & 0 deletions test/dependencies.test.ts
@@ -0,0 +1,13 @@
import {readFileSync} from 'node:fs';

test('@types/http-cache-semantics is a regular (not dev) dependency', () => {
// Required to avoid `Could not find a declaration file for module 'http-cache-semantics'` error from `tsc` when using this package in other projects

// Arrange
const packageJsonContents = JSON.parse(
readFileSync(new URL('../package.json', import.meta.url), 'utf8'),
);

// Assert
expect(packageJsonContents).toHaveProperty('dependencies.@types/http-cache-semantics');
});