Skip to content

Commit d07392c

Browse files
author
Michael Stramel
committed
Add types for packages that have them
1 parent f649d0c commit d07392c

6 files changed

+38
-7
lines changed

package-lock.json

+28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,12 @@
104104
"@types/es-module-lexer": "^0.3.0",
105105
"@types/etag": "^1.8.0",
106106
"@types/http-proxy": "^1.17.4",
107+
"@types/mime-types": "^2.1.0",
107108
"@types/mkdirp": "^1.0.0",
109+
"@types/rimraf": "^3.0.0",
110+
"@types/signal-exit": "^3.0.0",
108111
"@types/tar": "^4.0.3",
112+
"@types/validate-npm-package-name": "^3.0.0",
109113
"@types/ws": "^7.2.4",
110114
"cross-env": "^7.0.2",
111115
"dir-compare": "^2.2.0",

src/commands/dev.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const sendFile = (
127127
if (
128128
req.headers['cache-control']?.includes('no-transform') ||
129129
['HEAD', 'OPTIONS'].includes(req.method!) ||
130-
!isCompressible(mime.contentType(ext))
130+
!isCompressible(mime.contentType(ext) as string)
131131
) {
132132
acceptEncoding = '';
133133
}

src/rollup-plugin-css.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {Plugin} from 'rollup';
22
import {promises as fs} from 'fs';
3-
import path from 'path';
43

54
function getInjectorCode(name: string, code: string) {
65
return `

src/rollup-plugin-remote-cdn.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import mkdirp from 'mkdirp';
2-
import cacache from 'cacache';
3-
import url from 'url';
41
import fs from 'fs';
2+
import cacache from 'cacache';
3+
import mkdirp from 'mkdirp';
54
import path from 'path';
5+
import {OutputOptions, Plugin, ResolvedId} from 'rollup';
66
import tar from 'tar';
7-
import {OutputBundle, OutputOptions, Plugin, ResolvedId} from 'rollup';
7+
import url from 'url';
88
import {fetchCDNResource, HAS_CDN_HASH_REGEX, PIKA_CDN, RESOURCE_CACHE} from './util';
99

1010
const CACHED_FILE_ID_PREFIX = 'snowpack-pkg-cache:';

src/rollup-plugin-stats.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from 'fs';
22
import path from 'path';
3-
import zlib from 'zlib';
43
import {OutputOptions, OutputBundle} from 'rollup';
4+
import zlib from 'zlib';
55

66
export type DependencyStats = {
77
size: number;

0 commit comments

Comments
 (0)