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

Fix Github actions #2

Merged
merged 17 commits into from
Sep 2, 2024
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
12 changes: 6 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v2.3.0
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org
# cache: pnpm

- name: Cache pnpm modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-

- name: Pnpm install
uses: pnpm/action-setup@v2.0.1
uses: pnpm/action-setup@v4
with:
version: 6.10.3
version: 9.4.x
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@ jobs:

strategy:
matrix:
node: ['12.x', '14.x', '16.x']
node: ['20.x', '21.x', '22.x']
os:
- ubuntu-latest
# - macOS-latest
# - windows-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v2.3.0
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
# cache: pnpm

- name: Cache pnpm modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ matrix.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ matrix.os }}-

- name: Pnpm install
uses: pnpm/action-setup@v2.0.1
uses: pnpm/action-setup@v4
with:
version: 6.10.3
version: 9.4.x
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
Expand All @@ -50,7 +50,7 @@ jobs:
# run: pnpm test -- --check-coverage

- name: Test & code coverage
uses: paambaati/codeclimate-action@v2.7.5
uses: paambaati/codeclimate-action@v2.7.1
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ jobs:
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v1
- uses: andresz1/size-limit-action@v1
- name: Checkout repo
uses: actions/checkout@v4

- name: Size limit
uses: andresz1/size-limit-action@v1.8.0
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ function categorySearch (query) {
```

See [search tests](src/search.test.ts) for more examples. Especially
tests for [search](src/search.test.ts#L201) and
[locations](src/search.test.ts#L252) are instructive.
tests for **search** and **locations** are instructive.

## Installation

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"url": "https://github.com/peterhil/ngrammy/issues"
},
"engines": {
"node": ">=12"
"node": ">=20"
},
"files": [
"dist",
Expand All @@ -28,7 +28,7 @@
"size": "size-limit",
"prepare": "tsc -noEmit && ./build.js",
"lint": "eslint",
"coverage": "TS_NODE_PROJECT=tsconfig.test.json tap report --coverage-report=html",
"coverage": "TS_NODE_PROJECT=tsconfig.test.json tap --no-browser --coverage-report=html 'src/**/*.test.ts'",
"test": "TS_NODE_PROJECT=tsconfig.test.json tap",
"build": "rm -rf dist/* && ./build.js",
"dev": "esbuild src/index.ts --bundle --watch --outfile=dev/ngrammy.esm.js"
Expand All @@ -40,8 +40,8 @@
},
"devDependencies": {
"@size-limit/preset-small-lib": "^11.1.4",
"@types/node": "12",
"@types/tap": "^15.0.5",
"@types/node": "^22.5.2",
"@types/tap": "^15.0.12",
"@typescript-eslint/eslint-plugin": "^4.28.3",
"@typescript-eslint/parser": "^4.28.3",
"eslint": "^7.31.0",
Expand Down
233 changes: 120 additions & 113 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ import { ngram } from './ngram'
export default {
Index,
ngram,
// @ts-ignore
version: VERSION,
}
6 changes: 1 addition & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"isolatedModules": true,
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitAny": false,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
Expand All @@ -35,9 +35,5 @@
"strict": true,
"strictNullChecks": true,
"stripInternal": true
},
"typedocOptions": {
"entryPoints": ["src/index.ts"],
"out": "docs"
}
}
3 changes: 1 addition & 2 deletions tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": false,
"inlineSourceMap": true,
"module": "commonjs",
"noImplicitAny": false,
"removeComments": true,
"sourceMap": false,
"target": "es6",
"lib": ["es2019"],
}
Expand Down
14 changes: 7 additions & 7 deletions typedoc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module.exports = {
// entryPoints: [
// 'src/search.ts',
// 'src/ngram.ts',
// 'src/utils/helpers.ts',
// 'src/utils/testutils.ts',
// ],
entryPoints: [
'src/commonTypes.ts',
'src/index.ts',
'src/ngram.ts',
'src/search.ts',
],
out: 'docs',
// hideGenerator: true,
// highlightTheme: 'monokai',
includeVersion: true,
markedOptions: {
markdownItOptions: {
baseUrl: 'https://peterhil.github.io/ngrammy/',
},
name: 'Ngrammy',
Expand Down
Loading