From 3053bcd8e35be737571bce483f7df8d89886b167 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Tue, 15 Aug 2017 22:42:57 +0800 Subject: [PATCH 01/23] chore: add scripts to generate dt compatible definition files --- .gitignore | 1 + .travis.yml | 1 + DefinitelyTyped/dt-header.txt | 13 ++++++ DefinitelyTyped/package.json | 11 +++++ DefinitelyTyped/tsconfig.json | 15 +++++++ DefinitelyTyped/tslint.json | 7 ++++ gulpfile.ts | 25 +++++++++++- package.json | 7 +++- scripts/test-dt.sh | 10 +++++ tasks/build-dt.ts | 75 +++++++++++++++++++++++++++++++++++ tasks/utils/constants.ts | 3 ++ yarn.lock | 34 ++++++++++++++-- 12 files changed, 196 insertions(+), 6 deletions(-) create mode 100644 DefinitelyTyped/dt-header.txt create mode 100644 DefinitelyTyped/package.json create mode 100644 DefinitelyTyped/tsconfig.json create mode 100644 DefinitelyTyped/tslint.json create mode 100644 scripts/test-dt.sh create mode 100644 tasks/build-dt.ts diff --git a/.gitignore b/.gitignore index 929c2ab..d9c79fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +DefinitelyTyped/yarn.lock coverage/ node_modules/ ramda/ diff --git a/.travis.yml b/.travis.yml index 740698e..09e96a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ script: - yarn run test-utils -- --verbose --coverage - yarn run test -- --verbose - yarn run test-actual -- --verbose -u +- bash ./scripts/test-dt.sh after_success: - if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./scripts/deploy.sh; fi diff --git a/DefinitelyTyped/dt-header.txt b/DefinitelyTyped/dt-header.txt new file mode 100644 index 0000000..a8579bf --- /dev/null +++ b/DefinitelyTyped/dt-header.txt @@ -0,0 +1,13 @@ +// Type definitions for ramda 0.24 +// Project: https://github.com/types/npm-ramda +// Definitions by: Erwin Poeze +// Matt DeKrey +// Liam Goodacre +// Matt Dziuban +// Stephen King +// Alejandro Fernandez Haro +// Vítor Castro +// Jordan Quagliatini +// Simon Højberg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 diff --git a/DefinitelyTyped/package.json b/DefinitelyTyped/package.json new file mode 100644 index 0000000..f3b436e --- /dev/null +++ b/DefinitelyTyped/package.json @@ -0,0 +1,11 @@ +{ + "private": true, + "name": "definitely-typed", + "version": "0.0.0-dt", + "scripts": { + "lint": "dtslint types ramda" + }, + "devDependencies": { + "dtslint": "Microsoft/dtslint#production" + } +} diff --git a/DefinitelyTyped/tsconfig.json b/DefinitelyTyped/tsconfig.json new file mode 100644 index 0000000..fb9c330 --- /dev/null +++ b/DefinitelyTyped/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": false, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["---auto-generated-from-scripts---"] +} diff --git a/DefinitelyTyped/tslint.json b/DefinitelyTyped/tslint.json new file mode 100644 index 0000000..b889559 --- /dev/null +++ b/DefinitelyTyped/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "callable-types": false, + "interface-over-type-literal": false + } +} diff --git a/gulpfile.ts b/gulpfile.ts index 641f0a4..b91c60e 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -3,9 +3,15 @@ import * as gulp from 'gulp'; import * as gulp_diff from 'gulp-diff'; import * as gulp_rename from 'gulp-rename'; import * as gulp_run from 'run-sequence'; +import { + build_dt_chores, + build_dt_definitions, + build_dt_tests, +} from './tasks/build-dt'; import { build_watch } from './tasks/build-watch'; import { remap_watch } from './tasks/remap-watch'; import { + dt_ramda_dirname, glob_templates, output_relative_dirname, } from './tasks/utils/constants'; @@ -14,11 +20,13 @@ import { generate_files } from './tasks/utils/generate-files'; import { generate_index } from './tasks/utils/generate-index'; import { generate_remap_content } from './tasks/utils/generate-remap-content'; +type RunCallback = (error?: any) => void; + gulp.task('clean', async () => del(`${output_relative_dirname}/`)); gulp.task('build-index', generate_index); gulp.task('build-files', () => generate_files(glob_templates)); -gulp.task('build', ['clean'], (callback: (error?: any) => void) => +gulp.task('build', ['clean'], (callback: RunCallback) => gulp_run(['build-index', 'build-files'], callback), ); @@ -47,3 +55,18 @@ gulp.task('remap-check', () => { }); gulp.task('remap-watch', ['remap'], remap_watch); + +gulp.task('clean-dt', async () => del(dt_ramda_dirname)); + +gulp.task('build-dt-definitions', build_dt_definitions); +gulp.task('build-dt-chores', build_dt_chores); +gulp.task('build-dt-tests', build_dt_tests); + +gulp.task('build-dt', ['clean-dt', 'build'], (callback: RunCallback) => + gulp_run( + 'build-dt-definitions', + 'build-dt-chores', + 'build-dt-tests', + callback, + ), +); diff --git a/package.json b/package.json index f21db69..e8bcf1d 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,9 @@ "remap-check": "gulp remap-check", "jsdoc": "ts-node ./scripts/migrate-jsdoc.ts v0.24.1 ./templates", "release-tags": "bash ./scripts/release-tags.sh", - "build-check": "tsc -p ./fixtures/build-check/tsconfig.json" + "build-check": "tsc -p ./fixtures/build-check/tsconfig.json", + "build-dt": "gulp build-dt", + "test-dt": "bash ./scripts/test-dt.sh" }, "devDependencies": { "@types/del": "3.0.0", @@ -33,6 +35,7 @@ "@types/gulp-util": "3.0.31", "@types/jest": "20.0.6", "@types/node": "8.0.20", + "@types/prettier": "1.5.0", "@types/ramda": "ikatyang/types-ramda#v0.24.1-dist", "@types/run-sequence": "0.0.29", "@types/through2": "2.0.33", @@ -44,6 +47,8 @@ "glob": "7.1.2", "gulp": "3.9.1", "gulp-diff": "1.0.0", + "gulp-modify": "0.1.1", + "gulp-plugin-prettier": "1.0.0", "gulp-rename": "1.2.2", "gulp-util": "3.0.8", "jest": "20.0.4", diff --git a/scripts/test-dt.sh b/scripts/test-dt.sh new file mode 100644 index 0000000..ce4a0b8 --- /dev/null +++ b/scripts/test-dt.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +yarn run build-dt + +cd ./DefinitelyTyped + +yarn +yarn run lint + +cd .. diff --git a/tasks/build-dt.ts b/tasks/build-dt.ts new file mode 100644 index 0000000..e7dab01 --- /dev/null +++ b/tasks/build-dt.ts @@ -0,0 +1,75 @@ +import * as fs from 'fs'; +import * as glob from 'glob'; +import * as gulp from 'gulp'; +import * as gulp_prettier from 'gulp-plugin-prettier'; +import * as gulp_util from 'gulp-util'; +import { + dt_dirname, + dt_ramda_dirname, + output_relative_dirname, +} from './utils/constants'; + +// tslint:disable-next-line:no-var-requires +const gulp_modify = require('gulp-modify'); + +const test_filename = 'ramda-tests.ts'; + +const definition_names: string[] = []; + +export const build_dt_definitions = () => + gulp + .src(`${output_relative_dirname}/**/*`, { + base: output_relative_dirname, + }) + .pipe( + gulp_modify({ + fileModifier: (file: gulp_util.File, contents: string) => { + definition_names.push(file.relative); + if (file.path.endsWith('index.d.ts')) { + const dt_header = fs + .readFileSync(`${dt_dirname}/dt-header.txt`, 'utf8') + .trim(); + return `${dt_header}\n\n${contents}`; + } + return contents; + }, + }), + ) + .pipe( + gulp_prettier.format( + // DT style (https://github.com/Microsoft/dtslint/blob/master/dt.json) + { + bracketSpacing: true, + printWidth: 200, + tabWidth: 4, + trailingComma: 'all', + }, + { reporter: gulp_prettier.Reporter.None }, + ), + ) + .pipe(gulp.dest(dt_ramda_dirname)); + +export const build_dt_chores = () => + gulp + .src([`${dt_dirname}/tsconfig.json`, `${dt_dirname}/tslint.json`]) + .pipe( + gulp_modify({ + fileModifier: (file: gulp_util.File, contents: string) => { + if (file.path.endsWith('tsconfig.json')) { + const tsconfig = JSON.parse(contents); + tsconfig.files = [...definition_names, test_filename]; + return JSON.stringify(tsconfig, null, 4); + } + return contents; + }, + }), + ) + .pipe(gulp.dest(dt_ramda_dirname)); + +export const build_dt_tests = () => { + // TODO: transform tests to be DT compatible + fs.writeFileSync( + `${dt_ramda_dirname}/${test_filename}`, + `import * as R from 'ramda';\n`, + ); +}; diff --git a/tasks/utils/constants.ts b/tasks/utils/constants.ts index 9d9ac13..65cf40b 100644 --- a/tasks/utils/constants.ts +++ b/tasks/utils/constants.ts @@ -13,3 +13,6 @@ export const output_sub_dirname = 'src'; export const output_relative_dirname = `./ramda/dist${output_dirname_postfix}`; export const output_relative_sub_dirname = `${output_relative_dirname}/${output_sub_dirname}`; export const output_extname = '.d.ts'; + +export const dt_dirname = 'DefinitelyTyped'; +export const dt_ramda_dirname = `${dt_dirname}/types/ramda`; diff --git a/yarn.lock b/yarn.lock index 686b9bb..6f1c2fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,10 @@ # yarn lockfile v1 +"@types/babel-types@*": + version "6.25.1" + resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-6.25.1.tgz#ce8f126a4403e11e1b0033a424f11638afac7889" + "@types/chalk@*": version "0.4.31" resolved "https://registry.yarnpkg.com/@types/chalk/-/chalk-0.4.31.tgz#a31d74241a6b1edbb973cf36d97a2896834a51f9" @@ -44,7 +48,7 @@ dependencies: "@types/node" "*" -"@types/gulp-util@3.0.31": +"@types/gulp-util@3.0.31", "@types/gulp-util@^3.0.31": version "3.0.31" resolved "https://registry.yarnpkg.com/@types/gulp-util/-/gulp-util-3.0.31.tgz#272e298220365717e1f7f979b50ebadb44297cbf" dependencies: @@ -88,6 +92,12 @@ "@types/node" "*" "@types/q" "^0" +"@types/prettier@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.5.0.tgz#35ed47a24bd92bcab439c3670742219499a6b717" + dependencies: + "@types/babel-types" "*" + "@types/q@^0": version "0.0.36" resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.36.tgz#97d786389641bcbd0e22bfc729a534175976371d" @@ -103,7 +113,7 @@ "@types/gulp" "*" "@types/node" "*" -"@types/through2@*", "@types/through2@2.0.33": +"@types/through2@*", "@types/through2@2.0.33", "@types/through2@^2.0.33": version "2.0.33" resolved "https://registry.yarnpkg.com/@types/through2/-/through2-2.0.33.tgz#1ff2e88a100dfb5b140e7bb98791f1194400d131" dependencies: @@ -1250,11 +1260,27 @@ gulp-diff@1.0.0: gulp-util "^3.0.6" through2 "^2.0.0" +gulp-modify@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/gulp-modify/-/gulp-modify-0.1.1.tgz#4a99a0bb8b7769921c7b09618762ccc179da3675" + dependencies: + gulp-util "*" + through2 "*" + +gulp-plugin-prettier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulp-plugin-prettier/-/gulp-plugin-prettier-1.0.0.tgz#89f820419b3185389cb551a2fef30ac7f179e52a" + dependencies: + "@types/gulp-util" "^3.0.31" + "@types/through2" "^2.0.33" + gulp-util "^3.0.8" + through2 "^2.0.3" + gulp-rename@1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.2.2.tgz#3ad4428763f05e2764dec1c67d868db275687817" -gulp-util@3.0.8, gulp-util@^3.0.0, gulp-util@^3.0.6, gulp-util@^3.0.8: +gulp-util@*, gulp-util@3.0.8, gulp-util@^3.0.0, gulp-util@^3.0.6, gulp-util@^3.0.8: version "3.0.8" resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" dependencies: @@ -3052,7 +3078,7 @@ throat@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" -through2@2.0.3, through2@^2.0.0: +through2@*, through2@2.0.3, through2@^2.0.0, through2@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" dependencies: From d17a565903823738c473426caa52e84aa5c12931 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Tue, 15 Aug 2017 22:52:31 +0800 Subject: [PATCH 02/23] chore: fix linting --- tasks/build-dt.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/build-dt.ts b/tasks/build-dt.ts index e7dab01..f44e4a2 100644 --- a/tasks/build-dt.ts +++ b/tasks/build-dt.ts @@ -1,5 +1,4 @@ import * as fs from 'fs'; -import * as glob from 'glob'; import * as gulp from 'gulp'; import * as gulp_prettier from 'gulp-plugin-prettier'; import * as gulp_util from 'gulp-util'; From 0419dfd1e8b61a758fb8fdcf50a9daddef6f7bc2 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Wed, 16 Aug 2017 11:10:11 +0800 Subject: [PATCH 03/23] chore: exit code 1 if dt failed --- .travis.yml | 2 +- scripts/test-dt.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 09e96a4..85e6161 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ script: - yarn run test-utils -- --verbose --coverage - yarn run test -- --verbose - yarn run test-actual -- --verbose -u -- bash ./scripts/test-dt.sh +- yarn run test-dt after_success: - if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./scripts/deploy.sh; fi diff --git a/scripts/test-dt.sh b/scripts/test-dt.sh index ce4a0b8..f3b9762 100644 --- a/scripts/test-dt.sh +++ b/scripts/test-dt.sh @@ -5,6 +5,10 @@ yarn run build-dt cd ./DefinitelyTyped yarn -yarn run lint +yarn run lint || eval "DT_LINT_STATE=error" cd .. + +if [ "$DT_LINT_STATE" = "error" ]; then + exit 1; +fi From b5b2cabc373f2a6431b33bc03496f980fe108079 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Wed, 16 Aug 2017 15:36:49 +0800 Subject: [PATCH 04/23] chore(deps): update prettier to v1.6.0-dev (github) To get bug fixes for prettier/prettier#2534 --- package.json | 2 +- yarn.lock | 222 ++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 203 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index e8bcf1d..e95d2ed 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "gulp-rename": "1.2.2", "gulp-util": "3.0.8", "jest": "20.0.4", - "prettier": "1.5.3", + "prettier": "prettier/prettier#c198c33", "prettier-config-ikatyang": "1.1.1", "ramda": "0.24.1", "run-sequence": "2.1.0", diff --git a/yarn.lock b/yarn.lock index 6f1c2fa..e45ce2f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -85,6 +85,10 @@ version "8.0.20" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.20.tgz#65c7375255c24b184c215a5d0b63247c32f01c91" +"@types/node@^6.0.46": + version "6.0.86" + resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.86.tgz#ae0fff49f6fc13d7ddcd322362581c52e8755ff9" + "@types/orchestrator@*": version "0.3.0" resolved "https://registry.yarnpkg.com/@types/orchestrator/-/orchestrator-0.3.0.tgz#bf84a1699c9330d4fe89cd81263e8fc09fb32978" @@ -303,6 +307,14 @@ aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" +babel-code-frame@7.0.0-alpha.12: + version "7.0.0-alpha.12" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-7.0.0-alpha.12.tgz#26fbb2eab1c20763271fecb6b04a108756fae61f" + dependencies: + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" @@ -455,6 +467,10 @@ babel-types@^6.18.0, babel-types@^6.24.1, babel-types@^6.25.0: lodash "^4.2.0" to-fast-properties "^1.0.1" +babylon@7.0.0-beta.17: + version "7.0.0-beta.17" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.17.tgz#2aad4d6764f409dfb3ac216d855dc93d70d37911" + babylon@^6.17.2, babylon@^6.17.4: version "6.17.4" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a" @@ -543,6 +559,14 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" +chalk@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.0.1.tgz#dbec49436d2ae15f536114e76d14656cdbc0f44d" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -553,7 +577,7 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0: +chalk@^2.0.0, chalk@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" dependencies: @@ -656,6 +680,18 @@ core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cosmiconfig@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.1.0" + os-homedir "^1.0.1" + parse-json "^2.2.0" + require-from-string "^1.1.0" + cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -692,6 +728,10 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +dashify@0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/dashify/-/dashify-0.2.2.tgz#6a07415a01c91faf4a32e38d9dfba71f61cb20fe" + dateformat@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" @@ -753,6 +793,10 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" +diff@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" + diff@^2.0.2: version "2.2.3" resolved "https://registry.yarnpkg.com/diff/-/diff-2.2.3.tgz#60eafd0d28ee906e4e8ff0a52c1229521033bf99" @@ -881,14 +925,14 @@ estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" +esutils@2.0.2, esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + esutils@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - event-emitter@^0.3.4: version "0.3.5" resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" @@ -1056,6 +1100,14 @@ flagged-respawn@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5" +flatten@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" + +flow-parser@0.51.0: + version "0.51.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.51.0.tgz#e1c0ceb6f802ba21d16c2fda8e42c824f40f4684" + for-in@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -1114,7 +1166,7 @@ get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" -get-stream@^3.0.0: +get-stream@3.0.0, get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -1246,6 +1298,12 @@ graceful-fs@~1.2.0: version "1.2.3" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" +graphql@0.10.1: + version "0.10.1" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.10.1.tgz#75c93c2ce73aeb5bae2eefb555a8e9e39c36027d" + dependencies: + iterall "^1.1.0" + growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -1416,6 +1474,14 @@ iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" +ignore@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1476,6 +1542,10 @@ is-ci@^1.0.10: dependencies: ci-info "^1.0.0" +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" @@ -1679,6 +1749,10 @@ istanbul-reports@^1.1.1: dependencies: handlebars "^4.0.3" +iterall@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.1.1.tgz#f7f0af11e9a04ec6426260f5019d9fcca4d50214" + jest-changed-files@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" @@ -1875,7 +1949,7 @@ jest-util@^20.0.0, jest-util@^20.0.3: leven "^2.1.0" mkdirp "^0.5.1" -jest-validate@^20.0.3: +jest-validate@20.0.3, jest-validate@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" dependencies: @@ -1890,11 +1964,15 @@ jest@20.0.4: dependencies: jest-cli "^20.0.4" +js-base64@^2.1.9: + version "2.1.9" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" + js-tokens@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@^3.7.0: +js-yaml@^3.4.3, js-yaml@^3.7.0: version "3.9.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" dependencies: @@ -2150,6 +2228,10 @@ lodash.templatesettings@^3.0.0: lodash._reinterpolate "^3.0.0" lodash.escape "^3.0.0" +lodash.unescape@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" + lodash.upperfirst@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" @@ -2262,18 +2344,18 @@ mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" +minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + minimatch@^2.0.1: version "2.0.10" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" dependencies: brace-expansion "^1.0.0" -minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - minimatch@~0.2.11: version "0.2.14" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" @@ -2285,7 +2367,7 @@ minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: +minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -2506,6 +2588,12 @@ parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" +parse5@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.2.tgz#05eff57f0ef4577fb144a79f8b9a967a6cc44510" + dependencies: + "@types/node" "^6.0.46" + parse5@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" @@ -2594,6 +2682,55 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" +postcss-less@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-less/-/postcss-less-1.1.0.tgz#bdcc76be64c4324d873fbc5cd9fa2e799e4305fa" + dependencies: + postcss "^5.2.16" + +postcss-media-query-parser@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" + +postcss-scss@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-1.0.0.tgz#4957013097973dfd5bd9b1ad8a6dc13456a5d1ba" + dependencies: + postcss "^6.0.1" + +postcss-selector-parser@2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +"postcss-values-parser@git://github.com/shellscape/postcss-values-parser.git#5e351360479116f3fe309602cdd15b0a233bc29f": + version "1.2.2" + resolved "git://github.com/shellscape/postcss-values-parser.git#5e351360479116f3fe309602cdd15b0a233bc29f" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss@^5.2.16: + version "5.2.17" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +postcss@^6.0.1: + version "6.0.9" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.9.tgz#54819766784a51c65b1ec4d54c2f93765438c35a" + dependencies: + chalk "^2.1.0" + source-map "^0.5.6" + supports-color "^4.2.1" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -2606,9 +2743,35 @@ prettier-config-ikatyang@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/prettier-config-ikatyang/-/prettier-config-ikatyang-1.1.1.tgz#9ccab4bc2d441e4c68b58dbe8f1a4e18213c3f2d" -prettier@1.5.3: +prettier@prettier/prettier#c198c33: version "1.5.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.5.3.tgz#59dadc683345ec6b88f88b94ed4ae7e1da394bfe" + resolved "https://codeload.github.com/prettier/prettier/tar.gz/c198c33" + dependencies: + babel-code-frame "7.0.0-alpha.12" + babylon "7.0.0-beta.17" + chalk "2.0.1" + cosmiconfig "2.2.2" + dashify "0.2.2" + diff "3.2.0" + esutils "2.0.2" + flow-parser "0.51.0" + get-stream "3.0.0" + globby "^6.1.0" + graphql "0.10.1" + ignore "^3.3.3" + jest-validate "20.0.3" + minimatch "3.0.4" + minimist "1.2.0" + parse5 "3.0.2" + postcss "^6.0.1" + postcss-less "^1.0.0" + postcss-media-query-parser "0.2.3" + postcss-scss "1.0.0" + postcss-selector-parser "2.2.3" + postcss-values-parser "git://github.com/shellscape/postcss-values-parser.git#5e351360479116f3fe309602cdd15b0a233bc29f" + strip-bom "3.0.0" + typescript "2.5.0-dev.20170617" + typescript-eslint-parser "git://github.com/eslint/typescript-eslint-parser.git#e1db075b938bf74acfe16c6f3e63dc4dc12c0e58" pretty-format@^20.0.3: version "20.0.3" @@ -2786,7 +2949,7 @@ require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" -require-from-string@^1.2.1: +require-from-string@^1.1.0, require-from-string@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" @@ -2854,6 +3017,10 @@ sax@^1.2.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" +semver@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + semver@^4.1.0: version "4.3.6" resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" @@ -3048,13 +3215,13 @@ supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.1.2: +supports-color@^3.1.2, supports-color@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: has-flag "^1.0.0" -supports-color@^4.0.0: +supports-color@^4.0.0, supports-color@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836" dependencies: @@ -3272,10 +3439,21 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" +"typescript-eslint-parser@git://github.com/eslint/typescript-eslint-parser.git#e1db075b938bf74acfe16c6f3e63dc4dc12c0e58": + version "4.0.0" + resolved "git://github.com/eslint/typescript-eslint-parser.git#e1db075b938bf74acfe16c6f3e63dc4dc12c0e58" + dependencies: + lodash.unescape "4.0.1" + semver "5.3.0" + typescript@2.4.2, typescript@^2.4.0, typescript@~2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844" +typescript@2.5.0-dev.20170617: + version "2.5.0-dev.20170617" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.0-dev.20170617.tgz#5c72d3d4ea278f8db662f513c6911cd31378f024" + uglify-js@^2.6: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" @@ -3293,6 +3471,10 @@ unc-path-regex@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + unique-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" From e892f91891b9bd6ea9e586659d0f5fc3e28c0ff1 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Wed, 16 Aug 2017 15:49:31 +0800 Subject: [PATCH 05/23] Merge branch master into 'add-scripts-to-generate-dt-compatible' --- .travis.yml | 10 ++++++++++ package.json | 5 +++-- templates/clone.d.ts | 2 -- templates/concat.d.ts | 2 -- templates/lensIndex.d.ts | 2 +- templates/pluck.d.ts | 2 +- templates/prop.d.ts | 2 +- templates/propOr.d.ts | 2 +- templates/tslint.dts.json | 6 ++++++ yarn.lock | 26 ++++++++++++++++++++------ 10 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 templates/tslint.dts.json diff --git a/.travis.yml b/.travis.yml index 85e6161..016bcb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,15 @@ language: node_js node_js: - stable +before_install: +- yarn global add greenkeeper-lockfile@1 + +before_script: +- greenkeeper-lockfile-update + script: - yarn run lint +- yarn run lint-dts - yarn run build-check - yarn run remap-check - yarn run test-utils -- --verbose --coverage @@ -15,6 +22,9 @@ script: after_success: - if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./scripts/deploy.sh; fi +after_script: +- greenkeeper-lockfile-upload + cache: yarn: true directories: diff --git a/package.json b/package.json index e95d2ed..69957e8 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "scripts": { "prepublish": "yarn run build", "lint": "tslint --project ./tsconfig.json", + "lint-dts": "tslint -c ./templates/tslint.dts.json \"templates/**/*.d.ts\"", "test": "jest --config ./jest.json", "test-actual": "jest --config ./jest.actual.json", "test-utils": "jest --config ./jest.utils.json", @@ -28,7 +29,7 @@ }, "devDependencies": { "@types/del": "3.0.0", - "@types/glob": "5.0.30", + "@types/glob": "5.0.31", "@types/gulp": "3.8.33", "@types/gulp-diff": "1.0.0", "@types/gulp-rename": "0.0.32", @@ -62,7 +63,7 @@ "tslint": "5.6.0", "tslint-config-ikatyang": "2.2.0", "tslint-config-prettier-ext": "1.5.0", - "tslint-plugin-prettier": "1.0.0", + "tslint-plugin-prettier": "1.1.0", "typescript": "2.4.2", "yargs": "8.0.2" } diff --git a/templates/clone.d.ts b/templates/clone.d.ts index 49f7e19..2c7c123 100644 --- a/templates/clone.d.ts +++ b/templates/clone.d.ts @@ -1,3 +1 @@ -import { List } from './$types'; - export function $(value: T): T; diff --git a/templates/concat.d.ts b/templates/concat.d.ts index c2c3d2c..a94fc74 100644 --- a/templates/concat.d.ts +++ b/templates/concat.d.ts @@ -1,5 +1,3 @@ -import { List } from './$types'; - export function $string(a: string, b: string): string; export function $list(a: T[], b: U[]): (T | U)[]; export function $mixed( diff --git a/templates/lensIndex.d.ts b/templates/lensIndex.d.ts index 7a9125e..408080f 100644 --- a/templates/lensIndex.d.ts +++ b/templates/lensIndex.d.ts @@ -1,3 +1,3 @@ -import { List, PseudoLens } from './$types'; +import { PseudoLens } from './$types'; export function $(index: N): PseudoLens; diff --git a/templates/pluck.d.ts b/templates/pluck.d.ts index f7dcf15..f0b7ec7 100644 --- a/templates/pluck.d.ts +++ b/templates/pluck.d.ts @@ -1,4 +1,4 @@ -import { Functor, List, Property } from './$types'; +import { List, Property } from './$types'; export function $list(index: number, list: List>): U[]; export function $keyof(key: K, list: List): T[K][]; diff --git a/templates/prop.d.ts b/templates/prop.d.ts index 0bd21f8..c945829 100644 --- a/templates/prop.d.ts +++ b/templates/prop.d.ts @@ -1,4 +1,4 @@ -import { List, Property } from './$types'; +import { Property } from './$types'; export function $keyof( key: K, diff --git a/templates/propOr.d.ts b/templates/propOr.d.ts index 6d9051b..efe49c5 100644 --- a/templates/propOr.d.ts +++ b/templates/propOr.d.ts @@ -1,4 +1,4 @@ -import { List, Property } from './$types'; +import { Property } from './$types'; export function $keyof( defaults: D, diff --git a/templates/tslint.dts.json b/templates/tslint.dts.json new file mode 100644 index 0000000..06d7c2c --- /dev/null +++ b/templates/tslint.dts.json @@ -0,0 +1,6 @@ +{ + "extends": "./tslint.json", + "rules": { + "naming-convention": false + } +} diff --git a/yarn.lock b/yarn.lock index e45ce2f..d15e13c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -29,13 +29,20 @@ "@types/glob" "*" "@types/node" "*" -"@types/glob@*", "@types/glob@5.0.30": +"@types/glob@*": version "5.0.30" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.30.tgz#1026409c5625a8689074602808d082b2867b8a51" dependencies: "@types/minimatch" "*" "@types/node" "*" +"@types/glob@5.0.31": + version "5.0.31" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.31.tgz#6cb8500bd170750c1948f785cc5828e9cff0c36a" + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + "@types/gulp-diff@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/gulp-diff/-/gulp-diff-1.0.0.tgz#6ed98a61d11693e4acbce88d4f011701d3fc8010" @@ -913,6 +920,13 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.2.0" +eslint-plugin-prettier@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.2.0.tgz#f2837ad063903d73c621e7188fb3d41486434088" + dependencies: + fast-diff "^1.1.1" + jest-docblock "^20.0.1" + esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -1816,7 +1830,7 @@ jest-diff@^20.0.3: jest-matcher-utils "^20.0.3" pretty-format "^20.0.3" -jest-docblock@^20.0.3: +jest-docblock@^20.0.1, jest-docblock@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712" @@ -3391,11 +3405,11 @@ tslint-plugin-ikatyang@~1.0.0: tslib "^1.7.1" tsutils "^2.8.0" -tslint-plugin-prettier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tslint-plugin-prettier/-/tslint-plugin-prettier-1.0.0.tgz#2138ec2a65de883d19b95247430771cdfcbff8de" +tslint-plugin-prettier@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/tslint-plugin-prettier/-/tslint-plugin-prettier-1.1.0.tgz#05e84d2b6716d6d9ae62017533b612f9ed7a1085" dependencies: - fast-diff "^1.1.1" + eslint-plugin-prettier "^2.2.0" tslib "^1.7.1" tslint@5.6.0: From f6a9149cb591dbef0a56d7fd256378bb6e2716b9 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Wed, 16 Aug 2017 20:07:13 +0800 Subject: [PATCH 06/23] chore(tslint): disable ban-types rule for DT --- DefinitelyTyped/tslint.json | 1 + 1 file changed, 1 insertion(+) diff --git a/DefinitelyTyped/tslint.json b/DefinitelyTyped/tslint.json index b889559..a482562 100644 --- a/DefinitelyTyped/tslint.json +++ b/DefinitelyTyped/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { + "ban-types": false, "callable-types": false, "interface-over-type-literal": false } From 05765a552eef90a9056984d42629f66212847205 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Wed, 16 Aug 2017 20:18:19 +0800 Subject: [PATCH 07/23] Merge branch master into 'add-scripts-to-generate-dt-compatible' --- package.json | 2 +- templates/F.r.ts | 2 +- templates/T.r.ts | 2 +- templates/adjust.d.ts | 2 +- templates/ap.d.ts | 2 +- templates/append.d.ts | 2 +- templates/concat.d.ts | 4 ++-- templates/insert.d.ts | 2 +- templates/insertAll.d.ts | 2 +- templates/intersperse.d.ts | 2 +- templates/juxt.d.ts | 2 +- templates/pluck.d.ts | 7 +++++-- templates/prepend.d.ts | 2 +- templates/project.d.ts | 4 ++-- templates/props.d.ts | 4 ++-- templates/sortWith.d.ts | 2 +- templates/toPairs.d.ts | 2 +- templates/toPairsIn.d.ts | 2 +- templates/tslint.json | 4 +++- templates/update.d.ts | 2 +- templates/values.d.ts | 2 +- templates/valuesIn.d.ts | 2 +- templates/xprod.d.ts | 2 +- templates/zip.d.ts | 2 +- 24 files changed, 33 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index 69957e8..8408c3e 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "scripts": { "prepublish": "yarn run build", "lint": "tslint --project ./tsconfig.json", - "lint-dts": "tslint -c ./templates/tslint.dts.json \"templates/**/*.d.ts\"", + "lint-dts": "tslint -c ./templates/tslint.json \"templates/**/*.d.ts\"", "test": "jest --config ./jest.json", "test-actual": "jest --config ./jest.actual.json", "test-utils": "jest --config ./jest.utils.json", diff --git a/templates/F.r.ts b/templates/F.r.ts index 0dd5af5..015e284 100644 --- a/templates/F.r.ts +++ b/templates/F.r.ts @@ -1 +1 @@ -declare const F: () => false; +declare function F(): false diff --git a/templates/T.r.ts b/templates/T.r.ts index 5ef05ef..57119c9 100644 --- a/templates/T.r.ts +++ b/templates/T.r.ts @@ -1 +1 @@ -declare const T: () => true; +declare function T(): true diff --git a/templates/adjust.d.ts b/templates/adjust.d.ts index 7662bf7..122ce61 100644 --- a/templates/adjust.d.ts +++ b/templates/adjust.d.ts @@ -4,4 +4,4 @@ export function $( fn: Morphism, index: number, list: List, -): (T | U)[]; +): Array; diff --git a/templates/ap.d.ts b/templates/ap.d.ts index 2fe87ec..a814c23 100644 --- a/templates/ap.d.ts +++ b/templates/ap.d.ts @@ -1,3 +1,3 @@ import { List, Morphism } from './$types'; -export function $(fns: Morphism[], list: List): U[]; +export function $(fns: Array>, list: List): U[]; diff --git a/templates/append.d.ts b/templates/append.d.ts index d1fbfa9..8202db6 100644 --- a/templates/append.d.ts +++ b/templates/append.d.ts @@ -1,3 +1,3 @@ import { List } from './$types'; -export function $(value: T, list: List): (T | U)[]; +export function $(value: T, list: List): Array; diff --git a/templates/concat.d.ts b/templates/concat.d.ts index a94fc74..d134ff5 100644 --- a/templates/concat.d.ts +++ b/templates/concat.d.ts @@ -1,6 +1,6 @@ export function $string(a: string, b: string): string; -export function $list(a: T[], b: U[]): (T | U)[]; +export function $list(a: T[], b: U[]): Array; export function $mixed( a: T[] | string, b: U[] | string, -): (T | U)[] | string; +): Array | string; diff --git a/templates/insert.d.ts b/templates/insert.d.ts index 924aa57..da14add 100644 --- a/templates/insert.d.ts +++ b/templates/insert.d.ts @@ -1,3 +1,3 @@ import { List } from './$types'; -export function $(index: number, value: T, list: List): (T | U)[]; +export function $(index: number, value: T, list: List): Array; diff --git a/templates/insertAll.d.ts b/templates/insertAll.d.ts index 48ba6f4..dc7ebcf 100644 --- a/templates/insertAll.d.ts +++ b/templates/insertAll.d.ts @@ -4,4 +4,4 @@ export function $( index: number, values: List, list: List, -): (T | U)[]; +): Array; diff --git a/templates/intersperse.d.ts b/templates/intersperse.d.ts index 921d420..21f32fc 100644 --- a/templates/intersperse.d.ts +++ b/templates/intersperse.d.ts @@ -1,3 +1,3 @@ import { List } from './$types'; -export function $(separator: T, list: List): (T | U)[]; +export function $(separator: T, list: List): Array; diff --git a/templates/juxt.d.ts b/templates/juxt.d.ts index 1595fe6..4385474 100644 --- a/templates/juxt.d.ts +++ b/templates/juxt.d.ts @@ -1,3 +1,3 @@ import { TypedVariadic } from './$types'; -export function $(fns: TypedVariadic[]): TypedVariadic; +export function $(fns: Array>): TypedVariadic; diff --git a/templates/pluck.d.ts b/templates/pluck.d.ts index f0b7ec7..f93e822 100644 --- a/templates/pluck.d.ts +++ b/templates/pluck.d.ts @@ -1,9 +1,12 @@ import { List, Property } from './$types'; export function $list(index: number, list: List>): U[]; -export function $keyof(key: K, list: List): T[K][]; +export function $keyof( + key: K, + list: List, +): Array; export function $record>( key: K, list: List, -): T[K][]; +): Array; export function $general(key: Property, list: List): any[]; diff --git a/templates/prepend.d.ts b/templates/prepend.d.ts index d1fbfa9..8202db6 100644 --- a/templates/prepend.d.ts +++ b/templates/prepend.d.ts @@ -1,3 +1,3 @@ import { List } from './$types'; -export function $(value: T, list: List): (T | U)[]; +export function $(value: T, list: List): Array; diff --git a/templates/project.d.ts b/templates/project.d.ts index 4d4f836..8cf0e92 100644 --- a/templates/project.d.ts +++ b/templates/project.d.ts @@ -3,9 +3,9 @@ import { List, Property } from './$types'; export function $keyof( keys: List, list: List, -): Pick[]; +): Array>; export function $record>( keys: List, list: List, -): Pick[]; +): Array>; export function $general(keys: Property[], object: List): any[]; diff --git a/templates/props.d.ts b/templates/props.d.ts index 1328058..4cef8c1 100644 --- a/templates/props.d.ts +++ b/templates/props.d.ts @@ -3,9 +3,9 @@ import { List, Property } from './$types'; export function $keyof( keys: List, object: T, -): T[K][]; +): Array; export function $record>( keys: List, object: T, -): T[K][]; +): Array; export function $general(keys: Property[], object: {}): any[]; diff --git a/templates/sortWith.d.ts b/templates/sortWith.d.ts index fa19a97..bff4dd9 100644 --- a/templates/sortWith.d.ts +++ b/templates/sortWith.d.ts @@ -1,3 +1,3 @@ import { Comparator, List } from './$types'; -export function $(fns: Comparator[], list: List): T[]; +export function $(fns: Array>, list: List): T[]; diff --git a/templates/toPairs.d.ts b/templates/toPairs.d.ts index 30bd36c..db4b25c 100644 --- a/templates/toPairs.d.ts +++ b/templates/toPairs.d.ts @@ -1 +1 @@ -export function $(object: T): [keyof T, T[keyof T]][]; +export function $(object: T): Array<[keyof T, T[keyof T]]>; diff --git a/templates/toPairsIn.d.ts b/templates/toPairsIn.d.ts index 30bd36c..db4b25c 100644 --- a/templates/toPairsIn.d.ts +++ b/templates/toPairsIn.d.ts @@ -1 +1 @@ -export function $(object: T): [keyof T, T[keyof T]][]; +export function $(object: T): Array<[keyof T, T[keyof T]]>; diff --git a/templates/tslint.json b/templates/tslint.json index 9b7e08d..53b91ac 100644 --- a/templates/tslint.json +++ b/templates/tslint.json @@ -10,6 +10,8 @@ "allowPrefixes": ["$"], "allowSuffixes": [".c", ".r"] } - ] + ], + "array-type": [true, "array-simple"], + "naming-convention": false } } diff --git a/templates/update.d.ts b/templates/update.d.ts index 924aa57..da14add 100644 --- a/templates/update.d.ts +++ b/templates/update.d.ts @@ -1,3 +1,3 @@ import { List } from './$types'; -export function $(index: number, value: T, list: List): (T | U)[]; +export function $(index: number, value: T, list: List): Array; diff --git a/templates/values.d.ts b/templates/values.d.ts index a511396..6fa9d95 100644 --- a/templates/values.d.ts +++ b/templates/values.d.ts @@ -1 +1 @@ -export function $(value: T): T[keyof T][]; +export function $(value: T): Array; diff --git a/templates/valuesIn.d.ts b/templates/valuesIn.d.ts index a511396..6fa9d95 100644 --- a/templates/valuesIn.d.ts +++ b/templates/valuesIn.d.ts @@ -1 +1 @@ -export function $(value: T): T[keyof T][]; +export function $(value: T): Array; diff --git a/templates/xprod.d.ts b/templates/xprod.d.ts index cf06d30..51ea9c2 100644 --- a/templates/xprod.d.ts +++ b/templates/xprod.d.ts @@ -1,3 +1,3 @@ import { List } from './$types'; -export function $(a: List, b: List): [T, U][]; +export function $(a: List, b: List): Array<[T, U]>; diff --git a/templates/zip.d.ts b/templates/zip.d.ts index cf06d30..51ea9c2 100644 --- a/templates/zip.d.ts +++ b/templates/zip.d.ts @@ -1,3 +1,3 @@ import { List } from './$types'; -export function $(a: List, b: List): [T, U][]; +export function $(a: List, b: List): Array<[T, U]>; From 31031cca78ffe7ca695be7dabfabae1762a906a4 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Wed, 16 Aug 2017 22:58:24 +0800 Subject: [PATCH 08/23] refactor: fix linting --- templates/F.r.ts | 2 +- templates/T.r.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/F.r.ts b/templates/F.r.ts index 015e284..37d4231 100644 --- a/templates/F.r.ts +++ b/templates/F.r.ts @@ -1 +1 @@ -declare function F(): false +declare function F(): false; diff --git a/templates/T.r.ts b/templates/T.r.ts index 57119c9..a36a93c 100644 --- a/templates/T.r.ts +++ b/templates/T.r.ts @@ -1 +1 @@ -declare function T(): true +declare function T(): true; From 8b30c59db87b34382ad49baf5556a3333b69fe91 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Thu, 17 Aug 2017 11:26:19 +0800 Subject: [PATCH 09/23] Merge branch master into 'add-scripts-to-generate-dt-compatible' --- package.json | 2 +- tasks/mixins/path.d.ts | 12 ++++++------ tasks/mixins/tslint.json | 3 +++ templates/$types.d.ts | 6 +++--- templates/call.r.ts | 2 +- templates/cond.c.ts | 7 ++++--- yarn.lock | 10 +++++++--- 7 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 tasks/mixins/tslint.json diff --git a/package.json b/package.json index 8408c3e..4b34f09 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@types/gulp-rename": "0.0.32", "@types/gulp-util": "3.0.31", "@types/jest": "20.0.6", - "@types/node": "8.0.20", + "@types/node": "8.0.23", "@types/prettier": "1.5.0", "@types/ramda": "ikatyang/types-ramda#v0.24.1-dist", "@types/run-sequence": "0.0.29", diff --git a/tasks/mixins/path.d.ts b/tasks/mixins/path.d.ts index 02e1515..0019119 100644 --- a/tasks/mixins/path.d.ts +++ b/tasks/mixins/path.d.ts @@ -1,4 +1,4 @@ -// tslint:disable:prettier naming-convention +// tslint:disable:prettier // in-based declare function path(path: [T1, T2], obj: {[K1 in T1]: {[K2 in T2]: TResult}}): TResult; @@ -24,13 +24,13 @@ declare function path(path: [T1, T2], obj: {[K1 in T1]: {[K2 in T2]: TResult}}): TResult; declare function path(path: [T1, T2], obj: {[K1 in T1]: TResult[]}): TResult; -declare function path(path: [T1, T2], obj: {[K2 in T2]: TResult}[]): TResult; +declare function path(path: [T1, T2], obj: Array<{[K2 in T2]: TResult}>): TResult; declare function path(path: [T1, T2], obj: TResult[][]): TResult; declare function path(path: [T1, T2, T3], obj: {[K1 in T1]: {[K2 in T2]: {[K3 in T3]: TResult}}}): TResult; declare function path(path: [T1, T2, T3], obj: {[K1 in T1]: {[K2 in T2]: TResult[]}}): TResult; -declare function path(path: [T1, T2, T3], obj: {[K1 in T1]: {[K3 in T3]: TResult}[]}): TResult; +declare function path(path: [T1, T2, T3], obj: {[K1 in T1]: Array<{[K3 in T3]: TResult}>}): TResult; declare function path(path: [T1, T2, T3], obj: {[K1 in T1]: TResult[][]}): TResult; -declare function path(path: [T1, T2, T3], obj: {[K2 in T2]: {[K3 in T3]: TResult}}[]): TResult; -declare function path(path: [T1, T2, T3], obj: {[K2 in T2]: TResult[]}[]): TResult; -declare function path(path: [T1, T2, T3], obj: {[K3 in T3]: TResult}[][]): TResult; +declare function path(path: [T1, T2, T3], obj: Array<{[K2 in T2]: {[K3 in T3]: TResult}}>): TResult; +declare function path(path: [T1, T2, T3], obj: Array<{[K2 in T2]: TResult[]}>): TResult; +declare function path(path: [T1, T2, T3], obj: Array>): TResult; declare function path(path: [T1, T2, T3], obj: TResult[][][]): TResult; diff --git a/tasks/mixins/tslint.json b/tasks/mixins/tslint.json new file mode 100644 index 0000000..e164565 --- /dev/null +++ b/tasks/mixins/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../../templates/tslint.json" +} diff --git a/templates/$types.d.ts b/templates/$types.d.ts index c735b08..0e7f11b 100644 --- a/templates/$types.d.ts +++ b/templates/$types.d.ts @@ -76,9 +76,9 @@ export interface PseudoLens { export interface Transformer { // https://github.com/cognitect-labs/transducers-js#transformer-protocol - '@@transducer/init': () => U; - '@@transducer/step': (accumulator: U, value: T) => U; - '@@transducer/result': (accumulator: U) => R; + '@@transducer/init'(): U; + '@@transducer/step'(accumulator: U, value: T): U; + '@@transducer/result'(accumulator: U): R; } export interface Reduced { diff --git a/templates/call.r.ts b/templates/call.r.ts index 3cbe8f3..51e3d99 100644 --- a/templates/call.r.ts +++ b/templates/call.r.ts @@ -1,4 +1,4 @@ import { Variadic } from './$types'; // tslint:disable-next-line:no-unused no-unused-variable -declare const call: (fn: Variadic, ...args: any[]) => T; +declare function call(fn: Variadic, ...args: any[]): T diff --git a/templates/cond.c.ts b/templates/cond.c.ts index d8d637f..5a5bded 100644 --- a/templates/cond.c.ts +++ b/templates/cond.c.ts @@ -6,9 +6,10 @@ export default create_n_ary_declarations( max_curry_level, args => ` function $${args.curry_level}arity<${args.generics.join(',')}>( - fns: [(${args.parameters.join(',')}) => boolean, (${args.parameters.join( - ',', - )}) => ${args.return_type}][] + fns: Array<[ + (${args.parameters.join(',')}) => boolean, + (${args.parameters.join(',')}) => ${args.return_type} + ]> ): (${args.parameters.join(',')}) => ${args.return_type}; `, ); diff --git a/yarn.lock b/yarn.lock index d15e13c..9d4645b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -88,13 +88,17 @@ version "2.0.29" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a" -"@types/node@*", "@types/node@8.0.20": +"@types/node@*": version "8.0.20" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.20.tgz#65c7375255c24b184c215a5d0b63247c32f01c91" +"@types/node@8.0.23": + version "8.0.23" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.23.tgz#c746697004782346594a0d755c34425bbf3014d2" + "@types/node@^6.0.46": - version "6.0.86" - resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.86.tgz#ae0fff49f6fc13d7ddcd322362581c52e8755ff9" + version "6.0.87" + resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.87.tgz#5ab5774f8351a33a935099fa6be850aa0b0ad564" "@types/orchestrator@*": version "0.3.0" From 18614456c0cbba5f6320d444a2a357d9a9797e29 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Thu, 17 Aug 2017 11:29:56 +0800 Subject: [PATCH 10/23] refactor: fix linting --- templates/call.r.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/call.r.ts b/templates/call.r.ts index 51e3d99..66bc4fc 100644 --- a/templates/call.r.ts +++ b/templates/call.r.ts @@ -1,4 +1,4 @@ import { Variadic } from './$types'; // tslint:disable-next-line:no-unused no-unused-variable -declare function call(fn: Variadic, ...args: any[]): T +declare function call(fn: Variadic, ...args: any[]): T; From 646bc898eb0acfbab95faef62b15d4e68d1eea00 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Thu, 17 Aug 2017 16:11:50 +0800 Subject: [PATCH 11/23] chore: add scripts to generate dt compatible test file --- DefinitelyTyped/tsconfig.json | 4 ++-- tasks/build-dt.ts | 44 ++++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/DefinitelyTyped/tsconfig.json b/DefinitelyTyped/tsconfig.json index fb9c330..0f57f25 100644 --- a/DefinitelyTyped/tsconfig.json +++ b/DefinitelyTyped/tsconfig.json @@ -3,8 +3,8 @@ "module": "commonjs", "lib": ["es6"], "noImplicitAny": true, - "noImplicitThis": false, - "strictNullChecks": false, + "noImplicitThis": true, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": ["../"], "types": [], diff --git a/tasks/build-dt.ts b/tasks/build-dt.ts index f44e4a2..2e5fa58 100644 --- a/tasks/build-dt.ts +++ b/tasks/build-dt.ts @@ -2,6 +2,8 @@ import * as fs from 'fs'; import * as gulp from 'gulp'; import * as gulp_prettier from 'gulp-plugin-prettier'; import * as gulp_util from 'gulp-util'; +import * as prettier from 'prettier'; +import * as tslint from 'tslint'; import { dt_dirname, dt_ramda_dirname, @@ -15,6 +17,15 @@ const test_filename = 'ramda-tests.ts'; const definition_names: string[] = []; +// DT style (https://github.com/Microsoft/dtslint/blob/master/dt.json) +const prettier_options: prettier.Options = { + bracketSpacing: true, + printWidth: 120, // original 200, decreased due to trailing comments + tabWidth: 4, + trailingComma: 'all', + parser: 'typescript', +}; + export const build_dt_definitions = () => gulp .src(`${output_relative_dirname}/**/*`, { @@ -35,16 +46,9 @@ export const build_dt_definitions = () => }), ) .pipe( - gulp_prettier.format( - // DT style (https://github.com/Microsoft/dtslint/blob/master/dt.json) - { - bracketSpacing: true, - printWidth: 200, - tabWidth: 4, - trailingComma: 'all', - }, - { reporter: gulp_prettier.Reporter.None }, - ), + gulp_prettier.format(prettier_options, { + reporter: gulp_prettier.Reporter.None, + }), ) .pipe(gulp.dest(dt_ramda_dirname)); @@ -66,9 +70,21 @@ export const build_dt_chores = () => .pipe(gulp.dest(dt_ramda_dirname)); export const build_dt_tests = () => { - // TODO: transform tests to be DT compatible - fs.writeFileSync( - `${dt_ramda_dirname}/${test_filename}`, - `import * as R from 'ramda';\n`, + const linter = new tslint.Linter({ fix: true }); + + const snapshot_filename = `snapshots/${test_filename}`; + const output_filename = `${dt_ramda_dirname}/${test_filename}`; + + linter.lint( + output_filename, + prettier.format( + fs + .readFileSync(snapshot_filename, 'utf8') + .replace(`'../ramda/dist/index'`, `'ramda'`) + .replace(/\/\/ @dts-jest:fail ->.+/g, '// $ExpectError') + .replace(/\/\/ @dts-jest:pass ->/g, '// $ExpectType'), + prettier_options, + ), + tslint.Linter.findConfiguration(null, output_filename).results, ); }; From 761ef7de1e6cfcf576dc02a30fa8c72d59e55f94 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Thu, 17 Aug 2017 16:20:55 +0800 Subject: [PATCH 12/23] chore: install dtslint before build-dt --- scripts/test-dt.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/test-dt.sh b/scripts/test-dt.sh index f3b9762..1857cac 100644 --- a/scripts/test-dt.sh +++ b/scripts/test-dt.sh @@ -1,12 +1,13 @@ #!/bin/bash +cd ./DefinitelyTyped +yarn +cd .. + yarn run build-dt cd ./DefinitelyTyped - -yarn yarn run lint || eval "DT_LINT_STATE=error" - cd .. if [ "$DT_LINT_STATE" = "error" ]; then From 456c1b66ed4fa4dde5bd5ab9327298e67824ff08 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Thu, 17 Aug 2017 16:36:39 +0800 Subject: [PATCH 13/23] chore: update TS version in DT to v2.4 --- DefinitelyTyped/dt-header.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DefinitelyTyped/dt-header.txt b/DefinitelyTyped/dt-header.txt index a8579bf..0b8dbee 100644 --- a/DefinitelyTyped/dt-header.txt +++ b/DefinitelyTyped/dt-header.txt @@ -10,4 +10,4 @@ // Jordan Quagliatini // Simon Højberg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.4 From 44eea4ea8ec23fb4594905bca87cc71275d92436 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Fri, 18 Aug 2017 15:09:53 +0800 Subject: [PATCH 14/23] Merge branch master into 'add-scripts-to-generate-dt-compatible' --- package.json | 4 ++-- yarn.lock | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 4b34f09..fbae661 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@types/gulp-rename": "0.0.32", "@types/gulp-util": "3.0.31", "@types/jest": "20.0.6", - "@types/node": "8.0.23", + "@types/node": "8.0.24", "@types/prettier": "1.5.0", "@types/ramda": "ikatyang/types-ramda#v0.24.1-dist", "@types/run-sequence": "0.0.29", @@ -43,7 +43,7 @@ "@types/yargs": "8.0.2", "del": "3.0.0", "dts-element": "2.2.1", - "dts-element-fp": "1.0.2", + "dts-element-fp": "1.1.0", "dts-jest": "20.5.1", "glob": "7.1.2", "gulp": "3.9.1", diff --git a/yarn.lock b/yarn.lock index 9d4645b..48db30d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -92,9 +92,9 @@ version "8.0.20" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.20.tgz#65c7375255c24b184c215a5d0b63247c32f01c91" -"@types/node@8.0.23": - version "8.0.23" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.23.tgz#c746697004782346594a0d755c34425bbf3014d2" +"@types/node@8.0.24": + version "8.0.24" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.24.tgz#06c580084d9add1fb40c1510ef0b448961246fb1" "@types/node@^6.0.46": version "6.0.87" @@ -823,9 +823,9 @@ doctrine@^0.7.2: esutils "^1.1.6" isarray "0.0.1" -dts-element-fp@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/dts-element-fp/-/dts-element-fp-1.0.2.tgz#0ec25671032557ecfe90bd56e5dd3e063c876436" +dts-element-fp@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/dts-element-fp/-/dts-element-fp-1.1.0.tgz#805f2adc88add9d0121933cf33f8d73fc100996b" dependencies: ramda "^0.24.1" From 5e5f97e3063e4b6d5d0bf3e09969eb8cbe0c269f Mon Sep 17 00:00:00 2001 From: ikatyang Date: Fri, 18 Aug 2017 15:12:19 +0800 Subject: [PATCH 15/23] chore: enable inline_return_type --- tasks/utils/generate-file-content.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/utils/generate-file-content.ts b/tasks/utils/generate-file-content.ts index 263a197..3b0aeec 100644 --- a/tasks/utils/generate-file-content.ts +++ b/tasks/utils/generate-file-content.ts @@ -179,6 +179,7 @@ function get_top_level_members(filename: string): dts.ITopLevelMember[] { { selectable, placeholder, + inline_return_type: true, }, ); From 064165290e179089e374653be560dea778b76641 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Fri, 18 Aug 2017 20:28:56 +0800 Subject: [PATCH 16/23] Merge branch master into 'add-scripts-to-generate-dt-compatible' --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index fbae661..4defefc 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@types/yargs": "8.0.2", "del": "3.0.0", "dts-element": "2.2.1", - "dts-element-fp": "1.1.0", + "dts-element-fp": "1.1.1", "dts-jest": "20.5.1", "glob": "7.1.2", "gulp": "3.9.1", diff --git a/yarn.lock b/yarn.lock index 48db30d..994957f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -823,9 +823,9 @@ doctrine@^0.7.2: esutils "^1.1.6" isarray "0.0.1" -dts-element-fp@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/dts-element-fp/-/dts-element-fp-1.1.0.tgz#805f2adc88add9d0121933cf33f8d73fc100996b" +dts-element-fp@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/dts-element-fp/-/dts-element-fp-1.1.1.tgz#73cedcb9b2982fec57276b028f815e9bfc64aba3" dependencies: ramda "^0.24.1" From ab58d5f41342bc2d02e263649f58b141ab48f83d Mon Sep 17 00:00:00 2001 From: ikatyang Date: Fri, 18 Aug 2017 22:12:04 +0800 Subject: [PATCH 17/23] Merge branch master into 'add-scripts-to-generate-dt-compatible' --- package.json | 2 +- yarn.lock | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4defefc..1d4c8f1 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "del": "3.0.0", "dts-element": "2.2.1", "dts-element-fp": "1.1.1", - "dts-jest": "20.5.1", + "dts-jest": "21.0.0", "glob": "7.1.2", "gulp": "3.9.1", "gulp-diff": "1.0.0", diff --git a/yarn.lock b/yarn.lock index 994957f..ac85510 100644 --- a/yarn.lock +++ b/yarn.lock @@ -835,14 +835,13 @@ dts-element@2.2.1: dependencies: typescript "~2.4.1" -dts-jest@20.5.1: - version "20.5.1" - resolved "https://registry.yarnpkg.com/dts-jest/-/dts-jest-20.5.1.tgz#deeb39da318f40d5ed20031baa91718438047e3d" +dts-jest@21.0.0: + version "21.0.0" + resolved "https://registry.yarnpkg.com/dts-jest/-/dts-jest-21.0.0.tgz#3d402f6e58f94e01f26a6f695a5d7a017b771fe5" dependencies: require-from-string "^1.2.1" ts-comment "^1.0.1" tsconfig-extends "^1.0.1" - typescript "^2.4.0" duplexer2@0.0.2: version "0.0.2" From 64ba17365917d1fb3a810a0926b4e7989ab4231f Mon Sep 17 00:00:00 2001 From: ikatyang Date: Mon, 4 Sep 2017 17:52:31 +0800 Subject: [PATCH 18/23] chore: fix merge conflict --- package.json | 19 +- yarn.lock | 612 +++++++++++++++++---------------------------------- 2 files changed, 203 insertions(+), 428 deletions(-) diff --git a/package.json b/package.json index cfdf9c4..7c15142 100644 --- a/package.json +++ b/package.json @@ -39,41 +39,24 @@ "del": "3.0.0", "dts-element": "2.2.1", "dts-element-fp": "1.1.1", -<<<<<<< HEAD - "dts-jest": "21.0.0", + "dts-jest": "22.0.1", "glob": "7.1.2", "gulp": "3.9.1", - "gulp-diff": "1.0.0", "gulp-modify": "0.1.1", "gulp-plugin-prettier": "1.0.0", "gulp-rename": "1.2.2", "gulp-util": "3.0.8", "jest": "20.0.4", - "prettier": "prettier/prettier#c198c33", -======= - "dts-jest": "22.0.1", - "glob": "7.1.2", - "gulp": "3.9.1", - "gulp-rename": "1.2.2", - "gulp-util": "3.0.8", - "jest": "20.0.4", "prettier": "1.6.1", ->>>>>>> master "prettier-config-ikatyang": "1.1.1", "ramda": "0.24.1", "run-sequence": "2.1.0", "through2": "2.0.3", "ts-jest": "20.0.14", "ts-node": "3.3.0", -<<<<<<< HEAD - "tslint": "5.6.0", - "tslint-config-ikatyang": "2.2.0", - "tslint-config-prettier-ext": "1.5.0", -======= "tslint": "5.7.0", "tslint-config-ikatyang": "2.3.0", "tslint-config-prettier": "1.5.0", ->>>>>>> master "tslint-plugin-prettier": "1.1.0", "typescript": "2.4.2", "yargs": "8.0.2" diff --git a/yarn.lock b/yarn.lock index 83eb6fd..813580b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,48 +10,32 @@ version "0.4.31" resolved "https://registry.yarnpkg.com/@types/chalk/-/chalk-0.4.31.tgz#a31d74241a6b1edbb973cf36d97a2896834a51f9" +"@types/chokidar@*": + version "1.7.2" + resolved "https://registry.yarnpkg.com/@types/chokidar/-/chokidar-1.7.2.tgz#7c6da2d5bd6a47c9bce0f09b904a30770581f605" + dependencies: + "@types/node" "*" + "@types/del@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/del/-/del-3.0.0.tgz#1c8cd8b6e38da3b572352ca8eaf5527931426288" dependencies: "@types/glob" "*" -<<<<<<< HEAD "@types/glob-stream@*": - version "3.1.30" - resolved "https://registry.yarnpkg.com/@types/glob-stream/-/glob-stream-3.1.30.tgz#b853990b40a4cfe6a80ec0d2fadf68d8060f78b1" + version "3.1.31" + resolved "https://registry.yarnpkg.com/@types/glob-stream/-/glob-stream-3.1.31.tgz#015842260c01dab3b56578d8b37de2e57483d4ad" dependencies: "@types/glob" "*" "@types/node" "*" -"@types/glob@*": - version "5.0.30" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.30.tgz#1026409c5625a8689074602808d082b2867b8a51" -======= "@types/glob@*", "@types/glob@5.0.32": version "5.0.32" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.32.tgz#aec5cfe987c72f099fdb1184452986aa506d5e8f" ->>>>>>> master - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - -<<<<<<< HEAD -"@types/glob@5.0.31": - version "5.0.31" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.31.tgz#6cb8500bd170750c1948f785cc5828e9cff0c36a" dependencies: "@types/minimatch" "*" "@types/node" "*" -"@types/gulp-diff@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/gulp-diff/-/gulp-diff-1.0.0.tgz#6ed98a61d11693e4acbce88d4f011701d3fc8010" - dependencies: - "@types/node" "*" - -======= ->>>>>>> master "@types/gulp-rename@0.0.32": version "0.0.32" resolved "https://registry.yarnpkg.com/@types/gulp-rename/-/gulp-rename-0.0.32.tgz#602828783f97f190e438937dfa6a579eb0198e63" @@ -67,7 +51,15 @@ "@types/through2" "*" "@types/vinyl" "*" -"@types/gulp@*", "@types/gulp@3.8.33": +"@types/gulp@*": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@types/gulp/-/gulp-4.0.4.tgz#753ffe5b0ddaf0c9a60101b346141bb80e602f25" + dependencies: + "@types/chokidar" "*" + "@types/undertaker" "*" + "@types/vinyl-fs" "*" + +"@types/gulp@3.8.33": version "3.8.33" resolved "https://registry.yarnpkg.com/@types/gulp/-/gulp-3.8.33.tgz#b1b076820738c9c4eb7808cd926bff1683e1c2ab" dependencies: @@ -80,26 +72,12 @@ resolved "https://registry.yarnpkg.com/@types/jest/-/jest-20.0.8.tgz#7f8c97f73d20d3bf5448fbe33661a342002b5954" "@types/minimatch@*": - version "2.0.29" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a" - -<<<<<<< HEAD -"@types/node@*": - version "8.0.20" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.20.tgz#65c7375255c24b184c215a5d0b63247c32f01c91" -======= + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.1.tgz#b683eb60be358304ef146f5775db4c0e3696a550" + "@types/node@*", "@types/node@8.0.26": version "8.0.26" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.26.tgz#4d58be925306fd22b1141085535a0268b8beb189" ->>>>>>> master - -"@types/node@8.0.24": - version "8.0.24" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.24.tgz#06c580084d9add1fb40c1510ef0b448961246fb1" - -"@types/node@^6.0.46": - version "6.0.87" - resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.87.tgz#5ab5774f8351a33a935099fa6be850aa0b0ad564" "@types/orchestrator@*": version "0.3.0" @@ -115,8 +93,8 @@ "@types/babel-types" "*" "@types/q@^0": - version "0.0.36" - resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.36.tgz#97d786389641bcbd0e22bfc729a534175976371d" + version "0.0.37" + resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.37.tgz#7d6a934b35ee2f0ed0646d286eba559599021c9e" "@types/ramda@ikatyang/types-ramda#v0.24.1-dist": version "0.24.1" @@ -135,9 +113,27 @@ dependencies: "@types/node" "*" +"@types/undertaker-registry@*": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/undertaker-registry/-/undertaker-registry-1.0.0.tgz#6f61a0be75a22e9ef62df68b480c68bce344fe5f" + +"@types/undertaker@*": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@types/undertaker/-/undertaker-1.1.2.tgz#cf0f62cdcbdf62ad9f70a4d78f81869a5c349a09" + dependencies: + "@types/undertaker-registry" "*" + +"@types/vinyl-fs@*": + version "2.4.7" + resolved "https://registry.yarnpkg.com/@types/vinyl-fs/-/vinyl-fs-2.4.7.tgz#9165d331758b351641debcfe656a133597bacb2f" + dependencies: + "@types/glob-stream" "*" + "@types/node" "*" + "@types/vinyl" "*" + "@types/vinyl@*": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.0.tgz#fd213bf7f4136dde21fe1895500b12c186f8c268" + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.1.tgz#6b414dfdcd4a785e8e76e87565ed29e79490d9b7" dependencies: "@types/node" "*" @@ -301,57 +297,49 @@ aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" -babel-code-frame@7.0.0-alpha.12: - version "7.0.0-alpha.12" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-7.0.0-alpha.12.tgz#26fbb2eab1c20763271fecb6b04a108756fae61f" - dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^3.0.0" - -babel-code-frame@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" +babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: - chalk "^1.1.0" + chalk "^1.1.3" esutils "^2.0.2" - js-tokens "^3.0.0" + js-tokens "^3.0.2" -babel-core@^6.0.0, babel-core@^6.24.1: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.25.0.tgz#7dd42b0463c742e9d5296deb3ec67a9322dad729" +babel-core@^6.0.0, babel-core@^6.24.1, babel-core@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" dependencies: - babel-code-frame "^6.22.0" - babel-generator "^6.25.0" + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" babel-helpers "^6.24.1" babel-messages "^6.23.0" - babel-register "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.25.0" - babel-traverse "^6.25.0" - babel-types "^6.25.0" - babylon "^6.17.2" - convert-source-map "^1.1.0" - debug "^2.1.1" - json5 "^0.5.0" - lodash "^4.2.0" - minimatch "^3.0.2" - path-is-absolute "^1.0.0" - private "^0.1.6" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" slash "^1.0.0" - source-map "^0.5.0" + source-map "^0.5.6" -babel-generator@^6.18.0, babel-generator@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.25.0.tgz#33a1af70d5f2890aeb465a4a7793c1df6a9ea9fc" +babel-generator@^6.18.0, babel-generator@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" dependencies: babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.25.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" detect-indent "^4.0.0" jsesc "^1.3.0" - lodash "^4.2.0" - source-map "^0.5.0" + lodash "^4.17.4" + source-map "^0.5.6" trim-right "^1.0.1" babel-helpers@^6.24.1: @@ -388,13 +376,13 @@ babel-plugin-jest-hoist@^20.0.3: resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz#afedc853bd3f8dc3548ea671fbe69d03cc2c1767" babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" dependencies: babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-types "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" babel-plugin-transform-strict-mode@^6.24.1: version "6.24.1" @@ -409,65 +397,61 @@ babel-preset-jest@^20.0.3: dependencies: babel-plugin-jest-hoist "^20.0.3" -babel-register@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" dependencies: - babel-core "^6.24.1" - babel-runtime "^6.22.0" - core-js "^2.4.0" + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" home-or-tmp "^2.0.0" - lodash "^4.2.0" + lodash "^4.17.4" mkdirp "^0.5.1" - source-map-support "^0.4.2" + source-map-support "^0.4.15" -babel-runtime@^6.22.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.25.0.tgz#33b98eaa5d482bb01a8d1aa6b437ad2b01aec41c" +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" dependencies: core-js "^2.4.0" - regenerator-runtime "^0.10.0" + regenerator-runtime "^0.11.0" -babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071" +babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.25.0" - babel-types "^6.25.0" - babylon "^6.17.2" - lodash "^4.2.0" + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" -babel-traverse@^6.18.0, babel-traverse@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.25.0.tgz#2257497e2fcd19b89edc13c4c91381f9512496f1" +babel-traverse@^6.18.0, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: - babel-code-frame "^6.22.0" + babel-code-frame "^6.26.0" babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.25.0" - babylon "^6.17.2" - debug "^2.2.0" - globals "^9.0.0" - invariant "^2.2.0" - lodash "^4.2.0" - -babel-types@^6.18.0, babel-types@^6.24.1, babel-types@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e" - dependencies: - babel-runtime "^6.22.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.18.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^1.0.1" - -babylon@7.0.0-beta.17: - version "7.0.0-beta.17" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.17.tgz#2aad4d6764f409dfb3ac216d855dc93d70d37911" + lodash "^4.17.4" + to-fast-properties "^1.0.3" -babylon@^6.17.2, babylon@^6.17.4: - version "6.17.4" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a" +babylon@^6.17.4, babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" balanced-match@^1.0.0: version "1.0.0" @@ -553,15 +537,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.0.1.tgz#dbec49436d2ae15f536114e76d14656cdbc0f44d" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -571,7 +547,7 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.1.0: +chalk@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" dependencies: @@ -651,30 +627,18 @@ content-type-parser@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" -convert-source-map@^1.1.0, convert-source-map@^1.4.0: +convert-source-map@^1.4.0, convert-source-map@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" -core-js@^2.4.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.0.tgz#569c050918be6486b3837552028ae0466b717086" +core-js@^2.4.0, core-js@^2.5.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -cosmiconfig@2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" - dependencies: - is-directory "^0.3.1" - js-yaml "^3.4.3" - minimist "^1.2.0" - object-assign "^4.1.0" - os-homedir "^1.0.1" - parse-json "^2.2.0" - require-from-string "^1.1.0" - cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -705,15 +669,11 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -dashify@0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/dashify/-/dashify-0.2.2.tgz#6a07415a01c91faf4a32e38d9dfba71f61cb20fe" - dateformat@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" -debug@^2.1.1, debug@^2.2.0, debug@^2.6.3: +debug@^2.6.3, debug@^2.6.8: version "2.6.8" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: @@ -770,20 +730,9 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" -<<<<<<< HEAD -diff@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" - -diff@^2.0.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/diff/-/diff-2.2.3.tgz#60eafd0d28ee906e4e8ff0a52c1229521033bf99" - -======= ->>>>>>> master diff@^3.1.0, diff@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" + version "3.3.1" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75" doctrine@^0.7.2: version "0.7.2" @@ -804,15 +753,6 @@ dts-element@2.2.1: dependencies: typescript "~2.4.1" -<<<<<<< HEAD -dts-jest@21.0.0: - version "21.0.0" - resolved "https://registry.yarnpkg.com/dts-jest/-/dts-jest-21.0.0.tgz#3d402f6e58f94e01f26a6f695a5d7a017b771fe5" - dependencies: - require-from-string "^1.2.1" - ts-comment "^1.0.1" - tsconfig-extends "^1.0.1" -======= dts-jest@22.0.1: version "22.0.1" resolved "https://registry.yarnpkg.com/dts-jest/-/dts-jest-22.0.1.tgz#09797e622235798ad7b3b44ab5bb592728661621" @@ -825,7 +765,6 @@ dts-jest@22.0.1: ts-comment "^1.1.0" tslib "^1.7.1" yargs "^8.0.2" ->>>>>>> master duplexer2@0.0.2: version "0.0.2" @@ -891,38 +830,13 @@ estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" -esutils@2.0.2, esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - esutils@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" -<<<<<<< HEAD -event-emitter@^0.3.4: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - dependencies: - d "1" - es5-ext "~0.10.14" - -event-stream@^3.1.5: - version "3.3.4" - resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" - dependencies: - duplexer "~0.1.1" - from "~0" - map-stream "~0.1.0" - pause-stream "0.0.11" - split "0.3" - stream-combiner "~0.0.4" - through "~2.3.1" -======= esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" ->>>>>>> master exec-sh@^0.2.0: version "0.2.0" @@ -1072,14 +986,6 @@ flagged-respawn@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5" -flatten@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" - -flow-parser@0.51.0: - version "0.51.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.51.0.tgz#e1c0ceb6f802ba21d16c2fda8e42c824f40f4684" - for-in@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -1134,7 +1040,7 @@ get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" -get-stream@3.0.0, get-stream@^3.0.0: +get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -1224,7 +1130,7 @@ global-prefix@^0.1.4: is-windows "^0.2.0" which "^1.2.12" -globals@^9.0.0: +globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -1266,27 +1172,10 @@ graceful-fs@~1.2.0: version "1.2.3" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" -graphql@0.10.1: - version "0.10.1" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.10.1.tgz#75c93c2ce73aeb5bae2eefb555a8e9e39c36027d" - dependencies: - iterall "^1.1.0" - growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" -<<<<<<< HEAD -gulp-diff@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gulp-diff/-/gulp-diff-1.0.0.tgz#101b23712dd6b107bd07d05ab88ea3ac485fed77" - dependencies: - cli-color "^1.0.0" - diff "^2.0.2" - event-stream "^3.1.5" - gulp-util "^3.0.6" - through2 "^2.0.0" - gulp-modify@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/gulp-modify/-/gulp-modify-0.1.1.tgz#4a99a0bb8b7769921c7b09618762ccc179da3675" @@ -1303,17 +1192,11 @@ gulp-plugin-prettier@1.0.0: gulp-util "^3.0.8" through2 "^2.0.3" -======= ->>>>>>> master gulp-rename@1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.2.2.tgz#3ad4428763f05e2764dec1c67d868db275687817" -<<<<<<< HEAD -gulp-util@*, gulp-util@3.0.8, gulp-util@^3.0.0, gulp-util@^3.0.6, gulp-util@^3.0.8: -======= -gulp-util@3.0.8, gulp-util@^3.0.0, gulp-util@^3.0.8: ->>>>>>> master +gulp-util@*, gulp-util@3.0.8, gulp-util@^3.0.0, gulp-util@^3.0.8: version "3.0.8" resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" dependencies: @@ -1449,14 +1332,6 @@ iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" -ignore@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1480,7 +1355,7 @@ interpret@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" -invariant@^2.2.0: +invariant@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" dependencies: @@ -1517,10 +1392,6 @@ is-ci@^1.0.10: dependencies: ci-info "^1.0.0" -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" @@ -1643,7 +1514,7 @@ isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" -isobject@^2.0.0, isobject@^2.1.0: +isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" dependencies: @@ -1658,17 +1529,17 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" istanbul-api@^1.1.1: - version "1.1.11" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.11.tgz#fcc0b461e2b3bda71e305155138238768257d9de" + version "1.1.13" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.13.tgz#7197f64413600ebdfec6347a2dc3d4e03f97ed5a" dependencies: async "^2.1.4" fileset "^2.0.2" istanbul-lib-coverage "^1.1.1" istanbul-lib-hook "^1.0.7" - istanbul-lib-instrument "^1.7.4" + istanbul-lib-instrument "^1.7.5" istanbul-lib-report "^1.1.1" istanbul-lib-source-maps "^1.2.1" - istanbul-reports "^1.1.1" + istanbul-reports "^1.1.2" js-yaml "^3.7.0" mkdirp "^0.5.1" once "^1.4.0" @@ -1683,9 +1554,9 @@ istanbul-lib-hook@^1.0.7: dependencies: append-transform "^0.4.0" -istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.4.tgz#e9fd920e4767f3d19edc765e2d6b3f5ccbd0eea8" +istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.7.5: + version "1.7.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.5.tgz#adb596f8f0cb8b95e739206351a38a586af21b1e" dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" @@ -1714,16 +1585,12 @@ istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.1: rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e" +istanbul-reports@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.2.tgz#0fb2e3f6aa9922bd3ce45d05d8ab4d5e8e07bd4f" dependencies: handlebars "^4.0.3" -iterall@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.1.1.tgz#f7f0af11e9a04ec6426260f5019d9fcca4d50214" - jest-changed-files@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" @@ -1926,7 +1793,7 @@ jest-util@^20.0.0, jest-util@^20.0.3: leven "^2.1.0" mkdirp "^0.5.1" -jest-validate@20.0.3, jest-validate@^20.0.3: +jest-validate@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" dependencies: @@ -1941,15 +1808,11 @@ jest@20.0.4: dependencies: jest-cli "^20.0.4" -js-base64@^2.1.9: - version "2.1.9" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" - -js-tokens@^3.0.0: +js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@^3.4.3, js-yaml@^3.7.0: +js-yaml@^3.7.0: version "3.9.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" dependencies: @@ -2002,7 +1865,7 @@ json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" -json5@^0.5.0: +json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -2209,15 +2072,11 @@ lodash.templatesettings@^3.0.0: lodash._reinterpolate "^3.0.0" lodash.escape "^3.0.0" -lodash.unescape@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" - lodash.upperfirst@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" -lodash@^4.14.0, lodash@^4.2.0: +lodash@^4.14.0, lodash@^4.17.4: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -2294,32 +2153,32 @@ micromatch@^2.1.5, micromatch@^2.3.11, micromatch@^2.3.7: parse-glob "^3.0.4" regex-cache "^0.4.2" -mime-db@~1.29.0: - version "1.29.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" +mime-db@~1.30.0: + version "1.30.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.16" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.16.tgz#2b858a52e5ecd516db897ac2be87487830698e23" + version "2.1.17" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" dependencies: - mime-db "~1.29.0" + mime-db "~1.30.0" mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" -minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - minimatch@^2.0.1: version "2.0.10" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" dependencies: brace-expansion "^1.0.0" +minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + minimatch@~0.2.11: version "0.2.14" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" @@ -2327,14 +2186,18 @@ minimatch@~0.2.11: lru-cache "2" sigmund "~1.0.0" -minimist@0.0.8, minimist@~0.0.1: +minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: +minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -2430,10 +2293,10 @@ object.omit@^2.0.0: is-extendable "^0.1.1" object.pick@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.2.0.tgz#b5392bee9782da6d9fb7d6afaf539779f1234c2b" + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" dependencies: - isobject "^2.1.0" + isobject "^3.0.1" once@^1.3.0, once@^1.4.0: version "1.4.0" @@ -2544,12 +2407,6 @@ parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" -parse5@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.2.tgz#05eff57f0ef4577fb144a79f8b9a967a6cc44510" - dependencies: - "@types/node" "^6.0.46" - parse5@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" @@ -2564,7 +2421,7 @@ path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" -path-is-absolute@^1.0.0: +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -2632,55 +2489,6 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" -postcss-less@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-less/-/postcss-less-1.1.0.tgz#bdcc76be64c4324d873fbc5cd9fa2e799e4305fa" - dependencies: - postcss "^5.2.16" - -postcss-media-query-parser@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" - -postcss-scss@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-1.0.0.tgz#4957013097973dfd5bd9b1ad8a6dc13456a5d1ba" - dependencies: - postcss "^6.0.1" - -postcss-selector-parser@2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" - -"postcss-values-parser@git://github.com/shellscape/postcss-values-parser.git#5e351360479116f3fe309602cdd15b0a233bc29f": - version "1.2.2" - resolved "git://github.com/shellscape/postcss-values-parser.git#5e351360479116f3fe309602cdd15b0a233bc29f" - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss@^5.2.16: - version "5.2.17" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b" - dependencies: - chalk "^1.1.3" - js-base64 "^2.1.9" - source-map "^0.5.6" - supports-color "^3.2.3" - -postcss@^6.0.1: - version "6.0.9" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.9.tgz#54819766784a51c65b1ec4d54c2f93765438c35a" - dependencies: - chalk "^2.1.0" - source-map "^0.5.6" - supports-color "^4.2.1" - prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -2708,7 +2516,7 @@ pretty-hrtime@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" -private@^0.1.6: +private@^0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" @@ -2809,20 +2617,19 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" -regenerator-runtime@^0.10.0: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" +regenerator-runtime@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" regex-cache@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" dependencies: is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" remove-trailing-separator@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz#69b062d978727ad14dc6b56ba4ab772fd8d70511" + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" repeat-element@^1.1.2: version "1.1.2" @@ -2937,10 +2744,6 @@ sax@^1.2.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" -semver@5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - semver@^4.1.0: version "4.3.6" resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" @@ -2964,8 +2767,8 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" shellwords@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" sigmund@~1.0.0: version "1.0.1" @@ -2985,9 +2788,9 @@ sntp@1.x.x: dependencies: hoek "2.x.x" -source-map-support@^0.4.0, source-map-support@^0.4.2, source-map-support@^0.4.4: - version "0.4.15" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" +source-map-support@^0.4.0, source-map-support@^0.4.15, source-map-support@^0.4.4: + version "0.4.17" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.17.tgz#6f2150553e6375375d0ccb3180502b78c18ba430" dependencies: source-map "^0.5.6" @@ -2997,9 +2800,9 @@ source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" +source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" source-map@~0.2.0: version "0.2.0" @@ -3123,15 +2926,15 @@ supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.1.2, supports-color@^3.2.3: +supports-color@^3.1.2: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: has-flag "^1.0.0" -supports-color@^4.0.0, supports-color@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836" +supports-color@^4.0.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" dependencies: has-flag "^2.0.0" @@ -3181,7 +2984,7 @@ tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" -to-fast-properties@^1.0.1: +to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" @@ -3311,8 +3114,8 @@ tsutils@^1.4.0: resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-1.9.1.tgz#b9f9ab44e55af9681831d5f28d0aeeaf5c750cb0" tsutils@^2.6.1, tsutils@^2.8.0, tsutils@^2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.8.1.tgz#3771404e7ca9f0bedf5d919a47a4b1890a68efff" + version "2.8.2" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.8.2.tgz#2c1486ba431260845b0ac6f902afd9d708a8ea6a" dependencies: tslib "^1.7.1" @@ -3332,20 +3135,13 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -"typescript-eslint-parser@git://github.com/eslint/typescript-eslint-parser.git#e1db075b938bf74acfe16c6f3e63dc4dc12c0e58": - version "4.0.0" - resolved "git://github.com/eslint/typescript-eslint-parser.git#e1db075b938bf74acfe16c6f3e63dc4dc12c0e58" - dependencies: - lodash.unescape "4.0.1" - semver "5.3.0" - -typescript@2.4.2, typescript@^2.4.0, typescript@~2.4.1: +typescript@2.4.2, typescript@~2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844" -typescript@2.5.0-dev.20170617: - version "2.5.0-dev.20170617" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.0-dev.20170617.tgz#5c72d3d4ea278f8db662f513c6911cd31378f024" +typescript@^2.4.0: + version "2.5.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.2.tgz#038a95f7d9bbb420b1bf35ba31d4c5c1dd3ffe34" uglify-js@^2.6: version "2.8.29" @@ -3364,10 +3160,6 @@ unc-path-regex@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - unique-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" @@ -3458,8 +3250,8 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" webidl-conversions@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" whatwg-encoding@^1.0.1: version "1.0.1" @@ -3505,8 +3297,8 @@ wordwrap@~1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" worker-farm@^1.3.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.4.1.tgz#a438bc993a7a7d133bcb6547c95eca7cff4897d8" + version "1.5.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.0.tgz#adfdf0cd40581465ed0a1f648f9735722afd5c8d" dependencies: errno "^0.1.4" xtend "^4.0.1" From 4b5d4ee2a10e90e90d2d9e129795755a4dec1b0c Mon Sep 17 00:00:00 2001 From: ikatyang Date: Mon, 4 Sep 2017 21:57:34 +0800 Subject: [PATCH 19/23] chore(deps): update typescript to version 2.5.2 --- jest.json | 3 ++- package.json | 2 +- yarn.lock | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/jest.json b/jest.json index 36089d5..6a276cc 100644 --- a/jest.json +++ b/jest.json @@ -9,7 +9,8 @@ "globals": { "_dts_jest_": { "enclosing_declaration": true, - "compiler_options": "./tsconfig.test.json" + "compiler_options": "./tsconfig.test.json", + "typescript": "/node_modules/typescript/lib/typescript" } }, "reporters": [ diff --git a/package.json b/package.json index 8b644e0..e6127c3 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "tslint-config-ikatyang": "2.3.0", "tslint-config-prettier": "1.5.0", "tslint-plugin-prettier": "1.1.0", - "typescript": "2.4.2", + "typescript": "2.5.2", "yargs": "8.0.2" } } diff --git a/yarn.lock b/yarn.lock index 7c123a6..62e294a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3135,14 +3135,14 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -typescript@2.4.2, typescript@~2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844" - -typescript@^2.4.0: +typescript@2.5.2, typescript@^2.4.0: version "2.5.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.2.tgz#038a95f7d9bbb420b1bf35ba31d4c5c1dd3ffe34" +typescript@~2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844" + uglify-js@^2.6: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" From 87ade627a8d93645dbebbe079dc316af90d91e1f Mon Sep 17 00:00:00 2001 From: ikatyang Date: Tue, 5 Sep 2017 16:18:53 +0800 Subject: [PATCH 20/23] chore(dt): disable enclosing_declaration --- DefinitelyTyped/tslint.json | 4 +++- jest.dt.json | 16 ++++++++++++++++ scripts/test-dt.sh | 2 +- tasks/build-dt.ts | 38 ++++++++++++++++++++++++++++--------- 4 files changed, 49 insertions(+), 11 deletions(-) create mode 100644 jest.dt.json diff --git a/DefinitelyTyped/tslint.json b/DefinitelyTyped/tslint.json index a482562..023d68b 100644 --- a/DefinitelyTyped/tslint.json +++ b/DefinitelyTyped/tslint.json @@ -3,6 +3,8 @@ "rules": { "ban-types": false, "callable-types": false, - "interface-over-type-literal": false + "interface-over-type-literal": false, + "unified-signatures": false, + "no-unnecessary-type-assertion": false } } diff --git a/jest.dt.json b/jest.dt.json new file mode 100644 index 0000000..373efe8 --- /dev/null +++ b/jest.dt.json @@ -0,0 +1,16 @@ +{ + "testEnvironment": "node", + "moduleFileExtensions": ["ts", "js", "json"], + "testRegex": "/temp/.+\\.ts$", + "transform": {"/temp/.+\\.ts$": "dts-jest/transform"}, + "moduleNameMapper": { + "../ramda/dist": "/node_modules/ramda" + }, + "globals": { + "_dts_jest_": { + "enclosing_declaration": false, + "compiler_options": "./tsconfig.test.json", + "typescript": "/node_modules/typescript/lib/typescript" + } + } +} diff --git a/scripts/test-dt.sh b/scripts/test-dt.sh index 1857cac..731be83 100644 --- a/scripts/test-dt.sh +++ b/scripts/test-dt.sh @@ -1,7 +1,7 @@ #!/bin/bash cd ./DefinitelyTyped -yarn +yarn install --force cd .. yarn run build-dt diff --git a/tasks/build-dt.ts b/tasks/build-dt.ts index 2e5fa58..c108814 100644 --- a/tasks/build-dt.ts +++ b/tasks/build-dt.ts @@ -1,3 +1,5 @@ +import * as child_process from 'child_process'; +import del = require('del'); import * as fs from 'fs'; import * as gulp from 'gulp'; import * as gulp_prettier from 'gulp-plugin-prettier'; @@ -70,21 +72,39 @@ export const build_dt_chores = () => .pipe(gulp.dest(dt_ramda_dirname)); export const build_dt_tests = () => { + const temp_dirname = 'temp'; + const remapped_filename = `${test_filename}.remapped`; + + const commands = [ + `rm -rf ${temp_dirname}`, + `mkdir ${temp_dirname}`, + `cp tests/${test_filename} ${temp_dirname}/`, + `node_modules/.bin/jest -c ./jest.dt.json -u --silent`, + `node_modules/.bin/dts-jest-remap ${temp_dirname}/${test_filename} --rename ${remapped_filename}`, + ]; + + child_process.execSync(commands.join(' && ')); + const linter = new tslint.Linter({ fix: true }); - const snapshot_filename = `snapshots/${test_filename}`; const output_filename = `${dt_ramda_dirname}/${test_filename}`; + const output_content = prettier.format( + fs + .readFileSync(`${temp_dirname}/${remapped_filename}`, 'utf8') + .replace(`'../ramda/dist/index'`, `'ramda'`) + .replace(/\/\/ @dts-jest:fail.+/g, '// $ExpectError') + .replace(/\/\/ @dts-jest:pass:snap ->/g, '// $ExpectType'), + prettier_options, + ); + + fs.writeFileSync(output_filename, output_content); + linter.lint( output_filename, - prettier.format( - fs - .readFileSync(snapshot_filename, 'utf8') - .replace(`'../ramda/dist/index'`, `'ramda'`) - .replace(/\/\/ @dts-jest:fail ->.+/g, '// $ExpectError') - .replace(/\/\/ @dts-jest:pass ->/g, '// $ExpectType'), - prettier_options, - ), + output_content, tslint.Linter.findConfiguration(null, output_filename).results, ); + + del.sync(temp_dirname); }; From 5bc39491e19684ae675e686cf03b4f2529a7dd32 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Tue, 5 Sep 2017 17:31:01 +0800 Subject: [PATCH 21/23] refactor: remove unnecessary operation --- templates/$operation.d.ts | 5 ----- templates/over.d.ts | 3 +-- templates/set.d.ts | 3 +-- templates/view.d.ts | 3 +-- tests/__snapshots__/ramda-tests.ts.snap | 4 ++-- tests/__snapshots__/view.ts.snap | 6 +++--- 6 files changed, 8 insertions(+), 16 deletions(-) diff --git a/templates/$operation.d.ts b/templates/$operation.d.ts index 5c54d29..c5425d1 100644 --- a/templates/$operation.d.ts +++ b/templates/$operation.d.ts @@ -15,8 +15,3 @@ export type Same = Diff< Diff | Diff >; export type Merge = Omit & U; - -// from https://github.com/tycho01/typical/blob/f0e6918/src/cast.ts#L18 -// to resolve https://github.com/Microsoft/TypeScript/issues/15768 -// tslint:disable-next-line:prettier interface-over-type-literal -export type NumberToString = { 0:'0',1:'1',2:'2',3:'3',4:'4',5:'5',6:'6',7:'7',8:'8',9:'9',10:'10',11:'11',12:'12',13:'13',14:'14',15:'15',16:'16',17:'17',18:'18',19:'19',20:'20',21:'21',22:'22',23:'23',24:'24',25:'25',26:'26',27:'27',28:'28',29:'29',30:'30',31:'31',32:'32',33:'33',34:'34',35:'35',36:'36',37:'37',38:'38',39:'39',40:'40',41:'41',42:'42',43:'43',44:'44',45:'45',46:'46',47:'47',48:'48',49:'49',50:'50',51:'51',52:'52',53:'53',54:'54',55:'55',56:'56',57:'57',58:'58',59:'59',60:'60',61:'61',62:'62',63:'63',64:'64',65:'65',66:'66',67:'67',68:'68',69:'69',70:'70',71:'71',72:'72',73:'73',74:'74',75:'75',76:'76',77:'77',78:'78',79:'79',80:'80',81:'81',82:'82',83:'83',84:'84',85:'85',86:'86',87:'87',88:'88',89:'89',90:'90',91:'91',92:'92',93:'93',94:'94',95:'95',96:'96',97:'97',98:'98',99:'99',100:'100',101:'101',102:'102',103:'103',104:'104',105:'105',106:'106',107:'107',108:'108',109:'109',110:'110',111:'111',112:'112',113:'113',114:'114',115:'115',116:'116',117:'117',118:'118',119:'119',120:'120',121:'121',122:'122',123:'123',124:'124',125:'125',126:'126',127:'127',128:'128',129:'129',130:'130',131:'131',132:'132',133:'133',134:'134',135:'135',136:'136',137:'137',138:'138',139:'139',140:'140',141:'141',142:'142',143:'143',144:'144',145:'145',146:'146',147:'147',148:'148',149:'149',150:'150',151:'151',152:'152',153:'153',154:'154',155:'155',156:'156',157:'157',158:'158',159:'159',160:'160',161:'161',162:'162',163:'163',164:'164',165:'165',166:'166',167:'167',168:'168',169:'169',170:'170',171:'171',172:'172',173:'173',174:'174',175:'175',176:'176',177:'177',178:'178',179:'179',180:'180',181:'181',182:'182',183:'183',184:'184',185:'185',186:'186',187:'187',188:'188',189:'189',190:'190',191:'191',192:'192',193:'193',194:'194',195:'195',196:'196',197:'197',198:'198',199:'199',200:'200',201:'201',202:'202',203:'203',204:'204',205:'205',206:'206',207:'207',208:'208',209:'209',210:'210',211:'211',212:'212',213:'213',214:'214',215:'215',216:'216',217:'217',218:'218',219:'219',220:'220',221:'221',222:'222',223:'223',224:'224',225:'225',226:'226',227:'227',228:'228',229:'229',230:'230',231:'231',232:'232',233:'233',234:'234',235:'235',236:'236',237:'237',238:'238',239:'239',240:'240',241:'241',242:'242',243:'243',244:'244',245:'245',246:'246',247:'247',248:'248',249:'249',250:'250',251:'251',252:'252',253:'253',254:'254',255:'255'}; diff --git a/templates/over.d.ts b/templates/over.d.ts index 9302025..c2b0cf3 100644 --- a/templates/over.d.ts +++ b/templates/over.d.ts @@ -1,9 +1,8 @@ -import { NumberToString } from './$operation'; import { ManualLens, Morphism, PseudoLens } from './$types'; export function $number( lens: PseudoLens, - fn: Morphism, + fn: Morphism, target: U, ): U; export function $string>( diff --git a/templates/set.d.ts b/templates/set.d.ts index c33fefe..3335b8f 100644 --- a/templates/set.d.ts +++ b/templates/set.d.ts @@ -1,9 +1,8 @@ -import { NumberToString } from './$operation'; import { ManualLens, PseudoLens } from './$types'; export function $number( lens: PseudoLens, - value: U[NumberToString[N]], + value: U[N], target: U, ): U; export function $string>( diff --git a/templates/view.d.ts b/templates/view.d.ts index b5ea786..ff3dbdd 100644 --- a/templates/view.d.ts +++ b/templates/view.d.ts @@ -1,10 +1,9 @@ -import { NumberToString } from './$operation'; import { ManualLens, PseudoLens } from './$types'; export function $number( lens: PseudoLens, target: U, -): U[NumberToString[N]]; +): U[N]; export function $string>( lens: PseudoLens, target: U, diff --git a/tests/__snapshots__/ramda-tests.ts.snap b/tests/__snapshots__/ramda-tests.ts.snap index 3e7700b..ace8edb 100644 --- a/tests/__snapshots__/ramda-tests.ts.snap +++ b/tests/__snapshots__/ramda-tests.ts.snap @@ -694,7 +694,7 @@ exports[`lensIndex R.set(R.__, 'x', ['a', 'b', 'c'])(headLens) 1`] = `"string[]" exports[`lensIndex R.set(headLens, 'x', ['a', 'b', 'c']) 1`] = `"string[]"`; -exports[`lensIndex R.view(headLens, ['a', 'b', 'c']) 1`] = `"any"`; +exports[`lensIndex R.view(headLens, ['a', 'b', 'c']) 1`] = `"string"`; exports[`lensPath R.over(xyLens, R.negate, { x: { y: 2, z: 3 } }) 1`] = `"{ x: { y: number; z: number; }; }"`; @@ -1456,7 +1456,7 @@ exports[`values R.values({ a: 1, b: 2, c: 3 }) 1`] = `"number[]"`; exports[`valuesIn R.valuesIn(f) 1`] = `"string[]"`; -exports[`view R.view(headLens, ['a', 'b', 'c']) 1`] = `"any"`; +exports[`view R.view(headLens, ['a', 'b', 'c']) 1`] = `"string"`; exports[`when truncate('0123456789ABC') 1`] = `"string"`; diff --git a/tests/__snapshots__/view.ts.snap b/tests/__snapshots__/view.ts.snap index ac2bb55..1e0eb41 100644 --- a/tests/__snapshots__/view.ts.snap +++ b/tests/__snapshots__/view.ts.snap @@ -6,13 +6,13 @@ exports[`R_view(menual_lens_number_object)(object) 1`] = `"number"`; exports[`R_view(menual_lens_number_object, object) 1`] = `"number"`; -exports[`R_view(pseudo_lens_1) 1`] = `"(target: U) => U[\\"1\\"]"`; +exports[`R_view(pseudo_lens_1) 1`] = `"(target: U) => U[1]"`; -exports[`R_view(pseudo_lens_1)(number_array) 1`] = `"any"`; +exports[`R_view(pseudo_lens_1)(number_array) 1`] = `"number"`; exports[`R_view(pseudo_lens_1)(string_number_tuple) 1`] = `"number"`; -exports[`R_view(pseudo_lens_1, number_array) 1`] = `"any"`; +exports[`R_view(pseudo_lens_1, number_array) 1`] = `"number"`; exports[`R_view(pseudo_lens_1, string_number_tuple) 1`] = `"number"`; From 07c909259aa6db828d97e78dbe4e4ff9fb61dedd Mon Sep 17 00:00:00 2001 From: ikatyang Date: Tue, 5 Sep 2017 17:38:34 +0800 Subject: [PATCH 22/23] test: update test cases to avoid `console is not defined` --- tests/__snapshots__/ramda-tests.ts.snap | 2 +- tests/ramda-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/__snapshots__/ramda-tests.ts.snap b/tests/__snapshots__/ramda-tests.ts.snap index ace8edb..8b4b4ed 100644 --- a/tests/__snapshots__/ramda-tests.ts.snap +++ b/tests/__snapshots__/ramda-tests.ts.snap @@ -134,7 +134,7 @@ exports[`binary takesTwoArgs(1, 2, 3) 1`] = `"Expected 2 arguments, but got 3."` exports[`binary takesTwoArgs.length 1`] = `"number"`; -exports[`bind R.bind(console.log, console) 1`] = `"(message?: any, ...optionalParams: any[]) => void"`; +exports[`bind R.bind(Array.isArray, Array) 1`] = `"(arg: any) => arg is any[]"`; exports[`both R.both(gt10)(even)(101) 1`] = `"boolean"`; diff --git a/tests/ramda-tests.ts b/tests/ramda-tests.ts index 10ca02e..841da9c 100644 --- a/tests/ramda-tests.ts +++ b/tests/ramda-tests.ts @@ -306,7 +306,7 @@ import * as R from '../ramda/dist/index'; // @dts-jest:group bind (() => { // @dts-jest:pass:snap - R.bind(console.log, console); + R.bind(Array.isArray, Array); })(); // @dts-jest:group both From d01f6e92c01298156c38fb976890902484209836 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Tue, 5 Sep 2017 17:38:57 +0800 Subject: [PATCH 23/23] test: update snapshots --- snapshots/ramda-tests.ts | 8 ++++---- snapshots/view.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/snapshots/ramda-tests.ts b/snapshots/ramda-tests.ts index 655af21..ea38968 100644 --- a/snapshots/ramda-tests.ts +++ b/snapshots/ramda-tests.ts @@ -305,8 +305,8 @@ import * as R from '../ramda/dist/index'; // @dts-jest:group bind (() => { - // @dts-jest:pass:snap -> (message?: any, ...optionalParams: any[]) => void - R.bind(console.log, console); + // @dts-jest:pass:snap -> (arg: any) => arg is any[] + R.bind(Array.isArray, Array); })(); // @dts-jest:group both @@ -1503,7 +1503,7 @@ import * as R from '../ramda/dist/index'; // @dts-jest:group lensIndex (() => { const headLens = R.lensIndex(0); - // @dts-jest:pass:snap -> any + // @dts-jest:pass:snap -> string R.view(headLens, ['a', 'b', 'c']); //=> 'a' // @dts-jest:pass:snap -> string[] @@ -3195,7 +3195,7 @@ import * as R from '../ramda/dist/index'; // @dts-jest:group view (() => { const headLens = R.lensIndex(0); - // @dts-jest:pass:snap -> any + // @dts-jest:pass:snap -> string R.view(headLens, ['a', 'b', 'c']); //=> 'a' })(); diff --git a/snapshots/view.ts b/snapshots/view.ts index c94861c..bcf185f 100644 --- a/snapshots/view.ts +++ b/snapshots/view.ts @@ -24,13 +24,13 @@ R_view(pseudo_lens_a)(a_1_b_2_c_3); // @dts-jest:pass:snap -> 1 R_view(pseudo_lens_a, a_1_b_2_c_3); -// @dts-jest:pass:snap -> (target: U) => U["1"] +// @dts-jest:pass:snap -> (target: U) => U[1] R_view(pseudo_lens_1); // @dts-jest:pass:snap -> number R_view(pseudo_lens_1)(string_number_tuple); // @dts-jest:pass:snap -> number R_view(pseudo_lens_1, string_number_tuple); -// @dts-jest:pass:snap -> any +// @dts-jest:pass:snap -> number R_view(pseudo_lens_1)(number_array); -// @dts-jest:pass:snap -> any +// @dts-jest:pass:snap -> number R_view(pseudo_lens_1, number_array);