Skip to content

Commit

Permalink
chore(format): add @vercel/style-guide and run prettier (vercel#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle authored Feb 14, 2024
1 parent 0598a4c commit c16e794
Show file tree
Hide file tree
Showing 26 changed files with 5,098 additions and 1,475 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: CI
on:
push:
branches:
- main
- main
tags:
- '!*'
- '!*'
pull_request:

concurrency:
Expand All @@ -29,28 +29,28 @@ jobs:
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/setup-python@v4
with:
# we lock to 3.11 for a distutils requirement for node-gyp
python-version: '3.11'
- name: Prepare Install (if applicable)
run: node prepare-install.js
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Run Tests
env:
BULL_REDIS_CONNECTION: ${{ (matrix.os == 'ubuntu-latest') && 'redis://127.0.0.1:6379/0' || '' }}
run: npm run ${{ (matrix.os == 'ubuntu-latest') && 'test-verbose' || 'test' }}
- name: Maybe Release
if: matrix.os == 'ubuntu-latest' && matrix.node == 18 && github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
run: npx [email protected]
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/setup-python@v4
with:
# we lock to 3.11 for a distutils requirement for node-gyp
python-version: '3.11'
- name: Prepare Install (if applicable)
run: node prepare-install.js
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Run Tests
env:
BULL_REDIS_CONNECTION: ${{ (matrix.os == 'ubuntu-latest') && 'redis://127.0.0.1:6379/0' || '' }}
run: npm run ${{ (matrix.os == 'ubuntu-latest') && 'test-verbose' || 'test' }}
- name: Maybe Release
if: matrix.os == 'ubuntu-latest' && matrix.node == 18 && github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
run: npx [email protected]
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules
out
dist
coverage
test/**/dist
test/**/actual.js
test/ecmascript
test/fixtures
test/integration
test/unit
package-lock.json
yarn.lock
pnpm-lock.yaml
14 changes: 7 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module.exports = {
collectCoverageFrom: ["out/**/*.js"],
coverageReporters: ["html", "lcov"],
collectCoverageFrom: ['out/**/*.js'],
coverageReporters: ['html', 'lcov'],
coverageThreshold: {
global: {
branches: 87.29,
functions: 96.25,
lines: 92.33,
statements: -249
}
lines: 90.85,
statements: -249,
},
},
testEnvironment: "node",
testMatch: ["<rootDir>/test/*(*.)@(spec|test).js?(x)"]
testEnvironment: 'node',
testMatch: ['<rootDir>/test/*(*.)@(spec|test).js?(x)'],
};
Loading

0 comments on commit c16e794

Please sign in to comment.