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

feat(core): migrate everything to ESM-only enhancement (tap version) #753

Merged
merged 31 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6e2b10b
feat(core): migrate everything to ESM-only
paambaati Apr 26, 2024
98bdcc2
chore(ci): remove dependabot ignores for CJS-only versions
paambaati Apr 26, 2024
8575165
chore(core): better refactoring so Biome and TS strict mode don't clash
paambaati Apr 26, 2024
0f53ba1
Merge branch 'main' into gp/esm-migration
paambaati Apr 30, 2024
d6a8fe1
chore: upgrade dependencies
paambaati May 20, 2024
9eb6690
fix(tests): add back missing import
paambaati May 24, 2024
295386a
fix(test): use the @tapjs/tsx import loader to fix TS issues
paambaati May 24, 2024
d56acf0
fix(ci): use Node 22.x so the import loader will work as expected
paambaati May 24, 2024
5f5e60f
chore: exclude coverage
paambaati May 24, 2024
f97429e
fix: upgrade tap to fix the plugin issues
paambaati May 27, 2024
c75f50c
chore: remove tap hacks
paambaati May 27, 2024
992e3e7
chore: convert run() args to destructured to make life easier
paambaati May 28, 2024
9903f40
chore: upgrade pnpm
paambaati May 28, 2024
c909795
feat(core/internal): migrate to Japa as test runner.
paambaati May 30, 2024
4764b8b
chore: debug failing test on Windows
paambaati May 30, 2024
5f0d00a
chore: revert 4764b8be07fc7824bbc7df5df97322574c2d40f0
paambaati May 30, 2024
6e4b7d9
chore: routine dep upgrades
paambaati Jun 3, 2024
80e87d3
chore: upgrade deps
paambaati Jun 4, 2024
47793be
fix(test): try fixing tests on Windows (maybe)
paambaati Jun 4, 2024
e512c4b
fix: revert 47793be
paambaati Jun 4, 2024
19034a0
fix: go back to tap because japa doesn't seem active
paambaati Jun 6, 2024
cb821ab
fix: incorrect references to __dirname
paambaati Jun 6, 2024
2c56dd7
chore: remove 'only' tests
paambaati Jun 6, 2024
d99b041
fix: fix up last of the TS errors from tap API change
paambaati Jun 6, 2024
7c762f7
chore: dedicated .taprc file
paambaati Jun 7, 2024
29920ea
chore(deps): routine upgrade
paambaati Jun 7, 2024
fd5f683
chore: upgrade deps
paambaati Jun 10, 2024
e318ad8
docs: add notes for myself
paambaati Jun 10, 2024
6228959
chore(deps): routine upgrade
paambaati Jun 11, 2024
3786335
chore(deps): upgrade to tap to fix https://github.com/tapjs/tapjs/pul…
paambaati Jun 12, 2024
797e381
feat!: upgrade module to ESM
paambaati Jun 12, 2024
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
19 changes: 0 additions & 19 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,3 @@ updates:
schedule:
interval: monthly
open-pull-requests-limit: 5
ignore:
# Ignore ESM-only package versions.
# This can be fully removed once everything is ESM-native without all the weird issues.
- dependency-name: hook-std
versions:
- '3.x'
- dependency-name: node-fetch
versions:
- '3.x'
- dependency-name: to-readable-stream
versions:
- '3.x'
- '4.x'
- dependency-name: '@semantic-release/release-notes-generator'
versions:
- '11.x'
- dependency-name: '@types/node'
versions:
- '20.x'
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ jobs:

- name: setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9

- name: setup node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'

- name: install dependencies
Expand Down Expand Up @@ -66,13 +64,11 @@ jobs:

- name: setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9

- name: setup node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'

- name: install dependencies
Expand All @@ -92,13 +88,11 @@ jobs:

- name: setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9

- name: setup node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'

- name: install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib/
node_modules/
coverage/
.nyc_output/
test.sh
test.sh.sha256
.tap/
.tsimp/
15 changes: 15 additions & 0 deletions .taprc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
plugin:
- "!@tapjs/typescript"
- "@tapjs/tsx"
browser: true
timeout: 30
jobs: 6
include:
- "**/*.test.ts"
exclude:
- "**/@(fixture*(s)|lib)/**"
snapshot-clean-cwd: true
color: true
reporter: base
coverage-report:
- text
7 changes: 7 additions & 0 deletions INTERNAL-NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Internal Notes

## How to check for release version

```
pnpm dlx release-please release-pr --token="<insert-github-token>" --repo-url=paambaati/codeclimate-action --trace --dry-run
```
117 changes: 61 additions & 56 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,63 @@
{
"name": "codeclimate-action",
"version": "6.0.0",
"private": true,
"description": "Publish code coverage to Code Climate",
"main": "lib/main.js",
"packageManager": "pnpm@9.0.6",
"scripts": {
"build": "tsc",
"test": "cross-env NODE_OPTIONS=\"--no-warnings\" tap run --disable-coverage",
"test:only": "pnpm run test --only",
"coverage": "pnpm run test --no-disable-coverage --allow-incomplete-coverage --coverage-report=lcovonly",
"coverage:html": "pnpm run coverage --coverage-report=html",
"biome:ci": "biome ci ./",
"format:check": "biome format ./",
"format": "biome format --write ./",
"lint:check": "biome lint ./",
"lint": "biome lint --apply ./",
"lint:unsafe": "biome lint --apply-unsafe ./"
},
"repository": {
"type": "git",
"url": "https://github.com/paambaati/codeclimate-action.git"
},
"keywords": [
"actions",
"codeclimate",
"quality",
"coverage"
],
"author": "GP <me@httgp.com>",
"license": "MIT",
"dependencies": {
"@actions/core": "1.10.1",
"@actions/exec": "1.1.1",
"@actions/github": "6.0.0",
"@actions/glob": "0.4.0",
"hook-std": "2.0.0",
"node-fetch": "2.7.0",
"openpgp": "5.11.1"
},
"devDependencies": {
"@biomejs/biome": "1.7.1",
"@openpgp/web-stream-tools": "0.1.1",
"@tapjs/test": "1.4.2",
"@types/node": "20.12.7",
"@types/node-fetch": "2.6.11",
"@types/sinon": "17.0.3",
"@types/which": "3.0.3",
"cross-env": "7.0.3",
"nock": "13.5.4",
"sinon": "17.0.1",
"tap": "18.7.2",
"to-readable-stream": "2.1.0",
"typescript": "5.4.5",
"which": "4.0.0"
}
"name": "codeclimate-action",
"version": "6.0.0",
"private": true,
"description": "Publish code coverage to Code Climate",
"type": "module",
"main": "lib/main.js",
"packageManager": "pnpm@9.3.0",
"scripts": {
"build": "tsc -p tsconfig.build.json",
"test": "cross-env NODE_OPTIONS=\"--no-warnings\" tap run --disable-coverage",
"test:only": "pnpm run test --only",
"coverage": "pnpm run test --no-disable-coverage --allow-incomplete-coverage --coverage-report=lcovonly",
"coverage:html": "pnpm run coverage --coverage-report=html",
"biome:ci": "biome ci",
"format:check": "biome format",
"format": "biome format --fix",
"lint:check": "biome lint",
"lint": "biome lint --fix",
"lint:unsafe": "biome lint --fix --unsafe ./"
},
"repository": {
"type": "git",
"url": "https://github.com/paambaati/codeclimate-action.git"
},
"keywords": [
"actions",
"codeclimate",
"quality",
"coverage"
],
"author": "GP <me@httgp.com>",
"license": "MIT",
"dependencies": {
"@actions/core": "1.10.1",
"@actions/exec": "1.1.1",
"@actions/github": "6.0.0",
"@actions/glob": "0.4.0",
"hook-std": "3.0.0",
"node-fetch": "3.3.2",
"openpgp": "5.11.1"
},
"devDependencies": {
"@biomejs/biome": "1.8.1",
"@openpgp/web-stream-tools": "0.1.1",
"@tapjs/tsx": "1.1.32",
"@tsconfig/node20": "20.1.4",
"@tsconfig/strictest": "2.0.5",
"@types/node": "20.14.2",
"@types/node-fetch": "2.6.11",
"@types/sinon": "17.0.3",
"@types/which": "3.0.4",
"c8": "10.1.1",
"cross-env": "7.0.3",
"into-stream": "8.0.1",
"nock": "13.5.4",
"sinon": "18.0.0",
"tap": "19.2.5",
"tsimp": "2.0.11",
"typescript": "5.4.5",
"which": "4.0.0"
}
}
Loading