Skip to content
This repository was archived by the owner on Oct 30, 2022. It is now read-only.

Commit 7fc6c1a

Browse files
author
Mike Solomon
committed
Uses lerna
1 parent 5a87da2 commit 7fc6c1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+11459
-5295
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
node_modules
22
dist
33
.unmock
4-
.env
4+
.env
5+
tsconfig.tsbuildinfo
6+
.vscode
7+
coverage

.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.json
2+
*.md
3+
*.snap
4+
5+
dist/

.prettierrc.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
// Unfortunately, prettierrc doesn't support explicitly enumerating the files
3+
// we wish to "prettify", instead relying on them being passed as a glob on
4+
// the CLI. See https://github.com/prettier/prettier/issues/3764.
5+
//
6+
// Unfortunately, that complicates the `package.json` scripts since it
7+
// requires duplicating globs in multiple places, and also prevents
8+
// Prettier-enabled editors from knowing what files are to be covered.
9+
//
10+
// We can DRY this up a bit by leveraging "requirePragma", an instruction
11+
// that tells prettier to only prettify files which contain `@prettier`
12+
// (which none of the files in this repository have) and then specifying the
13+
// exact files to be prettified. As the issue above notes, this should become
14+
// more succinct in Prettier 2.x.
15+
requirePragma: true,
16+
overrides: [
17+
{
18+
files: '{docs/{,source/**},.,packages/**,test}/{*.js,*.ts}',
19+
options: {
20+
requirePragma: false,
21+
trailingComma: 'all',
22+
singleQuote: false,
23+
},
24+
},
25+
],
26+
};

jest.config.base.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const { defaults } = require("jest-config");
2+
3+
module.exports = {
4+
testEnvironment: "node",
5+
preset: "ts-jest",
6+
testMatch: null,
7+
testRegex: "/__tests__/.*\\.test\\.(js|ts)$",
8+
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
9+
moduleFileExtensions: [...defaults.moduleFileExtensions, "ts", "tsx"],
10+
moduleNameMapper: {
11+
"^(unmock|unmock-cli|unmock-jsdom|unmock-node)(?:/dist)?((?:/.*)|$)":
12+
"<rootDir>/../../packages/$1/src$2"
13+
},
14+
clearMocks: true,
15+
globals: {
16+
"ts-jest": {
17+
tsConfig: "<rootDir>/src/__tests__/tsconfig.json",
18+
diagnostics: false
19+
}
20+
}
21+
};

jest.config.js

-17
This file was deleted.

lerna.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"packages": [
3+
"packages/**"
4+
],
5+
"version": "0.0.41"
6+
}

0 commit comments

Comments
 (0)