Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Rewrite Project into ESM #83

Merged
merged 5 commits into from
Aug 15, 2022
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{.babelrc,.eslintrc,*.yml,.travis.yml,*.json,.eslintrc.js}]
[{.babelrc,.eslintrc,*.yml,.travis.yml,*.json}]
indent_size = 2
20 changes: 20 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
env: {
node: true,
es6: true
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import'],
rules: {
semi: ['error', 'never'],
quotes: ['error', 'single'],
indent: [2, 4],
'import/extensions': ['error', 'ignorePackages']
}
}
27 changes: 0 additions & 27 deletions .eslintrc.js

This file was deleted.

19 changes: 17 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ on:
- minor
- major
distTag:
description: 'NPM tag (e.g. use "next" to release a test version)'
description: 'NPM tag (e.g. use "next --preRelease=alpha --github.preRelease" to release a test version)'
required: true
default: 'latest'
preRelease:
description: If latest release was a pre-release (e.g. X.X.X-alpha.0) and you want to push another one, pick "yes"
required: true
type: choice
default: "no"
options:
- "yes"
- "no"

env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down Expand Up @@ -47,7 +55,14 @@ jobs:
env:
NODE_ENV: production
- name: Release
run: npm run release:ci -- ${{github.event.inputs.releaseType}}
run: npx release-it ${{github.event.inputs.releaseType}} --github.release --ci --npm.skipChecks --no-git.requireCleanWorkingDir --npm.tag=${{github.event.inputs.distTag}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event.inputs.preRelease == 'no' }}
- name: Pre-Release
run: npx release-it --github.release --ci --npm.skipChecks --no-git.requireCleanWorkingDir --preRelease=alpha --github.preRelease --npm.tag=next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event.inputs.preRelease == 'yes' }}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.13.0
v18.7.0
7 changes: 7 additions & 0 deletions __mocks__/fs-extra.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { vi } from 'vitest'

export default {
createWriteStream: vi.fn(),
ensureFileSync: vi.fn(),
existsSync: vi.fn().mockReturnValue(true)
}
5 changes: 5 additions & 0 deletions __mocks__/tcp-port-used.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { vi } from 'vitest'
export default {
waitUntilUsed: vi.fn().mockReturnValue(Promise.resolve()),
waitUntilFree: vi.fn().mockReturnValue(Promise.resolve())
}
20 changes: 0 additions & 20 deletions babel.config.js

This file was deleted.

Loading