Skip to content

Commit c87c31c

Browse files
author
Tajudeen
committed
Fix path_1, fs_1, and event-stream imports in inlineMeta.js and validateVariableNames.js
1 parent cbd8d6a commit c87c31c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

build/lib/inlineMeta.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/lib/inlineMeta.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import es from 'event-stream';
7-
import { basename } from 'path';
6+
import * as es from 'event-stream';
7+
import * as path from 'path';
88
import File from 'vinyl';
99

1010
export interface IInlineMetaContext {
@@ -52,7 +52,7 @@ export function inlineMeta(result: NodeJS.ReadWriteStream, ctx: IInlineMetaConte
5252

5353
function matchesFile(file: File, ctx: IInlineMetaContext): boolean {
5454
for (const targetPath of ctx.targetPaths) {
55-
if (file.basename === basename(targetPath)) { // TODO would be nicer to figure out root relative path to not match on false positives
55+
if (file.basename === path.basename(targetPath)) { // TODO would be nicer to figure out root relative path to not match on false positives
5656
return true;
5757
}
5858
}

build/lib/stylelint/validateVariableNames.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/lib/stylelint/validateVariableNames.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { readFileSync } from 'fs';
7-
import path from 'path';
6+
import * as fs from 'fs';
7+
import * as path from 'path';
88

99
const RE_VAR_PROP = /var\(\s*(--([\w\-\.]+))/g;
1010

1111
let knownVariables: Set<string> | undefined;
1212
function getKnownVariableNames() {
1313
if (!knownVariables) {
14-
const knownVariablesFileContent = readFileSync(path.join(__dirname, './vscode-known-variables.json'), 'utf8').toString();
14+
const knownVariablesFileContent = fs.readFileSync(path.join(__dirname, './vscode-known-variables.json'), 'utf8').toString();
1515
const knownVariablesInfo = JSON.parse(knownVariablesFileContent);
1616
knownVariables = new Set([...knownVariablesInfo.colors, ...knownVariablesInfo.others] as string[]);
1717
}

0 commit comments

Comments
 (0)