Skip to content

Commit

Permalink
convert to esm/typescript and implement auto cleanup tmp dir (#161)
Browse files Browse the repository at this point in the history
* Implement prepareTestDirectory

* convert to class

* convert to esm

* Bump dependencies

* setup typescript

* convert tests to typescript

* convert to typescript

* improve types

* improve types.

* improve types

* convert adapter to typescript

* add prepare script

* fixes to types.

* types improvements.

* rename index.js to helpers.js

* add public api

* fix package.json files

* adjusts

* drop node 12 and add node 18

* readd setUpTestDirectory

* drop this.async/asyncHolds. Use promises instead.

* improve implementation

* reorganize methods

* implement auto cleanup

* cleanup and improvements

* type adjusts.

* drop runEnvironment option and type fixes

* stop using nyc at test

* drop nyc

* recreate package-lock

* bump dependencies

* don't resolve the loader

* add test message

* prettier

* drop prepareTempDirectory.

* adjust supported node version

* drop allowJs
  • Loading branch information
mshima committed Nov 28, 2022
1 parent 50d2d55 commit 4495bce
Show file tree
Hide file tree
Showing 24 changed files with 10,851 additions and 15,734 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
.nyc_output
.idea
/.project
dist
4 changes: 4 additions & 0 deletions .mocharc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
extension: ['spec.ts'],
'node-option': ['loader=@esbuild-kit/esm-loader'],
};
36 changes: 32 additions & 4 deletions .xo-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,38 @@
"space": true,
"envs": ["es2020", "node", "mocha"],
"prettier": true,
"ignores": [
"test/fixtures"
],
"printWidth": 120,
"rules": {
"promise/prefer-await-to-then": "off",
"prefer-rest-params": "off",
"node/prefer-promises/fs": "off"
}
"unicorn/prefer-spread": "off",
"unicorn/no-object-as-default-parameter": "off"
},
"overrides": [
{
"files": "src/*",
"rules": {
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-implicit-any-catch": "off",
"@typescript-eslint/restrict-template-expressions": "off"
}
},
{
"files": "test/*",
"rules": {
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-implicit-any-catch": "off"
}
}
]
}

107 changes: 0 additions & 107 deletions lib/adapter.js

This file was deleted.

Loading

0 comments on commit 4495bce

Please sign in to comment.