Skip to content

Commit a3ea165

Browse files
authored
Merge pull request #264 from permafrost-dev/v2
version 2
2 parents 3e65f3e + 400e96b commit a3ea165

File tree

105 files changed

+1293
-1842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1293
-1842
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module.exports = {
22
parser: '@typescript-eslint/parser',
33
parserOptions: {
4-
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
5-
sourceType: 'module', // Allows for the use of imports
4+
ecmaVersion: 2020,
5+
sourceType: 'module',
66
},
77
env: {
88
node: true,
99
browser: false,
10-
commonjs: true,
10+
es6: true,
1111
},
1212
settings: {},
1313
extends: ['plugin:@typescript-eslint/recommended', 'eslint:recommended'],
@@ -17,7 +17,9 @@ module.exports = {
1717
'@typescript-eslint/explicit-module-boundary-types': 'off',
1818
'@typescript-eslint/no-var-requires': 'off',
1919
'@typescript-eslint/no-empty-function': 'off',
20-
// 'newline-per-chained-call': ['error', { ignoreChainWithDepth: 2 }],
20+
'@typescript-eslint/no-unused-vars': 'off',
21+
'@typescript-eslint/ban-ts-comment': 'off',
2122
indent: ['error', 4, { SwitchCase: 1 }],
23+
'no-useless-catch': 'off',
2224
},
2325
};

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
github: permafrost-dev
2+
custom: https://permafrost.dev/open-source

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ If applicable, add screenshots to help explain your problem.
3030
**Environment (please complete the following information):**
3131

3232
- OS: [e.g. iOS]
33-
- NodeJS Version [e.g. 14.4]
34-
- Language & Version [e.g. Typescript 4.1]
33+
- NodeJS Version [e.g. 18.1.0]
34+
- Language & Version [e.g. Typescript 5.0]
3535

3636
**Additional context**
3737

.github/codecov.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
codecov:
22
branch: main
3-
require_ci_to_pass: yes
3+
require_ci_to_pass: true
44

55
coverage:
66
status:
@@ -34,7 +34,10 @@ comment:
3434

3535
ignore:
3636
- "build/"
37+
- "dist/"
38+
- "scripts/"
39+
- ".eslintrc.cjs"
3740
- ".eslintrc.js"
38-
- "jest.config.js"
39-
- "rollup.config.js"
40-
- "rollup.standalone-config.js"
41+
- "prettier.config.cjs"
42+
- "prettier.config.js"
43+
- "jest.config.cjs"

.github/dependabot.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Please see the documentation for all configuration options:
2-
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3-
41
version: 2
52
updates:
63

@@ -21,3 +18,5 @@ updates:
2118
prefix: "npm"
2219
include: "scope"
2320
open-pull-requests-limit: 10
21+
labels:
22+
- "dependencies"

.github/workflows/codecov.yml.disabled

Lines changed: 0 additions & 53 deletions
This file was deleted.
Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,26 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
121
name: "CodeQL"
132

143
on:
15-
# push:
16-
# branches: [ main ]
17-
# pull_request:
18-
# # The branches below must be a subset of the branches above
19-
# branches: [ main ]
204
schedule:
21-
- cron: '16 2 * * *'
5+
- cron: '16 2 * * 4'
226

237
jobs:
248
analyze:
259
name: Analyze
2610
runs-on: ubuntu-latest
2711

28-
strategy:
29-
fail-fast: false
30-
matrix:
31-
language: [ 'javascript' ]
32-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33-
# Learn more:
34-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
35-
3612
steps:
3713
- name: Checkout repository
3814
uses: actions/checkout@v4
3915

40-
# Initializes the CodeQL tools for scanning.
4116
- name: Initialize CodeQL
4217
uses: github/codeql-action/init@v3
4318
with:
44-
languages: ${{ matrix.language }}
45-
# If you wish to specify custom queries, you can do so here or in a config file.
46-
# By default, queries listed here will override any specified in a config file.
47-
# Prefix the list here with "+" to use these queries and those in the config file.
48-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
19+
languages: javascript
4920

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51-
# If this step fails, then you should remove it and run the build manually (see below)
5221
- name: Autobuild
5322
uses: github/codeql-action/autobuild@v3
5423

55-
# ℹ️ Command-line programs to run using the OS shell.
56-
# 📚 https://git.io/JvXDl
57-
58-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59-
# and modify them (or add more) to build your code if your project
60-
# uses a compiled language
61-
62-
#- run: |
63-
# make bootstrap
64-
# make release
65-
6624
- name: Perform CodeQL Analysis
6725
uses: github/codeql-action/analyze@v3
6826

.github/workflows/dependabot-auto-merge.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,15 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: ${{ github.actor == 'dependabot[bot]' }}
1212
steps:
13-
13+
1414
- name: Dependabot metadata
1515
id: metadata
1616
uses: dependabot/[email protected]
1717
with:
1818
github-token: "${{ secrets.GITHUB_TOKEN }}"
19-
20-
- name: Auto-merge Dependabot PRs for semver-minor updates
21-
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
22-
run: gh pr merge --auto --merge "$PR_URL"
23-
env:
24-
PR_URL: ${{github.event.pull_request.html_url}}
25-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26-
27-
- name: Auto-merge Dependabot PRs for semver-patch updates
28-
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
19+
20+
- name: Auto-merge non-major version Dependabot PRs
21+
if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}}
2922
run: gh pr merge --auto --merge "$PR_URL"
3023
env:
3124
PR_URL: ${{github.event.pull_request.html_url}}

.github/workflows/run-tests.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run Tests
1+
name: run-tests
22

33
on:
44
push:
@@ -10,44 +10,29 @@ jobs:
1010
tests:
1111

1212
runs-on: ubuntu-latest
13-
1413
strategy:
1514
fail-fast: true
1615
matrix:
17-
node-version: [16, 18, 20]
16+
node-version: [18, 20]
1817

1918
steps:
2019
- name: Checkout repository
2120
uses: actions/checkout@v4
2221
with:
2322
fetch-depth: 1
2423

25-
- name: Set up NodeJS ${{ matrix.node-version }}
26-
uses: actions/setup-node@v4
27-
with:
28-
node-version: ${{ matrix.node-version }}
29-
30-
- name: Get npm cache directory path
31-
id: npm-cache-dir-path
32-
run: echo "::set-output name=dir::$(npm config get cache)"
33-
34-
- name: Cache dependencies
35-
uses: actions/cache@v4
36-
id: npm-cache
24+
- uses: oven-sh/setup-bun@v1
3725
with:
38-
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
39-
key: ${{ runner.os }}-node-${{ matrix.node-version }}-npm-${{ hashFiles('**/package-lock.json') }}
40-
restore-keys: |
41-
${{ runner.os }}-node-${{ matrix.node-version }}-npm-
26+
bun-version: latest
4227

4328
- name: Install dependencies
44-
run: npm install
29+
run: bun install
4530

4631
- name: Run the tests with coverage
47-
run: node_modules/.bin/jest tests -- --coverage --coverageReporters json
32+
run: bun run test
4833

4934
- name: Upload coverage to Codecov
50-
uses: codecov/codecov-action@v3
35+
uses: codecov/codecov-action@v4
5136
with:
5237
token: ${{ secrets.CODECOV_TOKEN }}
5338
files: coverage/coverage-final.json

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
/build/*.js
22
!/build/test.js
3-
3+
/.cache
44
/.vscode
55
/node_modules
66
/dist
7+
/dist-test*
8+
/dist-temp
79
/coverage
810
/build
911

1012
package-lock.json
1113
yarn.lock
14+
bun.lockb
1215

1316
generate-from-ray-php-src.sh
1417
_ray_notes.txt
1518

1619
*.ignore
20+

0 commit comments

Comments
 (0)