Skip to content

Commit

Permalink
update dependencies and example
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarnadas committed Nov 24, 2023
1 parent f533b2a commit 67e1ebb
Show file tree
Hide file tree
Showing 30 changed files with 1,021 additions and 5,440 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on:
on:
push:
branches: [master]
pull_request:
Expand All @@ -7,7 +7,7 @@ on:
name: Rust Server Test & Publish

env:
RUST_TOOLCHAIN: nightly-2021-04-25
RUST_TOOLCHAIN: 1.73

jobs:
test-rust:
Expand All @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
check-args:
- ''
- ""
- --features save
- --no-default-features
- --no-default-features --features save
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
fail-fast: false
matrix:
check-args:
- ''
- ""
- --features save
- --no-default-features
- --no-default-features --features save
Expand All @@ -98,12 +98,12 @@ jobs:
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: "14"

- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: 'latest'
version: "latest"

- name: Setup Cache
uses: actions/cache@v2
Expand Down Expand Up @@ -154,12 +154,12 @@ jobs:
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: "14"

- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: 'latest'
version: "latest"

- name: Check NPM and crates.io version
id: check-version
Expand Down Expand Up @@ -213,12 +213,12 @@ jobs:
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: "18"

- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: 'latest'
version: "latest"

- name: Deploy to NPM
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ smmdb-*.tgz
Cargo.lock
*.opt
.cache
tests/assets/saves/smm2/tmp
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
"rust-analyzer.cargo.features": ["save"],
"rust-analyzer.diagnostics.disabled": ["macro-error", "unresolved-macro-call"]
"rust-analyzer.cargo.features": ["save"]
// "rust-analyzer.cargo.target": "wasm32-unknown-unknown"
}
25 changes: 12 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
cargo-features = ["strip"]

[package]
authors = ["Mario Reder <[email protected]>"]
categories = ["wasm", "emulators"]
description = "A utility library for Super Mario Maker and Super Mario Maker 2 to read and manipulate game files."
edition = "2018"
edition = "2021"
license = "MIT"
name = "smmdb"
readme = "./README.md"
Expand All @@ -16,15 +14,15 @@ include = [
"/build.rs",
"/Cargo.toml",
"/README.md",
"/LICENSE"
"/LICENSE",
]

[build-dependencies]
protobuf-codegen-pure = "2"

[dependencies]
aes = "0.7"
arr_macro = { version = "0.1", optional = true }
arr_macro = { version = "0.2", optional = true }
arrayref = "0.3"
async-std = { version = "1", optional = true }
block-modes = "0.8"
Expand All @@ -33,11 +31,11 @@ bytes = { version = "1", features = ["serde"] }
cfg-if = "1"
chrono = "0.4"
cmac = "0.6"
crc = "2"
crc = "3"
hex = "0.4"
image = "0.23"
infer = "0.5"
itertools = "0.10"
image = "0.24"
infer = "0.15"
itertools = "0.12"
protobuf = { version = "2", features = ["with-bytes", "with-serde"] }
rand = "0.8"
regex = "1"
Expand All @@ -46,7 +44,7 @@ serde_derive = "1"
tar = "0.4"
thiserror = "1"
typenum = "1"
zip = { version = "0.5", default-features = false, features = ["deflate"] }
zip = { version = "0.6", default-features = false, features = ["deflate"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
brotli2 = "0.3"
Expand All @@ -55,10 +53,11 @@ brotli2 = "0.3"
console_error_panic_hook = "0.1"
getrandom = { version = "0.2", features = ["js"] }
js-sys = "0.3"
wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
wee_alloc = "0.4"
serde-wasm-bindgen = "0.6"
wasm-bindgen = "0.2"

[dev-dependencies]
anyhow = "1"
colored = "2"
fs_extra = "1"
rayon = "1"
Expand All @@ -67,7 +66,7 @@ wasm-bindgen-test = "0.3"
[features]
default = ["with-serde"]
with-serde = []
save = ["arr_macro", "async-std"]
save = ["arr_macro", "async-std", "async-std/attributes"]

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2020 Mario Reder
Copyright (c) 2017-2023 Mario Reder

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn main() {
}
Codegen::new()
.out_dir(OUT_DIR)
.inputs(&[
.inputs([
"proto/SMMCourse.proto",
"proto/SMM2Course.proto",
"proto/Sound.proto",
Expand Down
30 changes: 0 additions & 30 deletions examples/web/.babelrc

This file was deleted.

29 changes: 10 additions & 19 deletions examples/web/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"author": "Mario Reder <[email protected]>",
"author": "Mario Reder <[email protected]>",
"name": "smmdb-lib-example",
"version": "1.0.0",
"description": "SMMDB lib example.",
"repository": "https://github.com/Tarnadas/smmdb-lib",
"license": "MIT",
"scripts": {
"start": "yarn clean && yarn --cwd ../.. build:web-dev && run-p serve watch",
"serve": "webpack-dev-server -d --env=dev",
"build": "yarn clean && yarn build:wasm && webpack --env=prod",
"serve": "vite",
"build": "yarn clean && yarn build:wasm && vite build",
"build:wasm": "yarn --cwd ../.. build:web",
"watch": "yarn --cwd ../.. watch",
"deploy": "gh-pages --dist dist",
"deploy": "gh-pages --dist src/dist",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"clean": "rimraf ./dist && rimraf ../../pkg"
"clean": "rimraf ./src/dist && rimraf ../../pkg"
},
"dependencies": {
"@geist-ui/react": "^2.1.0-canary.2",
Expand All @@ -22,33 +22,24 @@
"react-json-view": "^1"
},
"devDependencies": {
"@babel/core": "^7",
"@babel/plugin-syntax-dynamic-import": "^7",
"@babel/plugin-transform-react-jsx": "^7",
"@babel/plugin-transform-typescript": "^7",
"@babel/polyfill": "^7",
"@babel/preset-env": "^7",
"@types/react": "^17",
"@types/react-dom": "^17",
"@typescript-eslint/eslint-plugin": "^4",
"@typescript-eslint/parser": "^4",
"babel-loader": "^8",
"core-js": "3",
"@vitejs/plugin-react": "^4.2.0",
"eslint": "^7",
"eslint-config-prettier": "^6",
"eslint-plugin-ordered-imports": "^0",
"eslint-plugin-prettier": "^3",
"eslint-plugin-react": "^7",
"file-loader": "^6.2.0",
"gh-pages": "^3",
"html-webpack-plugin": "^4",
"npm-run-all": "^4",
"prettier": "^2",
"rollup-plugin-analyzer": "^4.0.0",
"ts-node": "^9",
"typescript": "4.1",
"webpack": "^5",
"webpack-bundle-analyzer": "^4",
"webpack-cli": "^3",
"webpack-dev-server": "^3"
"vite": "^5.0.2",
"vite-plugin-top-level-await": "^1.3.1",
"vite-plugin-wasm": "^3.2.2"
}
}
1 change: 1 addition & 0 deletions examples/web/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="./index.tsx"></script>
</body>
</html>
13 changes: 13 additions & 0 deletions examples/web/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import analyze from 'rollup-plugin-analyzer';
import topLevelAwait from 'vite-plugin-top-level-await';
import wasm from 'vite-plugin-wasm';

import react from '@vitejs/plugin-react';

/** @type {import('vite').UserConfig} */
const config = {
root: 'src',
plugins: [wasm(), topLevelAwait(), react(), analyze()]
};

export default config;
5 changes: 0 additions & 5 deletions examples/web/webpack.config.js

This file was deleted.

51 changes: 0 additions & 51 deletions examples/web/webpack.dev.js

This file was deleted.

Loading

0 comments on commit 67e1ebb

Please sign in to comment.