Skip to content

Commit dea7910

Browse files
fix: fix api and upgrade to typescript 4.1.3
1 parent bcfbbaf commit dea7910

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ async function enableWatchMode(params: Params, entries: EntryConfig[]) {
172172

173173
// Start watcher for every source set
174174
const promises = entries.map((entry) => {
175-
return new Promise((resolve, reject) => {
175+
return new Promise<void>((resolve, reject) => {
176176
// create a pattern to watch all scss files
177177
const watchPattern = path.resolve(params.context, entry.srcRelative, "**/*.scss");
178178
const watcher = chokidar.watch(watchPattern);

lib/pipes/processPostcss.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import sass from "sass";
2-
import postcss, { AcceptedPlugin } from "postcss";
2+
import postcss, { AcceptedPlugin, Result as PostcssResult, ProcessOptions as PostcssProcessOptions } from "postcss";
33
import { EntryConfig } from "../../index";
44

55
export interface PostcssPipeResult {
6-
result: postcss.Result;
6+
result: PostcssResult;
77
sassResult: sass.Result;
88
from: string;
99
to: string;
@@ -25,7 +25,7 @@ type PostcssUse = (p: PostcssUseParams) => AcceptedPlugin;
2525
export async function processPostcss(sassResult: sass.Result, entry: EntryConfig): Promise<PostcssPipeResult> {
2626
const from = sassResult.stats.entry;
2727
const to = from.replace(entry.src, entry.out).replace(/\.(scss|sass)$/, ".css");
28-
const options: postcss.ProcessOptions = {
28+
const options: PostcssProcessOptions = {
2929
from,
3030
to,
3131
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"husky": "4.2.5",
6060
"prettier": "2.0.5",
6161
"pretty-quick": "2.0.1",
62-
"typescript": "3.9.7"
62+
"typescript": "4.1.3"
6363
},
6464
"husky": {
6565
"hooks": {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,10 +837,10 @@ to-regex-range@^5.0.1:
837837
dependencies:
838838
is-number "^7.0.0"
839839

840-
typescript@3.9.7:
841-
version "3.9.7"
842-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
843-
integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
840+
typescript@4.1.3:
841+
version "4.1.3"
842+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
843+
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
844844

845845
util-deprecate@^1.0.1:
846846
version "1.0.2"

0 commit comments

Comments
 (0)