Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(betterer 🔨): fix test debug, logger references, lock versions #455

Merged
merged 1 commit into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions jest-debug.config.js

This file was deleted.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@
},
"types": "test/betterer-public-api.d.ts",
"devDependencies": {
"@betterer/cli": "*",
"@betterer/eslint": "*",
"@betterer/logger": "*",
"@betterer/regexp": "*",
"@betterer/tsquery": "*",
"@betterer/cli": "^3.1.2",
"@betterer/errors": "^3.1.1",
"@betterer/eslint": "^3.1.2",
"@betterer/logger": "^3.1.0",
"@betterer/regexp": "^3.1.2",
"@betterer/tsquery": "^3.1.2",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@phenomnomnominal/commitlint-plugin": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/betterer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@betterer/logger": "^3.1.1",
"@betterer/reporter": "^3.1.2",
"@betterer/watch-reporter": "^3.1.2",
"@phenomnomnominal/debug": "^0.2.0",
"@phenomnomnominal/debug": "^0.2.4",
"callsite": "^1.0.0",
"chokidar": "^3.3.1",
"djb2a": "^1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/betterer/src/reporters/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BettererReporter, BettererReporterModule, BettererReporterNames } from
export const DEFAULT_REPORTER = '@betterer/reporter';
export const WATCH_REPORTER = '@betterer/watch-reporter';

const HOOK_NAMES = Object.keys(BettererReporterΩ.prototype) as ReadonlyArray<keyof BettererReporter>;
const HOOK_NAMES = Object.getOwnPropertyNames(BettererReporterΩ.prototype) as ReadonlyArray<keyof BettererReporter>;

export function loadReporters(reporterNames: BettererReporterNames): BettererReporterΩ {
const reporters: Array<BettererReporter> = reporterNames.map((name) => {
Expand Down
3 changes: 2 additions & 1 deletion packages/logger/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"rootDir": "./src"
},
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["../node_modules/*", "./node_modules/*", "./dist/*"]
"exclude": ["../node_modules/*", "./node_modules/*", "./dist/*"],
"references": [{ "path": "../errors" }]
}
2 changes: 1 addition & 1 deletion test/__snapshots__/betterer-debug.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`betterer should doesn't break in debug mode 1`] = `
exports[`betterer doesn't break in debug mode 1`] = `
Array [
"betterer starting 0
",
Expand Down
2 changes: 1 addition & 1 deletion test/betterer-debug.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { betterer } from '@betterer/betterer';
import { createFixture } from './fixture';

describe('betterer', () => {
it(`should doesn't break in debug mode`, async () => {
it(`doesn't break in debug mode`, async () => {
const { logs, paths, cleanup } = await createFixture('test-betterer-debug', {
'.betterer.js': `
const { smaller, bigger } = require('@betterer/constraints');
Expand Down
2 changes: 1 addition & 1 deletion test/betterer-same.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {

it('should stay the same when an issue moves line', async () => {
const { paths, logs, cleanup, resolve, readFile, writeFile, runNames } = await createFixture(
'test-betterer-same-move',
'test-betterer-same-move-line',
{
'src/index.ts': `
const a = 'a';
Expand Down
2 changes: 1 addition & 1 deletion test/betterer-silent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
});

it('should be possible to unsilence a subsequent run', async () => {
const { logs, paths, cleanup } = await createFixture('test-betterer-silent-then-not-silen', {
const { logs, paths, cleanup } = await createFixture('test-betterer-silent-then-not-silent', {
'.betterer.js': `
const { smaller } = require('@betterer/constraints');

Expand Down
15 changes: 8 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"compilerOptions": {
"alwaysStrict": true,
"composite": true,
"declaration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
"incremental": true,
"jsx": "react",
"resolveJsonModule": true,
"lib": ["esnext"],
"module": "CommonJS",
"moduleResolution": "node",
"noEmitOnError": true,
"noUnusedLocals": true,
Expand All @@ -14,13 +20,8 @@
"pretty": true,
"sourceMap": true,
"strict": true,
"target": "ES5",
"target": "ES2017",
"outDir": "./dist",
"typeRoots": ["./node_modules/@types/"],
"resolveJsonModule": true,
"composite": true,
"incremental": true,
"jsx": "react",
"esModuleInterop": true
"typeRoots": ["./node_modules/@types"]
}
}
6 changes: 0 additions & 6 deletions tsconfig.test-debug.json

This file was deleted.

8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1675,10 +1675,10 @@
resolved "https://registry.npmjs.org/@phenomnomnominal/commitlint-plugin/-/commitlint-plugin-1.1.1.tgz#ea96cfc07488efba06d4bd028ebeb14d92da6b85"
integrity sha512-r5eWiv3SScWGe1a790sHczz4XIjuZ9hFWNu4JCUuZ/5K8LkvfiN8fA+AyoqPd4/mGIgw/6rKDNgi0K0ddVrlig==

"@phenomnomnominal/debug@^0.2.0":
version "0.2.0"
resolved "https://registry.npmjs.org/@phenomnomnominal/debug/-/debug-0.2.0.tgz#a2c206e395adc8ccb37466872980816682baddc1"
integrity sha512-poh7bUQjIm3vTWCxZRoLZ5wj5TZpTy69YAEGie//aobwYrsLxciy9NsT8yClt2dsx7RHvMtXgl4DivHnbL7RGw==
"@phenomnomnominal/debug@^0.2.4":
version "0.2.4"
resolved "https://registry.npmjs.org/@phenomnomnominal/debug/-/debug-0.2.4.tgz#c4a2b0c264762fa44e3c99cb6e7561b9f3ada607"
integrity sha512-wpDufADI3AxSAPR19y4CgtWDUDNam47Gm+yTNbIBAKNf8MwAr37riYC+3Jf6QFVE5+jvuHVPJsidEbP7TeHPgA==
dependencies:
esprima "^4.0.1"
esquery "^1.3.1"
Expand Down