Skip to content

Commit

Permalink
Merge pull request #219 from Maxim-Mazurok/main
Browse files Browse the repository at this point in the history
Move @types/http-cache-semantics from dev to deps
  • Loading branch information
jaredwray committed Jan 5, 2023
2 parents e6054ca + fe92b8b commit 51ae212
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
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');
});

0 comments on commit 51ae212

Please sign in to comment.