Skip to content
Permalink
Browse files

Upgrade: Bump @types/sinon from 5.0.7 to 7.0.5

Close #1770
  • Loading branch information...
dependabot authored and molant committed Feb 1, 2019
1 parent de0f3ae commit c9a1f3b1d80974711c6b04e1450b597c22b02ffc
Showing with 88 additions and 30 deletions.
  1. +1 βˆ’0 packages/connector-chrome/package.json
  2. +1 βˆ’0 packages/connector-jsdom/package.json
  3. +1 βˆ’0 packages/connector-local/package.json
  4. +1 βˆ’0 packages/create-hint/package.json
  5. +12 βˆ’4 packages/create-hint/tests/create-hint.ts
  6. +1 βˆ’0 packages/create-hintrc/package.json
  7. +6 βˆ’2 packages/create-hintrc/tests/browserslist.ts
  8. +15 βˆ’7 packages/create-hintrc/tests/create-hintrc.ts
  9. +1 βˆ’0 packages/create-parser/package.json
  10. +7 βˆ’7 packages/create-parser/tests/new-parser.ts
  11. +1 βˆ’0 packages/extension-browser/package.json
  12. +1 βˆ’0 packages/extension-vscode/package.json
  13. +1 βˆ’0 packages/formatter-codeframe/package.json
  14. +1 βˆ’0 packages/formatter-excel/package.json
  15. +1 βˆ’0 packages/formatter-html/package.json
  16. +1 βˆ’0 packages/formatter-json/package.json
  17. +1 βˆ’0 packages/formatter-stylish/package.json
  18. +1 βˆ’1 packages/hint/package.json
  19. +16 βˆ’3 packages/hint/tests/lib/cli/analyze.ts
  20. +6 βˆ’2 packages/hint/tests/lib/utils/npm.ts
  21. +1 βˆ’0 packages/parser-babel-config/package.json
  22. +1 βˆ’0 packages/parser-css/package.json
  23. +1 βˆ’0 packages/parser-html/package.json
  24. +1 βˆ’0 packages/parser-javascript/package.json
  25. +1 βˆ’0 packages/parser-manifest/package.json
  26. +1 βˆ’0 packages/parser-package-json/package.json
  27. +1 βˆ’0 packages/parser-typescript-config/package.json
  28. +1 βˆ’0 packages/parser-webpack-config/package.json
  29. +4 βˆ’4 yarn.lock
@@ -18,6 +18,7 @@
"@types/is-ci": "^1.1.0",
"@types/lockfile": "^1.0.0",
"@types/lodash": "^4.14.120",
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -18,6 +18,7 @@
"@hint/utils-create-server": "^2.0.1",
"@types/jsdom": "^12.2.1",
"@types/lodash": "^4.14.120",
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -15,6 +15,7 @@
"@hint/parser-html": "^2.0.2",
"@types/chokidar": "^1.7.5",
"@types/mock-require": "^2.0.0",
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -12,6 +12,7 @@
"description": "webhint's hint initializer package",
"devDependencies": {
"@types/node": "10.12.18",
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -7,7 +7,7 @@ import anyTest, { TestInterface, ExecutionContext } from 'ava';
import * as handlebarsUtils from '../src/handlebars-utils';

type Inquirer = {
prompt: () => void;
prompt: () => Promise<any>;
};

type FsExtra = {
@@ -21,7 +21,7 @@ type WriteFileAsyncModule = {
};

type IsOfficialModule = {
default: () => void;
default: () => Promise<boolean>;
};

type CWD = {
@@ -59,8 +59,16 @@ const initContext = (t: ExecutionContext<CreateHintContext>) => {
},
escapeSafeString: handlebarsUtils.escapeSafeString
};
t.context.inquirer = { prompt() { } };
t.context.isOfficialModule = { default() { } };
t.context.inquirer = {
prompt() {
return Promise.resolve({});
}
};
t.context.isOfficialModule = {
default() {
return Promise.resolve(false);
}
};
t.context.mkdirp = (dir: string, callback: Function) => {
callback();
};
@@ -17,6 +17,7 @@
"devDependencies": {
"@types/inquirer": "^0.0.43",
"@types/node": "10.12.18",
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -3,7 +3,7 @@ import * as sinon from 'sinon';
import anyTest, { TestInterface } from 'ava';

type Inquirer = {
prompt: () => void;
prompt: () => Promise<any>;
};

type Logger = {
@@ -38,7 +38,11 @@ const loadScript = (context: BrowserslistContext): () => Promise<string> => {
};

test.beforeEach((t) => {
t.context.inquirer = { prompt() { } };
t.context.inquirer = {
prompt() {
return Promise.resolve();
}
};
t.context.logger = { log() { } };

t.context.sandbox = sinon.createSandbox();
@@ -6,7 +6,7 @@ import anyTest, { TestInterface, ExecutionContext } from 'ava';
import { NpmPackage } from 'hint/dist/src/lib/types';

type Inquirer = {
prompt: () => void;
prompt: () => Promise<any>;
};

type Logger = {
@@ -15,7 +15,7 @@ type Logger = {
};

type StubBrowserslistObject = {
generateBrowserslistConfig: () => void;
generateBrowserslistConfig: () => Promise<any>;
};

type ResourceLoader = {
@@ -33,7 +33,7 @@ type Fs = {
};

type Npm = {
getOfficialPackages: () => NpmPackage[] | null;
getOfficialPackages: () => Promise<NpmPackage[] | null>;
installPackages: () => boolean;
};

@@ -94,8 +94,16 @@ const loadScript = (context: CreateHintRCContext): () => Promise<boolean> => {
};

const initContext = (t: ExecutionContext<CreateHintRCContext>) => {
t.context.inquirer = { prompt() { } };
t.context.stubBrowserslistObject = { generateBrowserslistConfig() { } };
t.context.inquirer = {
prompt() {
return Promise.resolve();
}
};
t.context.stubBrowserslistObject = {
generateBrowserslistConfig() {
return Promise.resolve();
}
};
t.context.resourceLoader = {
getCoreResources(): [] | null {
return null;
@@ -114,8 +122,8 @@ const initContext = (t: ExecutionContext<CreateHintRCContext>) => {
log() { }
};
t.context.npm = {
getOfficialPackages(): NpmPackage[] | null {
return null;
getOfficialPackages() {
return Promise.resolve(null);
},
installPackages(): boolean {
return false;
@@ -13,6 +13,7 @@
"devDependencies": {
"@types/inquirer": "^0.0.43",
"@types/node": "10.12.18",
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -7,7 +7,7 @@ import * as InquirerTypes from 'inquirer';
import * as handlebarsUtils from '../src/handlebars-utils';

type Inquirer = {
prompt: (questions: InquirerTypes.Question[]) => void;
prompt: (questions: InquirerTypes.Question[]) => Promise<any>;
};

type FsExtra = {
@@ -17,15 +17,15 @@ type FsExtra = {
type Mkdirp = (dir: string, callback: Function) => void;

type ReadFileAsync = {
default: () => void;
default: () => Promise<string>;
};

type WriteFileAsync = {
default: () => void;
};

type IsOfficial = {
default: () => void;
default: () => Promise<boolean>;
};

type NormalizeStringByDelimiter = {
@@ -68,8 +68,8 @@ const initContext = (t: ExecutionContext<NewParserContext>) => {
escapeSafeString: handlebarsUtils.escapeSafeString
};
t.context.handlebarsUtilsCompileTemplateStub = sandbox.stub(t.context.handlebarsUtils, 'compileTemplate').resolves('');
t.context.inquirer = { prompt(questions: InquirerTypes.Question[]) { } };
t.context.isOfficial = { default() { } };
t.context.inquirer = { prompt(questions: InquirerTypes.Question[]) { return Promise.resolve(); } };
t.context.isOfficial = { default() { return Promise.resolve(false); } };
t.context.mkdirp = (dir: string, callback: Function) => {
callback();
};
@@ -79,7 +79,7 @@ const initContext = (t: ExecutionContext<NewParserContext>) => {
}
};
t.context.normalizeStringByDelimiterDefaultStub = sandbox.stub(t.context.normalizeStringByDelimiter, 'default').returns('');
t.context.readFileAsync = { default() { } };
t.context.readFileAsync = { default() { return Promise.resolve(''); } };
t.context.readFileAsyncDefaultStub = sandbox.stub(t.context.readFileAsync, 'default').resolves('');
t.context.sandbox = sandbox;
t.context.writeFileAsync = { default() { } };
@@ -216,7 +216,7 @@ test('It should create a new non-official parser.', async (t) => {
.resolves(parserInfoResult)
.onSecondCall()
.resolves(parserEventsResult);

const newParser = loadScript(t.context);
const result = await newParser();

@@ -36,6 +36,7 @@
"@types/highlight.js": "^9.12.3",
"@types/is-ci": "^1.1.0",
"@types/puppeteer": "^1.11.2",
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"browserslist": "^4.4.1",
"cpx": "^1.5.0",
@@ -22,6 +22,7 @@
},
"description": "Run webhint in Visual Studio Code.",
"devDependencies": {
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -14,6 +14,7 @@
},
"devDependencies": {
"@types/log-symbols": "^2.0.0",
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -12,6 +12,7 @@
"lodash": "^4.17.11"
},
"devDependencies": {
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -18,6 +18,7 @@
"@types/fs-extra": "^5.0.4",
"@types/moment": "^2.13.0",
"@types/proxyquire": "^1.3.28",
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -11,6 +11,7 @@
"lodash": "^4.17.11"
},
"devDependencies": {
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -15,6 +15,7 @@
},
"devDependencies": {
"@types/log-symbols": "^2.0.0",
"@types/sinon": "^7.0.5",
"@types/text-table": "^0.2.0",
"ava": "^1.2.0",
"cpx": "^1.5.0",
@@ -55,7 +55,7 @@
"@types/ora": "^3.0.0",
"@types/request": "^2.48.1",
"@types/semver": "^5.4.0",
"@types/sinon": "^5.0.7",
"@types/sinon": "^7.0.5",
"@types/strip-bom": "^3.0.0",
"@types/strip-json-comments": "^0.0.30",
"@types/update-notifier": "^2.5.0",
@@ -53,8 +53,19 @@ type Config = {
Configuration: Configuration;
};

type IEnginePrototype = {
formatters: any[];
close(): void;
emitAsync(eventName: string, data: any): Promise<any>;
executeOn(): Promise<any>;
};

interface IEngine {
new(): IEnginePrototype;
}

type EngineContainer = {
Engine: any;
Engine: IEngine;
}

type Spinner = {
@@ -140,7 +151,9 @@ const initContext = (t: ExecutionContext<AnalyzeContext>) => {
}

public close() { }
public executeOn() { }
public executeOn() {
return Promise.resolve();
}
}
};

@@ -400,7 +413,7 @@ test('If executeOn returns an error, it should call to spinner.fail()', async (t
sandbox.stub(t.context.config.Configuration, 'fromConfig').returns({});
sandbox.stub(t.context.config.Configuration, 'loadConfigFile').returns({});
sandbox.stub(t.context.config.Configuration, 'validateHintsConfig').returns(validateHintsConfigResult);
sandbox.stub(t.context.engineContainer.Engine.prototype, 'executeOn').resolves([{ severity: Severity.error }]);
sandbox.stub((t.context.engineContainer.Engine.prototype as IEnginePrototype), 'executeOn').resolves([{ severity: Severity.error }]);

const analyze = loadScript(t.context);

@@ -20,7 +20,7 @@ type Logger = {
};

type NPMRegistryFetch = {
json: (url: string) => void;
json: (url: string) => Promise<any>;
};

type LoadJSONFileModule = {
@@ -77,7 +77,11 @@ const initContext = (t: ExecutionContext<NPMContext>) => {
error() { },
log() { }
};
t.context.npmRegistryFetch = { json(url: string) { } };
t.context.npmRegistryFetch = {
json(url: string) {
return Promise.resolve();
}
};
t.context.child = {
spawn(command: string, args: string[]): EventEmitter | null {
return null;
@@ -11,6 +11,7 @@
"lodash": "^4.17.11"
},
"devDependencies": {
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -12,6 +12,7 @@
},
"description": "webhint parser needed to analyze CSS files",
"devDependencies": {
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -12,6 +12,7 @@
"description": "webhint parser needed to analyze HTML files",
"devDependencies": {
"@types/jsdom": "^12.2.1",
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
@@ -13,6 +13,7 @@
"description": "webhint parser needed to analyze JavaScript files",
"devDependencies": {
"@types/eslint": "^4.16.6",
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint-plugin-import": "^2.16.0",
@@ -8,6 +8,7 @@
},
"description": "webhint parser for web app manifest files",
"devDependencies": {
"@types/sinon": "^7.0.5",
"ajv": "^6.7.0",
"ava": "^1.2.0",
"cpx": "^1.5.0",
@@ -11,6 +11,7 @@
"lodash": "^4.17.11"
},
"devDependencies": {
"@types/sinon": "^7.0.5",
"ava": "^1.2.0",
"cpx": "^1.5.0",
"eslint": "^5.12.1",
Oops, something went wrong.

0 comments on commit c9a1f3b

Please sign in to comment.
You can’t perform that action at this time.