Import definitely-not-slow

This commit is contained in:
Andrew Branch
2020-04-13 12:19:06 -07:00
parent 205c6ba872
commit f50f904d8b
79 changed files with 1533 additions and 10102 deletions

View File

@@ -1,3 +0,0 @@
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
//npm.pkg.github.com/andrewbranch/:_authToken=${NPM_TOKEN}
registry=https://npm.pkg.github.com/andrewbranch/

View File

@@ -1,4 +0,0 @@
FROM node:latest
USER root
COPY .npmrc /usr/local/lib/node_modules/npm/npmrc
ENTRYPOINT [ "sh", "-c" ]

View File

@@ -1,11 +0,0 @@
name: Run with GPR auth
description: Runs a shell command in node:latest with a ~/.npmrc authed to GitHub Package Registry
inputs:
run:
description: Shell command to run
required: true
runs:
using: docker
image: Dockerfile
args:
- ${{ inputs.run }}

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env node
/**
* @param {string | number} value
* @param {number} length
*/
function padInt(value, length) {
value = value.toString();
while (value.length < length) {
value = "0" + value;
}
return value;
}
const packageJson = require('../../package.json');
const version = packageJson.version;
const date = new Date();
const timestamp = [
date.getUTCFullYear(),
padInt(date.getUTCMonth() + 1, 2),
padInt(date.getUTCDate(), 2),
padInt(date.getUTCHours(), 2),
padInt(date.getUTCMinutes(), 2),
].join('');
console.log(`${version}-alpha.${timestamp}`);

View File

@@ -1,6 +0,0 @@
{
"compilerOptions": {
"checkJs": true,
"resolveJsonModule": true
}
}

View File

@@ -1,31 +0,0 @@
on:
push:
branches:
- master
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: build, test and publish beta
jobs:
publish_beta:
name: build, test and publish beta
runs-on: ubuntu-latest
container: node:latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: install
uses: ./.github/actions/run-with-gpr-auth
with:
run: npm ci
- name: test
run: npm test
- name: build
run: npm run build
- name: publish beta
uses: ./.github/actions/run-with-gpr-auth
with:
run: |
version=`node .github/workflows/getVersion.js`
npm --no-git-tag-version version $version
npm publish --tag alpha

View File

@@ -1,27 +0,0 @@
on:
release:
types: [published]
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: build, test and publish production
jobs:
publish_production:
name: build, test and publish production
runs-on: ubuntu-latest
container: node:latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: install
uses: ./.github/actions/run-with-gpr-auth
with:
run: npm ci
- name: test
run: npm test
- name: build
run: npm run build
- name: publish production
uses: ./.github/actions/run-with-gpr-auth
with:
run: npm publish

View File

@@ -1 +0,0 @@
@andrewbranch:registry=https://npm.pkg.github.com/

View File

@@ -1,16 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Test",
"runtimeArgs": ["--inspect-brk=5858", "${workspaceRoot}/node_modules/.bin/jest", "--runInBand"],
"console": "integratedTerminal",
"port": 5858
}
]
}

View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

View File

@@ -1,9 +0,0 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
globals: {
'ts-jest': {
tsConfig: './test/tsconfig.json'
}
}
};

File diff suppressed because it is too large Load Diff

View File

@@ -1,35 +0,0 @@
{
"name": "@andrewbranch/definitely-not-slow",
"version": "1.4.10",
"description": "",
"bin": "index.js",
"scripts": {
"build": "tsc -b src/cli",
"test": "jest",
"cli": "node dist/src/cli/index.js"
},
"author": "Andrew Branch <andrew@wheream.io>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/andrewbranch/definitely-not-slow.git"
},
"devDependencies": {
"@types/jest": "^24.0.18",
"@types/node": "^12.12.5",
"jest": "^24.9.0",
"ts-jest": "^24.1.0"
},
"dependencies": {
"@azure/cosmos": "^2.1.7",
"@octokit/rest": "^16.33.0",
"definitelytyped-header-parser": "^3.8.0",
"dtslint": "^2.0.3",
"markdown-table": "^1.1.3",
"types-publisher": "github:microsoft/types-publisher#production",
"typescript": "^3.7.0-dev.20191009"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
}
}

View File

@@ -1,7 +0,0 @@
{
"extends": "../tsconfig.base.json",
"include": [
".",
"../src"
]
}

View File

@@ -1,12 +0,0 @@
{
"compilerOptions": {
"rootDir": ".",
"outDir": "dist",
"inlineSourceMap": true,
"target": "es2015",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true
}
}

View File

@@ -1,4 +1,4 @@
# definitely-not-slow
# @definitelytyped/perf
Performance measuring utilities for [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped).

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env node
if (!module.parent) {
require('./dist/src/cli/index');
}
require('./dist/cli/index');
}

1453
packages/perf/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,30 @@
{
"name": "@definitelytyped/perf",
"version": "0.0.22",
"description": "",
"bin": "index.js",
"scripts": {
"build": "tsc -b",
"test": "../../node_modules/.bin/jest --config ../../jest.config.js packages/perf",
"cli": "node dist/cli/index.js"
},
"author": "Andrew Branch <andrew@wheream.io>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/andrewbranch/definitely-not-slow.git"
},
"dependencies": {
"@azure/cosmos": "^2.1.7",
"@definitelytyped/definitions-parser": "^0.0.22",
"@definitelytyped/header-parser": "^0.0.22",
"@definitelytyped/utils": "^0.0.22",
"@octokit/rest": "^16.33.0",
"dtslint": "^2.0.3",
"markdown-table": "^1.1.3",
"typescript": "^3.8.3"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -0,0 +1,11 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "jest"],
"composite": false,
"noEmit": true
},
"references": [
{ "path": ".." }
]
}

View File

@@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"],
"references": [
{ "path": "../definitions-parser" },
{ "path": "../utils" },
]
}

View File

@@ -872,9 +872,9 @@
}
},
"p-limit": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
"integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"requires": {
"p-try": "^2.0.0"
}
@@ -950,9 +950,9 @@
}
},
"dtslint": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/dtslint/-/dtslint-3.3.0.tgz",
"integrity": "sha512-fQ1Q8Rvnz8ejiUe081qjYYeXi8XuNw8cR8dKv57FwZ5HG3KG541eOE3MeyBFbkZZAIZutl7KHcqhRXj0eaKg0g==",
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/dtslint/-/dtslint-3.4.1.tgz",
"integrity": "sha512-gIFYwlAO8vY17zGMqdJ7x2DA2swrQsKCwrtX0TUP4A36dlXjdFpj6NWMWc1HW5mYkWOkQFHwTWMOdkP6DLsrfA==",
"requires": {
"definitelytyped-header-parser": "3.9.0",
"dts-critic": "^3.0.0",
@@ -960,7 +960,7 @@
"json-stable-stringify": "^1.0.1",
"strip-json-comments": "^2.0.1",
"tslint": "5.14.0",
"typescript": "^3.9.0-dev.20200305",
"typescript": "^3.9.0-dev.20200413",
"yargs": "^15.1.0"
},
"dependencies": {
@@ -1052,9 +1052,9 @@
}
},
"p-limit": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
"integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"requires": {
"p-try": "^2.0.0"
}
@@ -1116,9 +1116,9 @@
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
},
"yargs": {
"version": "15.1.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.1.0.tgz",
"integrity": "sha512-T39FNN1b6hCW4SOIk1XyTOWxtXdcen0t+XYrysQmChzSipvhBO8Bj0nK1ozAasdk24dNWuMZvr4k24nz+8HHLg==",
"version": "15.3.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz",
"integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==",
"requires": {
"cliui": "^6.0.0",
"decamelize": "^1.2.0",
@@ -1130,13 +1130,13 @@
"string-width": "^4.2.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^16.1.0"
"yargs-parser": "^18.1.1"
}
},
"yargs-parser": {
"version": "16.1.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz",
"integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==",
"version": "18.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.2.tgz",
"integrity": "sha512-hlIPNR3IzC1YuL1c2UwwDKpXlNFBqD1Fswwh1khz5+d8Cq/8yc/Mn0i+rQXduu8hcrFKvO7Eryk+09NecTQAAQ==",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
@@ -5567,9 +5567,9 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"typescript": {
"version": "3.9.0-dev.20200305",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.0-dev.20200305.tgz",
"integrity": "sha512-O24m5gu1sfYsDWIgWcA2TI2+8Ou1whbjSe9OxSPvyelJB/Vv1SeOo3IGkoudIuvt3SM/Nf34+6HDTy+dga26pA=="
"version": "3.9.0-dev.20200413",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.0-dev.20200413.tgz",
"integrity": "sha512-wpPljcRc3uLTVpQ8mtKTkS42ipVnW1E7lU5iII+JSKaUDH1ymeo3duvMz8o2sCRUDoZR0SE0SLcinaZ1q4gD7A=="
},
"underscore": {
"version": "1.9.2",

View File

@@ -4,6 +4,7 @@
"references": [
{ "path": "packages/definitions-parser" },
{ "path": "packages/header-parser" },
{ "path": "packages/perf" },
{ "path": "packages/publisher" },
{ "path": "packages/utils" }
]

View File

@@ -8,6 +8,8 @@
"files": [],
"references": [
{ "path": "packages/header-parser/test" },
{ "path": "packages/definitions-parser/test" },
{ "path": "packages/perf/test" },
{ "path": "packages/publisher/test" },
{ "path": "packages/utils/test" }
]