-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0c417bd
Showing
22 changed files
with
5,647 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
extends: [ | ||
"config:js-app", | ||
"helpers:disableTypesNodeMajor", | ||
"schedule:earlyMondays", | ||
"group:allNonMajor", | ||
"schedule:monthly" | ||
], | ||
prHourlyLimit: 5, | ||
prConcurrentLimit: 5, | ||
branchConcurrentLimit: 5, | ||
labels: ["dependencies"], | ||
baseBranches: ["main"], | ||
packageRules: [ | ||
{ | ||
matchUpdateTypes: ["patch", "minor"], | ||
matchManagers: ["npm"], | ||
automerge: true, | ||
}, | ||
{ | ||
packagePatterns: ["lint", "!lint-staged"], | ||
groupName: "Linting", | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
|
||
- run: corepack enable | ||
|
||
- name: find pnpm cache path | ||
id: cache | ||
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.cache.outputs.path }} | ||
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
v1-pnpm- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- run: pnpm lint | ||
|
||
typecheck: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
|
||
- run: corepack enable | ||
|
||
- name: find pnpm cache path | ||
id: cache | ||
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.cache.outputs.path }} | ||
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
v1-pnpm- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- run: pnpm typecheck | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
|
||
- run: corepack enable | ||
|
||
- name: find pnpm cache path | ||
id: cache | ||
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.cache.outputs.path }} | ||
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
v1-pnpm- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- run: pnpm test | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
|
||
- run: corepack enable | ||
|
||
- name: find pnpm cache path | ||
id: cache | ||
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.cache.outputs.path }} | ||
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
v1-pnpm- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- run: pnpm build | ||
|
||
- run: pnpm publint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.DS_Store | ||
|
||
node_modules/ | ||
dist/ | ||
|
||
.idea/ | ||
!.idea/jsLibraryMappings.xml | ||
!.idea/template.iml | ||
!.idea/prettier.xml | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
save-exact = true | ||
shell-emulator = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pnpm-lock.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"printWidth": 90, | ||
"semi": false, | ||
"htmlWhitespaceSensitivity": "ignore", | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# remsg | ||
|
||
[![npm](https://img.shields.io/npm/v/remsg)](https://www.npmjs.com/package/remsg) | ||
![npm bundle size](https://deno.bundlejs.com/?q=remsg&badge) | ||
![node-current](https://img.shields.io/node/v/remsg) | ||
|
||
A library for parsing and serializing MSG files for the RE Engine, more specifically for Monster Hunter: Rise. | ||
|
||
This library pretty much a port of [REMSG_Converter](https://github.com/dtlnor/REMSG_Converter) which is based on the work in [mhrice](https://github.com/wwylele/mhrice). | ||
|
||
## Usage | ||
|
||
```typescript | ||
import { encodeMsg, decodeMsg } from "remsg" | ||
|
||
const data = /* load a msg file */ | ||
const json = decodeMsg(data) | ||
const msg = encodeMsg(json) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import antfu from "@antfu/eslint-config" | ||
|
||
export default antfu({ | ||
stylistic: false, | ||
test: { overrides: { "test/no-import-node-test": "off" } }, | ||
typescript: { | ||
tsconfigPath: "tsconfig.json", | ||
overrides: { | ||
"no-console": "off", | ||
"ts/no-use-before-define": "off", | ||
"ts/consistent-type-definitions": "off", | ||
"ts/consistent-type-imports": ["error", { fixStyle: "inline-type-imports" }], | ||
"ts/no-unsafe-argument": "off", | ||
"ts/no-unsafe-assignment": "off", | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"name": "remsg", | ||
"description": "A library for parsing and serializing MSG files for the RE Engine.", | ||
"type": "module", | ||
"version": "0.0.0", | ||
"author": "BeeeQueue <adam@haglund.dev>", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/beeequeue/remsg.git" | ||
}, | ||
"license": "MIT", | ||
"packageManager": "pnpm@9.9.0", | ||
"engines": { | ||
"node": ">=20" | ||
}, | ||
"simple-git-hooks": { | ||
"pre-commit": "pnpm lint-staged" | ||
}, | ||
"lint-staged": { | ||
"*.{js,jsx,ts,tsx,json,json5,yaml,yml,css,scss,md}": [ | ||
"prettier --write" | ||
] | ||
}, | ||
"files": [ | ||
"dist", | ||
"CHANGELOG.md" | ||
], | ||
"exports": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js" | ||
}, | ||
"scripts": { | ||
"build": "tsup", | ||
"lint": "eslint src", | ||
"test": "vitest", | ||
"typecheck": "tsc --noEmit", | ||
"prepare": "simple-git-hooks" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "3.0.0", | ||
"@tsconfig/node22": "22.0.0", | ||
"@tsconfig/strictest": "2.0.5", | ||
"@types/node": "22.5.1", | ||
"binary-util": "0.0.0", | ||
"dotenv": "16.4.5", | ||
"eslint": "9.9.1", | ||
"eslint-define-config": "2.1.0", | ||
"lint-staged": "15.2.9", | ||
"prettier": "3.3.3", | ||
"publint": "0.2.10", | ||
"simple-git-hooks": "2.11.1", | ||
"tsup": "8.2.4", | ||
"typescript": "5.5.4", | ||
"vitest": "2.0.5" | ||
}, | ||
"pnpm": { | ||
"overrides": { | ||
"is-core-module": "npm:@nolyfill/is-core-module@^1" | ||
} | ||
} | ||
} |
Oops, something went wrong.