From 952ebfa03eae33c2e26f3e8a4adfcaec8ee41665 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Thu, 15 Nov 2018 11:18:36 +0200 Subject: [PATCH] style: fix styles in supi --- packages/supi/package.json | 7 +++--- .../supi/test/install/frozenShrinkwrap.ts | 4 +++ .../supi/test/install/multipleImporters.ts | 9 ++++++- packages/supi/test/install/sideEffects.ts | 2 +- packages/supi/test/tsconfig.json | 25 ------------------- packages/supi/test/typings/tape-promise.d.ts | 10 +++++--- 6 files changed, 22 insertions(+), 35 deletions(-) delete mode 100644 packages/supi/test/tsconfig.json diff --git a/packages/supi/package.json b/packages/supi/package.json index 992a9d83bd..e9e578ba3e 100644 --- a/packages/supi/package.json +++ b/packages/supi/package.json @@ -161,14 +161,13 @@ "?commit": "echo 'Run Git commit wizard'", "commit": "commit", "commitmsg": "commitlint -e", - "lint": "tslint -c tslint.json --project .", - "lint-test": "tslint -c tslint.json --project test", + "lint": "tslint -c tslint.json src/**/*.ts test/**/*.ts", "pnpm-registry-mock": "pnpm-registry-mock", "test:tap": "ts-node test", "test:e2e": "npm-run-all -p -r pnpm-registry-mock test:tap", "pretest": "rimraf ../../../.tmp/ && pnpm-registry-mock prepare", - "test-with-preview": "npm run lint && npm run lint-test && preview && npm run test:e2e", - "test": "npm run lint && npm run lint-test && npm run tsc && npm run test:e2e", + "test-with-preview": "npm run lint && preview && npm run test:e2e", + "test": "npm run lint && npm run tsc && npm run test:e2e", "tsc": "rimraf lib && tsc", "prepublishOnly": "npm run tsc" } diff --git a/packages/supi/test/install/frozenShrinkwrap.ts b/packages/supi/test/install/frozenShrinkwrap.ts index 504f82edd0..fd2a146cae 100644 --- a/packages/supi/test/install/frozenShrinkwrap.ts +++ b/packages/supi/test/install/frozenShrinkwrap.ts @@ -60,12 +60,14 @@ test('frozen-shrinkwrap: fail on a shared shrinkwrap.yaml that does not satisfy const project = preparePackages(t, [ { name: 'p1', + dependencies: { 'is-positive': '^3.0.0', }, }, { name: 'p2', + dependencies: { 'is-negative': '1.0.0', }, @@ -223,12 +225,14 @@ test('prefer-frozen-shrinkwrap: should prefer frozen-shrinkwrap when package has const projects = preparePackages(t, [ { name: 'p1', + dependencies: { p2: 'link:../p2', }, }, { name: 'p2', + dependencies: { 'is-negative': '1.0.0', }, diff --git a/packages/supi/test/install/multipleImporters.ts b/packages/supi/test/install/multipleImporters.ts index fba004017e..800e598718 100644 --- a/packages/supi/test/install/multipleImporters.ts +++ b/packages/supi/test/install/multipleImporters.ts @@ -2,9 +2,9 @@ import assertProject from '@pnpm/assert-project' import { preparePackages } from '@pnpm/prepare' import path = require('path') import readPkg = require('read-pkg') +import { install, installPkgs } from 'supi' import tape = require('tape') import promisifyTape from 'tape-promise' -import { install, installPkgs } from 'supi' import { testDefaults } from '../utils' const test = promisifyTape(tape) @@ -15,6 +15,7 @@ test('install only the dependencies of the specified importer', async (t) => { { name: 'project-1', version: '1.0.0', + dependencies: { 'is-positive': '1.0.0', }, @@ -22,6 +23,7 @@ test('install only the dependencies of the specified importer', async (t) => { { name: 'project-2', version: '1.0.0', + dependencies: { 'is-negative': '1.0.0', }, @@ -53,6 +55,7 @@ test('dependencies of other importers are not pruned when installing for a subse { name: 'project-1', version: '1.0.0', + dependencies: { 'is-positive': '1.0.0', }, @@ -60,6 +63,7 @@ test('dependencies of other importers are not pruned when installing for a subse { name: 'project-2', version: '1.0.0', + dependencies: { 'is-negative': '1.0.0', }, @@ -92,6 +96,7 @@ test('dependencies of other importers are not pruned when (headless) installing { name: 'project-1', version: '1.0.0', + dependencies: { 'is-positive': '1.0.0', }, @@ -99,6 +104,7 @@ test('dependencies of other importers are not pruned when (headless) installing { name: 'project-2', version: '1.0.0', + dependencies: { 'is-negative': '1.0.0', }, @@ -132,6 +138,7 @@ test('adding a new dev dependency to project that uses a shared shrinkwrap', asy { name: 'project-1', version: '1.0.0', + dependencies: { 'is-positive': '1.0.0', }, diff --git a/packages/supi/test/install/sideEffects.ts b/packages/supi/test/install/sideEffects.ts index ef9362803d..fbf8fbfdfa 100644 --- a/packages/supi/test/install/sideEffects.ts +++ b/packages/supi/test/install/sideEffects.ts @@ -1,8 +1,8 @@ import prepare from '@pnpm/prepare' import fs = require('mz/fs') -import rimraf = require('rimraf-then') import path = require('path') import exists = require('path-exists') +import rimraf = require('rimraf-then') import { installPkgs } from 'supi' import tape = require('tape') import promisifyTape from 'tape-promise' diff --git a/packages/supi/test/tsconfig.json b/packages/supi/test/tsconfig.json deleted file mode 100644 index 1a32adf34f..0000000000 --- a/packages/supi/test/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "removeComments": false, - "preserveConstEnums": true, - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "suppressImplicitAnyIndexErrors": true, - "allowSyntheticDefaultImports": true, - "strictNullChecks": true, - "target": "es6", - "outDir": "lib", - "module": "commonjs", - "moduleResolution": "node" - }, - "include": [ - "./**/*.ts", - "../typings/**/*.d.ts", - "./typings/**/*.d.ts" - ], - "atom": { - "rewriteTsconfig": true - } -} diff --git a/packages/supi/test/typings/tape-promise.d.ts b/packages/supi/test/typings/tape-promise.d.ts index 896238a21b..1b21758ff3 100644 --- a/packages/supi/test/typings/tape-promise.d.ts +++ b/packages/supi/test/typings/tape-promise.d.ts @@ -1,9 +1,11 @@ +// tslint:disable declare module 'tape-promise' { import tape = require('tape') export = tapePromise; - function tapePromise(tape: any): (name: string, cb: tape.TestCase) => void; - function tapePromise(tape: any): (name: string, opts: tape.TestOptions, cb: tape.TestCase) => void; - function tapePromise(tape: any): (cb: tape.TestCase) => void; - function tapePromise(tape: any): (opts: tape.TestOptions, cb: tape.TestCase) => void; + function tapePromise (tape: any): (name: string, cb: tape.TestCase) => void; + function tapePromise (tape: any): (name: string, opts: tape.TestOptions, cb: tape.TestCase) => void; + function tapePromise (tape: any): (cb: tape.TestCase) => void; + function tapePromise (tape: any): (opts: tape.TestOptions, cb: tape.TestCase) => void; } +// tslint:enable