style: fix styles in supi

This commit is contained in:
Zoltan Kochan
2018-11-15 11:18:36 +02:00
parent 92e7383d00
commit 952ebfa03e
6 changed files with 22 additions and 35 deletions

View File

@@ -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"
}

View File

@@ -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',
},

View File

@@ -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',
},

View File

@@ -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'

View File

@@ -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
}
}

View File

@@ -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