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

chore: move to jsr #3

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
9 changes: 3 additions & 6 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
- name: Setup latest deno version
uses: denolib/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: Run deno fmt
run: deno fmt --check --ignore=wasm.js

- name: Run deno lint
run: deno lint --unstable --ignore=wasm.js
run: deno lint --ignore=wasm.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets remove the --ignores from here. Use exclude in the deno.json instead.


test:
runs-on: ubuntu-latest
Expand All @@ -29,7 +29,4 @@ jobs:
- name: Setup latest deno version
uses: denolib/setup-deno@v2
with:
deno-version: v1.x

- name: Run deno test
run: deno test --allow-none
deno-version: v2.x
1 change: 0 additions & 1 deletion .github/workflows/depsbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ jobs:
uses: denosaurs/depsbot@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

82 changes: 53 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ publish = false
crate-type = ["cdylib"]

[dependencies]
wasm-bindgen = { version = "0.2.70", features = ["serde-serialize"] }
serde = { version = "1.0", features = ["derive"] }
wasm-bindgen = { version = "0.2.92", features = ["serde-serialize"] }
serde = { version = "1.0.196", features = ["derive", "rc"] }
serde-wasm-bindgen = "=0.6.3"
png = "0.16.8"

[profile.release]
lto = true

[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-Oz", "--enable-mutable-globals"]
lto = true
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) 2021 Denosaurs
Copyright (c) 2024 Denosaurs

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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ Pull request, issues and feedback are very welcome. Code style is formatted with

### Licence

Copyright 2021, Denosaurs. All rights reserved. MIT license.
Copyright 2024, Denosaurs. All rights reserved. MIT license.
24 changes: 24 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "@denosaurs/pngs",
"version": "0.2.0",
"exports": "./mod.ts",
"tasks": {
"build": "deno run -A scripts/build.ts",
"fmt": "deno run -A scripts/fmt.ts",
"clean": "deno run -A scripts/clean.ts",
"lint": "deno run -A scripts/lint.ts"
},
"lint": {
"exclude": [
"pkg"
eliassjogreen marked this conversation as resolved.
Show resolved Hide resolved
]
},
"publish": {
"include": [
"mod.ts",
"wasm.js",
"README.md",
"LICENSE"
eliassjogreen marked this conversation as resolved.
Show resolved Hide resolved
]
}
}
84 changes: 84 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions examples/basic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { decode } from "../mod.ts";

const file = await (await fetch(
"https://avatars.githubusercontent.com/u/65427464?s=49&v=4",
)).bytes();
console.log(decode(file));
Loading
Loading