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

refactor(betterer 🔧): v6.0.0 #1234

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
488fbc1
refactor(betterer 🔧): refactor config to handle workers earlier (#1191)
phenomnomnominal Apr 13, 2024
b0512f2
refactor(betterer 🔧): remove verbose debug logging (#1192)
phenomnomnominal Apr 13, 2024
0fa0149
refactor(betterer 🔧): remove built-in TypeScript handling (#1193)
phenomnomnominal Apr 14, 2024
b811ca9
refactor(tooling 🔧): move to npm (#1194)
phenomnomnominal Apr 14, 2024
2585d20
refactor(betterer 🔧): most things working with ESM (#1195)
phenomnomnominal Apr 19, 2024
382e9c9
refactor(docgen 🔧): upgrade dependencies, use .cjs (#1196)
phenomnomnominal Apr 19, 2024
df0849c
refactor(betterer 🔧): restore typescript handling (#1197)
phenomnomnominal Apr 21, 2024
a2c2153
refactor(betterer 🔧): handle TypeScript 5 (#1203)
phenomnomnominal Sep 1, 2024
7804d57
refactor(betterer 🔧): handle ESLint 9 (#1204)
phenomnomnominal Sep 3, 2024
f56dd0e
refactor(betterer 🔧): lock down API for V6 (#1205)
phenomnomnominal Sep 5, 2024
1734131
refactor(betterer 🔧): set up node versions for actions (#1206)
phenomnomnominal Sep 5, 2024
e7b53f2
refactor(betterer 🔧): use knip for dependency checks, add knip test (…
phenomnomnominal Sep 8, 2024
60af7e4
refactor(betterer 🔧): refactor result printing logic (#1208)
phenomnomnominal Sep 11, 2024
d7e1c8a
ci(git 🚧): upgrade commitlint and workflow (#1209)
phenomnomnominal Sep 12, 2024
92e7e17
build(betterer 🔨): remove unused dependency-check (#1210)
phenomnomnominal Sep 12, 2024
94729fd
refactor(betterer 🔧): move results code to worker (#1212)
phenomnomnominal Sep 13, 2024
da704f2
feat(betterer ✨): no more weird completed then new tests (#1213)
phenomnomnominal Sep 13, 2024
d26c395
fix(betterer 🐛): handle -1 column fixes #1202 (#1214)
phenomnomnominal Sep 13, 2024
c763729
refactor(betterer 🔧): try to make rendering more predictable (#1215)
phenomnomnominal Sep 15, 2024
1c0e5e2
refactor(betterer 🔧): use Promises.withResolvers instead of custom de…
phenomnomnominal Sep 15, 2024
da48acc
refactor(betterer 🔧): remove reporter from config so it can be passed…
phenomnomnominal Sep 15, 2024
8cf8207
feat(betterer ✨)!: allow cache in CI mode (#1218)
phenomnomnominal Sep 15, 2024
285d432
fix(betterer 🐛): improve docs, handle include and exclude, add tests,…
phenomnomnominal Sep 16, 2024
4175971
refactor(betterer 🔧): extract run logging to reporter interface (#1221)
phenomnomnominal Oct 6, 2024
f593967
refactor(betterer 🔧): more logging changes I guess (#1222)
phenomnomnominal Oct 8, 2024
103a170
test(betterer 🚨): improve test coverage (#1223)
phenomnomnominal Oct 11, 2024
aeb46f8
feat(betterer ✨): improve CLI output when files have changed but test…
camjackson Oct 11, 2024
5a53e45
feat(betterer ✨): add more details to file issues (#1211)
annaet Oct 11, 2024
03860c7
refactor(betterer 🔧): move suite errors from cli into main lib (#1224)
phenomnomnominal Oct 12, 2024
d897782
fix(betterer 🐛): just use the string as the memoize key (#1225)
phenomnomnominal Oct 12, 2024
ae555e6
fix(betterer 🐛): handles more paths in results file, and some TypeScr…
phenomnomnominal Oct 12, 2024
1b117d7
feat(betterer ✨): no more git hashes for cache (#1228)
phenomnomnominal Oct 13, 2024
f434c2a
refactor(betterer 🔧): handle transpiling differently so can generate …
phenomnomnominal Oct 14, 2024
d229df0
refactor(betterer 🔧): allow separate config of cwd and basepath (#1231)
phenomnomnominal Oct 23, 2024
df77035
feat(betterer ✨): specify different cache strategies (#1232)
phenomnomnominal Nov 6, 2024
e452b5e
fix(betterer 🐛): remove printed from api (#1233)
phenomnomnominal Nov 8, 2024
d18c176
fix(betterer 🐛): api stability (#1235)
phenomnomnominal Nov 30, 2024
27ca1bb
refactor(tooling 🔧): bump lerna version
phenomnomnominal Dec 1, 2024
d71ead5
chore(release 🔖): publish 6.0.0-alpha.0
phenomnomnominal Dec 1, 2024
ec62c8c
chore(release 🔖): fixes
phenomnomnominal Dec 1, 2024
f9b70f6
chore(release 🔖): publish 6.0.0-alpha.1
phenomnomnominal Dec 1, 2024
8219926
chore(release 🔖): fixes
phenomnomnominal Dec 1, 2024
ae8b239
chore(release 🔖): fixes
phenomnomnominal Dec 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 46 additions & 1 deletion .betterer.results
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,49 @@
//
// If this file contains merge conflicts, use `betterer merge` to automatically resolve them:
// https://phenomnomnominal.github.io/betterer/docs/results-file/#merge
//
//
exports[`no hack comments`] = {
value: `{}`
};

exports[`no knip errors`] = {
value: `{
".betterer.ts:194472954": [
[0, 0, 0, "Unused files", "3789190540"]
],
"packages/betterer/src/fs/version-control.worker.ts:2897508041": [
[0, 0, 0, "Unused files", "3789190540"]
],
"packages/docgen/package.json:2326583700": [
[0, 0, 0, "Unused dependencies: tslib", "975605642"]
],
"packages/extension/package.json:710109374": [
[0, 0, 0, "Unused dependencies: lodash.debounce", "2305943112"],
[0, 0, 0, "Unused dependencies: vscode-languageclient", "2194305828"],
[0, 0, 0, "Unused dependencies: vscode-languageserver", "1576609144"],
[0, 0, 0, "Unused dependencies: vscode-languageserver-textdocument", "2013829255"],
[0, 0, 0, "Unused dependencies: vscode-uri", "2713846241"]
],
"packages/fixture/package.json:4000629575": [
[0, 0, 0, "Unused dependencies: ansi-regex", "2577412447"]
],
"tools/docs-filter.ts:893765149": [
[0, 0, 0, "Unused files", "3789190540"]
],
"vitest.config.ts:1758587906": [
[0, 0, 0, "Unlisted dependencies: @vitest/coverage-v8", "423406117"]
],
"website/package.json:2119283197": [
[0, 0, 0, "Unused dependencies: @algolia/client-search", "615397950"],
[0, 0, 0, "Unused dependencies: @docusaurus/core", "1623780400"],
[0, 0, 0, "Unused dependencies: @docusaurus/plugin-client-redirects", "1894418674"],
[0, 0, 0, "Unused dependencies: @docusaurus/preset-classic", "3564359911"],
[0, 0, 0, "Unused dependencies: @mdx-js/react", "3475488353"],
[0, 0, 0, "Unused dependencies: clsx", "1980870894"],
[0, 0, 0, "Unused dependencies: react", "964551243"],
[0, 0, 0, "Unused dependencies: react-dom", "2933334464"],
[0, 0, 0, "Unused dependencies: react-loadable", "4081059722"],
[0, 0, 0, "Unlisted binaries: docusaurus", "1661342944"]
]
}`
};
13 changes: 12 additions & 1 deletion .betterer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import { regexp } from '@betterer/regexp';
import { knip } from '@betterer/knip';

export default {
'no hack comments': () =>
regexp(/(\/\/\s*HACK)/i).include(['./packages/**/src/**/*.ts', './packages/**/src/**/*.tsx'])
regexp(/(\/\/\s*HACK)/i).include(['./packages/**/src/**/*.ts', './packages/**/src/**/*.tsx']),
'no knip errors': () =>
knip(
'./knip.json',
{},
{
production: true,
strict: true,
tags: ['-knipignore', '-internal']
}
).skip()
};
72 changes: 0 additions & 72 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ If applicable, add screenshots to help explain your problem.
**Versions (please complete the following information):**

- OS: [e.g. Windows, MacOS]
- Betterer Version [e.g. 4.*]
- Node Version [e.g. 14.*]
- Betterer Version [e.g. 6.*]
- Node Version [e.g. 20.*]

**Additional context**
Add any other context about the problem here.
24 changes: 11 additions & 13 deletions .github/workflows/build-extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,20 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x, 20.x, 22.x]
operating-system: [macOS-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use node.js ${{ matrix['node-version'] }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix['node-version'] }}
- name: Install dependencies
uses: sergioramos/yarn-actions/install@master
with:
frozen-lockfile: true
- name: Run build
run: yarn compile:packages && yarn build:extension
- name: Run extension test
uses: GabrielBB/xvfb-action@v1.0
with:
run: yarn test:extension
# - name: Install dependencies
# run: npm install
# - name: Run build
# run: npm run compile:packages && npm run build:extension
# - name: Run extension test
# uses: GabrielBB/xvfb-action@v1.0
# with:
# run: npm run test:extension
18 changes: 11 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.x, 20.x, 22.x]
operating-system: [windows-latest, macOS-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use node.js ${{ matrix['node-version'] }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix['node-version'] }}

- name: Install dependencies
uses: sergioramos/yarn-actions/install@master
with:
frozen-lockfile: true
run: npm install

- name: Run build
run: yarn build:ci
run: npm run build:ci

- name: Coverage
run: cat ./reports/unit-coverage/coverage-summary.md >> $GITHUB_STEP_SUMMARY
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
26 changes: 26 additions & 0 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint Commit Messages
on: [pull_request]

permissions:
contents: read
pull-requests: read

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Validate all commits from PR
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
33 changes: 17 additions & 16 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,27 @@ jobs:
if: github.event_name != 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '20.x'
- name: Test Build
run: |
yarn install --frozen-lockfile
yarn api
yarn docs
npm install
npm run api
npm run docs
cd website
yarn install --frozen-lockfile
yarn build
npm install
npm run build
gh-release:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- name: Use node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '20.x'
- name: Add key to allow access to repository
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
Expand All @@ -51,9 +52,9 @@ jobs:
run: |
git config --global user.email "actions@gihub.com"
git config --global user.name "gh-actions"
yarn install --frozen-lockfile
yarn api
yarn docs
npm install
npm run api
npm run docs
cd website
yarn install --frozen-lockfile
yarn deploy
npm install
npm run deploy
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ dist
node_modules
reports
lerna-debug.log
yarn-error.log
*.tsbuildinfo
*.vsix
goldens/models
goldens/temp
packages/**/yarn.lock
website/build
website/docs/api/*.md
website/.docusaurus
packages/extension/.vscode-test
*.patch
betterer.*.log
.betterer.cache
.betterer.*.mjs
.eslintcache
5 changes: 1 addition & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
npx --no -- commitlint --edit $1
10 changes: 5 additions & 5 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn
yarn build
npm install
npx lint-staged
npm run test:api
npm run test:dependencies
npm run test:e2e
npm run betterer:precommit
5 changes: 0 additions & 5 deletions .lintstagedrc

This file was deleted.

Loading
Loading