Skip to content

Commit

Permalink
Publishing automation start
Browse files Browse the repository at this point in the history
* Code is still plain js, but fully covered by typescript via jsdocs
* Refactor code to be more programatic
* Added utils function that can check if we need to build & publish new
version
* Added dummy circleci file
* Some vscode configs
Bnaya committed Jun 16, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 1818f5b commit c288177
Showing 17 changed files with 4,144 additions and 136 deletions.
56 changes: 56 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# this file still do nothing
version: 2

aliases:
- &docker
- image: circleci/node:dubnium

- &environment
TZ: /usr/share/zoneinfo/America/Los_Angeles

- &restore_yarn_cache
restore_cache:
name: Restore node_modules cache
keys:
- v1-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
- v1-node-{{ arch }}-{{ .Branch }}-
- v1-node-{{ arch }}-
- &run_yarn
run:
name: Install Packages
command: yarn --frozen-lockfile

orbs:
node: circleci/node@1.0.1

jobs:
setup:
docker: *docker
environment: *environment

steps:
- checkout
- run:
name: Nodejs Version
command: node --version
- *restore_yarn_cache
- *run_yarn
- save_cache:
name: Save node_modules cache
key: v1-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn

# workflows:
# version: 2
# nightly:
# triggers:
# - schedule:
# # every 10 minutes
# cron: "*/10 * * * *"
# filters:
# branches:
# only:
# - master
# jobs:
# - should-publish
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
target
yarn-error.log
yarn-error.log
auto-publish/staging-area
auto-publish/staging-area-for-test
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/Dubnium
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["orta.vscode-jest", "editorconfig.editorconfig", "orta.vscode-jest"]
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"debug.node.autoAttach": "on",
"jest.debugMode": false,
"jest.autoEnable": false,
"jest.enableCodeLens": true,
"jest.enableInlineErrorMessages": true,
"jest.runAllTestsFirst": true,
"jest.debugCodeLens.showWhenTestStateIn": ["fail", "unknown", "pass", "skip"],
}
61 changes: 61 additions & 0 deletions auto-publish/__snapshots__/utils.spec.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Auto publish utils doesReactDOMHasNewerVersionThanUs - no! RC is ready: Correct params passed to execFile 1`] = `
[MockFunction] {
"calls": Array [
Array [
"yarn",
Array [
"info",
"@hot-loader/react-dom",
"--json",
],
Object {
"cwd": undefined,
"timeout": 2000,
},
[Function],
],
Array [
"yarn",
Array [
"info",
"@hot-loader/react-dom",
"--json",
],
Object {
"cwd": undefined,
"timeout": 2000,
},
[Function],
],
Array [
"yarn",
Array [
"info",
"react-dom",
"--json",
],
Object {
"cwd": undefined,
"timeout": 2000,
},
[Function],
],
],
"results": Array [
Object {
"type": "return",
"value": undefined,
},
Object {
"type": "return",
"value": undefined,
},
Object {
"type": "return",
"value": undefined,
},
],
}
`;
10 changes: 10 additions & 0 deletions auto-publish/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const path = require("path");
const fs = require("fs-extra");
const { getAndPatchGivenReactDOMVersion } = require("./utils");

(async () => {
const targetDir = await getAndPatchGivenReactDOMVersion(path.resolve(__dirname, "staging-area"), "16.8.6");
await fs.copy(targetDir, path.resolve(__dirname, "../target"))

console.log("Done!");
})();
3 changes: 3 additions & 0 deletions auto-publish/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const fs = require("fs-extra");


82 changes: 82 additions & 0 deletions auto-publish/interfaces.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
export interface yarnInfoJsonResponse {
type: "inspect";
data: {
name: string;
"dist-tags": Partial<{
[k: string]: string
}>;
versions: string[];
time: { [key: string]: string };
maintainers: Array<{
name: string;
email: string;
}>;
description: string;
homepage: string;
repository: {
type: string;
url: string;
};
bugs: {
url: string;
};
license: string;
readmeFilename: string;
keywords: string[];
version: string;
};
/*
example data:
{
"type": "inspect",
"data": {
"name": "@hot-loader/react-dom",
"dist-tags": { "latest": "16.8.6" },
"versions": [
"16.7.0-alpha.2",
"16.7.0-alpha.2.1",
"16.7.0-alpha.2.2",
"16.7.0-alpha.2.3",
"16.7.0-alpha.2.4",
"16.7.0",
"16.8.0-alpha.0",
"16.8.1",
"16.8.2",
"16.8.3",
"16.8.4",
"16.8.5",
"16.8.6"
],
"time": {
"created": "2018-11-21T10:47:51.342Z",
"16.7.0-alpha.2": "2018-11-21T10:47:51.742Z",
"modified": "2019-03-28T09:32:10.123Z",
"16.7.0-alpha.2.1": "2018-11-21T21:35:44.318Z",
"16.7.0-alpha.2.2": "2018-12-07T12:21:53.582Z",
"16.7.0-alpha.2.3": "2018-12-17T06:55:29.788Z",
"16.7.0-alpha.2.4": "2018-12-19T09:23:40.548Z",
"16.7.0": "2018-12-20T09:22:04.981Z",
"16.8.0-alpha.0": "2019-01-10T04:39:04.893Z",
"16.8.1": "2019-02-07T00:17:32.764Z",
"16.8.2": "2019-02-18T21:58:30.554Z",
"16.8.3": "2019-02-25T21:15:23.701Z",
"16.8.4": "2019-03-07T09:04:23.315Z",
"16.8.5": "2019-03-25T11:19:27.329Z",
"16.8.6": "2019-03-28T09:32:06.816Z"
},
"maintainers": [{ "name": "kashey", "email": "thekashey@gmail.com" }],
"description": "The Hot version of React-DOM",
"homepage": "https://github.com/hot-loader/react-dom#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/hot-loader/react-dom.git"
},
"bugs": { "url": "https://github.com/hot-loader/react-dom/issues" },
"license": "MIT",
"readmeFilename": "README.md",
"keywords": ["HMR", "react", "hot-loader"],
"version": "latest"
}
}
*/
}
231 changes: 231 additions & 0 deletions auto-publish/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
const child_process = require("child_process");
const semver = require("semver");
const path = require("path");
const fs = require("fs-extra");
const OUR_RC_DIST_TAG = "rc";
const basePackageJSON = require("../source/package.base.json");
const {
default: { patch }
// @ts-ignore
} = require("react-hot-loader/webpack");

/**
* Install the given react-dom version, patch it, and return the path to the patched package.
*
* @param {string} stagingArea
* @param {string} version
*/
async function getAndPatchGivenReactDOMVersion(stagingArea, version) {
const wd = path.resolve(stagingArea, version);
await fs.emptyDir(wd);
const originalDir = path.resolve(wd, "source");
const targetDir = path.resolve(wd, "target");

await fs.mkdirp(originalDir);
await fs.mkdirp(targetDir);

// create new local package.json for isolation
await execFile("yarn", ["init", "-y"], originalDir);
// install react so avoid yarn peer warnings
await execFile(
"yarn",
[
"add",
"react",
"--no-lockfile"
],
originalDir
);
await execFile(
"yarn",
[
"add",
"react-dom",
"--no-lockfile"
// "--modules-folder", "lalal"
],
originalDir
);

const reactDOMPath = path.resolve(originalDir, "node_modules", "react-dom");

const patchedFiles = await patchWork(reactDOMPath, targetDir);

if (patchedFiles.length < 2) {
throw new Error("expected to patch at least 2 files");
}

// console.debug(patchedFiles);
return targetDir;
}

/**
* Checks on npm registry if the latest published version of react-dom is newer than our latest published package,
* In the latest or rc dist tags.
*/
async function doesReactDOMHasNewerVersionThanUs() {
const [ourRCVersion, ourLatestVersion, reactDOMVersion] = await Promise.all([
getVersionInDistTagOfPackage("@hot-loader/react-dom", OUR_RC_DIST_TAG),
getVersionInDistTagOfPackage("@hot-loader/react-dom", "latest"),
getVersionInDistTagOfPackage("react-dom", "latest")
]);

// seems like react-dom have new version!
if (semver.gt(reactDOMVersion, ourLatestVersion)) {
if (semver.gte(ourRCVersion, reactDOMVersion)) {
// Ah no, we have a version waiting in our RC tag
return false;
}

return reactDOMVersion;
}

return false;
}

/**
* (In npm) returns the version that the given dist tag points to, on the given package
* @param {string} packageName
* @param {string} distTag
*/
async function getVersionInDistTagOfPackage(packageName, distTag) {
// yarn info @hot-loader/react-dom@latest --json
/**
* @type {import("./interfaces").yarnInfoJsonResponse}
*/
const json = JSON.parse(
await execFile("yarn", ["info", packageName, "--json"])
);
const distTagPointsTo = json.data["dist-tags"][distTag];

if (!distTagPointsTo) {
throw new Error("Given dist tag not found");
}

return distTagPointsTo;
}

/**
* promisified version of child_process.execFile
*
* @param {string} file
* @param {readonly string[] | null | undefined} args
* @param {string} [cwd]
* @returns {Promise<string>}
*/
async function execFile(file, args, cwd) {
return new Promise((res, rej) => {
child_process.execFile(
file,
args,
{ timeout: 2000, cwd },
(error, stdout, stderr) => {
if (error) {
rej(error);
} else {
res(stdout);
}
}
);
});
}

/**
* Apply the needed patches on the given react-dom installation,
* And put the results to the given targetDir
* returns the number of file changed
*
* @param {string} originalDirOrReactDOMPackage
* @param {string} targetDir
*/
async function patchWork(originalDirOrReactDOMPackage, targetDir) {
const pkg = require(path.resolve(originalDirOrReactDOMPackage, "package.json"));

await fs.mkdirp(targetDir);
const patchedFiles = await copyAndPatchDirectory(
originalDirOrReactDOMPackage,
targetDir
);

// was doing nothing (?)
// await copyAndPatchDirectory("../source", "../node_modules/react-dom/", "../target");

await fs.writeFile(
path.resolve(targetDir, "package.json"),
JSON.stringify(
filterPackage(Object.assign(pkg, basePackageJSON)),
null,
" "
)
);

return patchedFiles;

}

/**
* @param {string} source
* @param {string} dest
*/
async function copyAndMaybePatchFile(source, dest) {
const data = (await fs.readFile(source)).toString();
const patchedData = await patch(data);
await fs.writeFile(dest, patchedData || data);

return patchedData !== data;
}

/**
* @param {string} source
* @param {string} target
*/
async function copyAndPatchDirectory(source, target) {
/** @type {string[]} */
const patchedFiles = [];

const list = await fs.readdir(source);

for (const i of list) {
const sourceFile = path.resolve(source, i);
const targetFile = path.resolve(target, i);

const stat = await fs.stat(sourceFile);
if (stat.isDirectory()) {
try {
await fs.mkdir(path.resolve(target, i));
} catch (e) {}

patchedFiles.push(...await copyAndPatchDirectory(sourceFile, targetFile))
} else {
if (await copyAndMaybePatchFile(sourceFile, targetFile)) {
patchedFiles.push(targetFile);
}
}
}

return patchedFiles;
}

/**
* @param {{ [x: string]: any; }} pkg
*/
function filterPackage(pkg) {
return Object.keys(pkg).reduce(
(acc, key) =>
key[0] === "_"
? acc
: {
...acc,
[key]: pkg[key]
},
{}
);
}


module.exports = {
getAndPatchGivenReactDOMVersion,
doesReactDOMHasNewerVersionThanUs,
getVersionInDistTagOfPackage,
execFile
};
98 changes: 98 additions & 0 deletions auto-publish/utils.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
const {
getAndPatchGivenReactDOMVersion,
doesReactDOMHasNewerVersionThanUs
} = require("./utils");
const { resolve } = require("path");
const child_process = require("child_process");

/**
* @type {typeof child_process}
*/
const actualChildProcess = jest.requireActual("child_process");

jest.mock(
"child_process",
() => {
return {
execFile: jest.fn()
};
},
{
virtual: true
}
);

describe("Auto publish utils", () => {
afterEach(() => {
// @ts-ignore
child_process.execFile.mockClear();
});

test("Run getAndPatchGivenVersion and don't crash", async () => {
const stagingArea = resolve(__dirname, "staging-area-for-test");

// @ts-ignore
child_process.execFile.mockImplementation((...args) => {
// @ts-ignore
return actualChildProcess.execFile(...args);
});

await getAndPatchGivenReactDOMVersion(stagingArea, "16.8.6");
});

test("doesReactDOMHasNewerVersionThanUs - no! RC is ready", async () => {
const returnValues = [
{ rc: "2.0.0" },
{ latest: "1.0.0" },
{ latest: "2.0.0" }
];

// @ts-ignore
child_process.execFile.mockImplementation((a, b, c, callback) => {
callback(
false,
JSON.stringify({ data: { "dist-tags": returnValues.shift() } })
);
});

expect(await doesReactDOMHasNewerVersionThanUs()).toEqual(false);

expect(child_process.execFile).toMatchSnapshot("Correct params passed to execFile");
});

test("doesReactDOMHasNewerVersionThanUs - no! our latest is updated", async () => {
const returnValues = [
{ rc: "1.0.0" },
{ latest: "2.0.0" },
{ latest: "2.0.0" }
];

// @ts-ignore
child_process.execFile.mockImplementation((a, b, c, callback) => {
callback(
false,
JSON.stringify({ data: { "dist-tags": returnValues.shift() } })
);
});

expect(await doesReactDOMHasNewerVersionThanUs()).toEqual(false);
});

test("doesReactDOMHasNewerVersionThanUs - yes! 2.0.0", async () => {
const returnValues = [
{ rc: "1.1.0" },
{ latest: "1.0.0" },
{ latest: "2.0.0" }
];

// @ts-ignore
child_process.execFile.mockImplementation((a, b, c, callback) => {
callback(
false,
JSON.stringify({ data: { "dist-tags": returnValues.shift() } })
);
});

expect(await doesReactDOMHasNewerVersionThanUs()).toEqual("2.0.0");
});
});
185 changes: 185 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html

module.exports = {
// All imported modules in your tests should be mocked automatically
// automock: false,

// Stop running tests after `n` failures
// bail: 0,

// Respect "browser" field in package.json when resolving modules
// browser: false,

// The directory where Jest should store its cached dependency information
// cacheDirectory: "/private/var/folders/ps/3nk6jjbn7b75s2d29scw0j7c0000gn/T/jest_dx",

// Automatically clear mock calls and instances between every test
// clearMocks: false,

// Indicates whether the coverage information should be collected while executing the test
// collectCoverage: false,

// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: null,

// The directory where Jest should output its coverage files
// coverageDirectory: null,

// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
// "/node_modules/"
// ],

// A list of reporter names that Jest uses when writing coverage reports
// coverageReporters: [
// "json",
// "text",
// "lcov",
// "clover"
// ],

// An object that configures minimum threshold enforcement for coverage results
// coverageThreshold: null,

// A path to a custom dependency extractor
// dependencyExtractor: null,

// Make calling deprecated APIs throw helpful error messages
// errorOnDeprecated: false,

// Force coverage collection from ignored files using an array of glob patterns
// forceCoverageMatch: [],

// A path to a module which exports an async function that is triggered once before all test suites
// globalSetup: null,

// A path to a module which exports an async function that is triggered once after all test suites
// globalTeardown: null,

// A set of global variables that need to be available in all test environments
// globals: {},

// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: [
// "node_modules"
// ],

// An array of file extensions your modules use
// moduleFileExtensions: [
// "js",
// "json",
// "jsx",
// "ts",
// "tsx",
// "node"
// ],

// A map from regular expressions to module names that allow to stub out resources with a single module
// moduleNameMapper: {},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],

// Activates notifications for test results
// notify: false,

// An enum that specifies notification mode. Requires { notify: true }
// notifyMode: "failure-change",

// A preset that is used as a base for Jest's configuration
// preset: null,

// Run tests from one or more projects
// projects: null,

// Use this configuration option to add custom reporters to Jest
// reporters: undefined,

// Automatically reset mock state between every test
// resetMocks: false,

// Reset the module registry before running each individual test
// resetModules: false,

// A path to a custom resolver
// resolver: null,

// Automatically restore mock state between every test
// restoreMocks: false,

// The root directory that Jest should scan for tests and modules within
// rootDir: null,

// A list of paths to directories that Jest should use to search for files in
// roots: [
// "<rootDir>"
// ],

// Allows you to use a custom runner instead of Jest's default test runner
// runner: "jest-runner",

// The paths to modules that run some code to configure or set up the testing environment before each test
// setupFiles: [],

// A list of paths to modules that run some code to configure or set up the testing framework before each test
// setupFilesAfterEnv: [],

// A list of paths to snapshot serializer modules Jest should use for snapshot testing
// snapshotSerializers: [],

// The test environment that will be used for testing
testEnvironment: "node",

// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},

// Adds a location field to test results
// testLocationInResults: false,

// The glob patterns Jest uses to detect test files
// testMatch: [
// "**/__tests__/**/*.[jt]s?(x)",
// "**/?(*.)+(spec|test).[tj]s?(x)"
// ],

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
// "/node_modules/"
// ],

// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],

// This option allows the use of a custom results processor
// testResultsProcessor: null,

// This option allows use of a custom test runner
// testRunner: "jasmine2",

// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
// testURL: "http://localhost",

// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
// timers: "real",

// A map from regular expressions to paths to transformers
// transform: null,

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
// "/node_modules/"
// ],

// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,

// Indicates whether each individual test should be reported during the run
// verbose: null,

// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
// watchPathIgnorePatterns: [],

// Whether to use watchman for file crawling
// watchman: true,
};
19 changes: 15 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -7,8 +7,10 @@
"scripts": {
"clean": "rm -Rf target",
"prepare": "cp ./README.md ./source/README.md",
"patch": "cd patch && node build.js",
"build": "run-s clean prepare patch"
"patch": "node auto-publish/build.js",
"build": "run-s clean prepare patch",
"yarn-deduplicate": "yarn-deduplicate yarn.lock -s fewer",
"test": "jest"
},
"repository": {
"type": "git",
@@ -26,14 +28,23 @@
},
"homepage": "https://github.com/hot-loader/react-dom#readme",
"devDependencies": {
"@types/fs-extra": "^7.0.0",
"@types/jest": "^24.0.14",
"@types/node": "^10",
"@types/semver": "^6.0.0",
"jest": "^24.8.0",
"npm-run-all": "^4.1.5",
"react-dom": "^16.8.6"
"prettier": "^1.18.2",
"typescript": "^3.5.2",
"yarn-deduplicate": "^1.1.1"
},
"dependencies": {
"fs-extra": "^8.0.1",
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
"react-hot-loader": "^4.7.0",
"scheduler": "^0.12.0-alpha.2"
"scheduler": "^0.12.0-alpha.2",
"semver": "^6.1.1"
}
}
61 changes: 0 additions & 61 deletions patch/build.js

This file was deleted.

65 changes: 65 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"compilerOptions": {
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es2018"], /* Specify library files to be included in the compilation. */
"allowJs": true, /* Allow javascript files to be compiled. */
"checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./dist", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
// "removeComments": true, /* Do not emit comments to output. */
"noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
"isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */

/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */

/* Additional Checks */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */

/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
"types": ["@types/node", "@types/jest"], /* Type declaration files to be included in compilation. */
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
// "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */

/* Source Map Options */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */

/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"resolveJsonModule": true
},
"include": ["auto-publish"]
}
3,380 changes: 3,310 additions & 70 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit c288177

Please sign in to comment.