Skip to content

Commit

Permalink
feat: support windows. (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
knightedcodemonkey authored Oct 1, 2024
1 parent 7aa7a09 commit 044308f
Show file tree
Hide file tree
Showing 11 changed files with 1,529 additions and 856 deletions.
23 changes: 0 additions & 23 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
16 changes: 10 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ on:
jobs:
ci:
name: CI
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
version: ['20.11.0', '22.9.0']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.2.0
- name: Setup Node
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4.0.4
with:
node-version: '20.11.0'
node-version: ${{ matrix.version }}
- name: Install Dependencies
run: npm ci
- name: Save error log
uses: actions/upload-artifact@v4.3.0
uses: actions/upload-artifact@v4.4.0
if: ${{ failure() }}
with:
name: npm-debug-log-${{ hashFiles('package-lock.json') }}
Expand All @@ -32,7 +36,7 @@ jobs:
- name: Test
run: npm test
- name: Report Coverage
uses: codecov/codecov-action@v4.1.0
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Pack
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.2.0
- name: Setup Node
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4.0.4
with:
node-version: '20.11.0'
- name: Install Dependencies
run: npm ci
- name: Save error log
uses: actions/upload-artifact@v4.2.0
uses: actions/upload-artifact@v4.4.0
if: ${{ failure() }}
with:
name: npm-debug-log-${{ hashFiles('package-lock.json') }}
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Pack
run: npm pack
- name: Push to NPM registry
uses: JS-DevTools/npm-publish@v3.0.1
uses: JS-DevTools/npm-publish@v3.1.1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
tag: ${{ contains(github.ref, '-') && 'next' || 'latest' }}
Expand Down
41 changes: 41 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import eslint from '@eslint/js'
import nodePlugin from 'eslint-plugin-n'
import globals from 'globals'

export default [
eslint.configs.recommended,
nodePlugin.configs['flat/recommended'],
{
languageOptions: {
ecmaVersion: 2023,
globals: {
...globals.es2015,
...globals.node,
},
parserOptions: {
sourceType: 'module',
},
},
rules: {
'no-console': 'error',
'n/no-process-exit': 'off',
'n/hashbang': [
'error',
{
convertPath: {
'src/*.js': ['^src/(.+)$', 'dist/esm/$1'],
},
},
],
'n/no-unsupported-features/node-builtins': [
'error',
{
ignores: [
// No longer experimental with v22.3.0
'fs/promises.cp',
],
},
],
},
},
]
Loading

0 comments on commit 044308f

Please sign in to comment.