From 6b1dbf973f43755d2ed9481500e6e7e60d0da1a0 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 5 Sep 2025 18:49:21 +0400 Subject: [PATCH 01/14] Convert to ESM --- bolt11.js | 4 ++-- package.json | 1 + tests/basic.test.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bolt11.js b/bolt11.js index d1897ea..773b72c 100644 --- a/bolt11.js +++ b/bolt11.js @@ -1,4 +1,4 @@ -const {bech32, hex, utf8} = require('@scure/base') +import {bech32, hex, utf8} from '@scure/base' // defaults for encode; default timestamp is current time at call const DEFAULTNETWORK = { @@ -391,7 +391,7 @@ function decode(paymentRequest, network) { } } -module.exports = { +export { decode, hrpToMillisat } diff --git a/package.json b/package.json index 7f3cc8c..2b43f60 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "light-bolt11-decoder", "version": "3.2.0", + "type": "module", "description": "decode lightning invoices without overhead (doesn't check signatures).", "main": "bolt11.js", "types": "bolt11.d.ts", diff --git a/tests/basic.test.js b/tests/basic.test.js index ed5e70d..d55a488 100644 --- a/tests/basic.test.js +++ b/tests/basic.test.js @@ -1,6 +1,6 @@ /* eslint-env jest */ -const {decode} = require('..') +import {decode} from '../bolt11.js' describe('decoding', () => { it('should decode an invoice', () => { From 0d1bb3b43e493a71a08ac7d204f361fcaa44fa24 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 5 Sep 2025 18:51:19 +0400 Subject: [PATCH 02/14] Use native test runner instead of Jest --- package.json | 4 +++- tests/basic.test.js | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2b43f60..f55f5e5 100644 --- a/package.json +++ b/package.json @@ -20,12 +20,14 @@ ], "author": "fiatjaf", "license": "MIT", + "scripts": { + "test": "node --test --experimental-test-coverage tests/basic.test.js" + }, "dependencies": { "@scure/base": "1.1.1" }, "devDependencies": { "eslint": "^8.0.0", - "jest": "^29.4.3", "prettier": "^2.4.1" } } diff --git a/tests/basic.test.js b/tests/basic.test.js index d55a488..fe18e0b 100644 --- a/tests/basic.test.js +++ b/tests/basic.test.js @@ -1,4 +1,5 @@ -/* eslint-env jest */ +import { describe, it } from 'node:test' +import assert from 'node:assert/strict' import {decode} from '../bolt11.js' @@ -7,7 +8,7 @@ describe('decoding', () => { let inv = decode( 'lnbc20u1p3y0x3hpp5743k2g0fsqqxj7n8qzuhns5gmkk4djeejk3wkp64ppevgekvc0jsdqcve5kzar2v9nr5gpqd4hkuetesp5ez2g297jduwc20t6lmqlsg3man0vf2jfd8ar9fh8fhn2g8yttfkqxqy9gcqcqzys9qrsgqrzjqtx3k77yrrav9hye7zar2rtqlfkytl094dsp0ms5majzth6gt7ca6uhdkxl983uywgqqqqlgqqqvx5qqjqrzjqd98kxkpyw0l9tyy8r8q57k7zpy9zjmh6sez752wj6gcumqnj3yxzhdsmg6qq56utgqqqqqqqqqqqeqqjq7jd56882gtxhrjm03c93aacyfy306m4fq0tskf83c0nmet8zc2lxyyg3saz8x6vwcp26xnrlagf9semau3qm2glysp7sv95693fphvsp54l567' ) - expect(inv).toEqual({ + assert.deepEqual(inv, { paymentRequest: 'lnbc20u1p3y0x3hpp5743k2g0fsqqxj7n8qzuhns5gmkk4djeejk3wkp64ppevgekvc0jsdqcve5kzar2v9nr5gpqd4hkuetesp5ez2g297jduwc20t6lmqlsg3man0vf2jfd8ar9fh8fhn2g8yttfkqxqy9gcqcqzys9qrsgqrzjqtx3k77yrrav9hye7zar2rtqlfkytl094dsp0ms5majzth6gt7ca6uhdkxl983uywgqqqqlgqqqvx5qqjqrzjqd98kxkpyw0l9tyy8r8q57k7zpy9zjmh6sez752wj6gcumqnj3yxzhdsmg6qq56utgqqqqqqqqqqqeqqjq7jd56882gtxhrjm03c93aacyfy306m4fq0tskf83c0nmet8zc2lxyyg3saz8x6vwcp26xnrlagf9semau3qm2glysp7sv95693fphvsp54l567', sections: [ From 90318e5fef4bcceac69c42c6ea8255e044c3e00e Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 5 Sep 2025 18:52:16 +0400 Subject: [PATCH 03/14] Upgrade @scure/base to 2.0.0 and prettier to 3.6.2 --- .prettierrc.yaml | 1 - package.json | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.prettierrc.yaml b/.prettierrc.yaml index 16c878e..a881699 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -6,5 +6,4 @@ proseWrap: preserve singleQuote: true trailingComma: none useTabs: false -jsxBracketSameLine: false bracketSpacing: false diff --git a/package.json b/package.json index f55f5e5..0b23a5b 100644 --- a/package.json +++ b/package.json @@ -24,10 +24,10 @@ "test": "node --test --experimental-test-coverage tests/basic.test.js" }, "dependencies": { - "@scure/base": "1.1.1" + "@scure/base": "2.0.0" }, "devDependencies": { "eslint": "^8.0.0", - "prettier": "^2.4.1" + "prettier": "^3.6.2" } } From 0490157e1a05c9e6c105970bc76c045be40433bf Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 5 Sep 2025 19:14:33 +0400 Subject: [PATCH 04/14] Use oxlint instead of eslint --- .eslintrc.json | 151 ---------------------------------------- .oxlintrc.json | 96 +++++++++++++++++++++++++ examples/.oxlintrc.json | 106 ++++++++++++++++++++++++++++ package.json | 2 +- 4 files changed, 203 insertions(+), 152 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 .oxlintrc.json create mode 100644 examples/.oxlintrc.json diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index cef9a77..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "root": true, - "parserOptions": { - "ecmaVersion": 9, - "ecmaFeatures": { - "jsx": true - }, - "sourceType": "module", - "allowImportExportEverywhere": false - }, - - "env": { - "es6": true, - "node": true - }, - - "globals": { - "document": false, - "navigator": false, - "window": false, - "location": false, - "URL": false, - "URLSearchParams": false, - "fetch": false, - "EventSource": false, - "localStorage": false, - "sessionStorage": false, - "BigInt": false - }, - - "rules": { - "accessor-pairs": 2, - "arrow-spacing": [2, {"before": true, "after": true}], - "block-spacing": [2, "always"], - "brace-style": [2, "1tbs", {"allowSingleLine": true}], - "comma-dangle": 0, - "comma-spacing": [2, {"before": false, "after": true}], - "comma-style": [2, "last"], - "constructor-super": 2, - "curly": [0, "multi-line"], - "dot-location": [2, "property"], - "eol-last": 2, - "eqeqeq": [2, "allow-null"], - "generator-star-spacing": [2, {"before": true, "after": true}], - "handle-callback-err": [2, "^(err|error)$"], - "indent": 0, - "jsx-quotes": [2, "prefer-double"], - "key-spacing": [2, {"beforeColon": false, "afterColon": true}], - "keyword-spacing": [2, {"before": true, "after": true}], - "new-cap": 0, - "new-parens": 0, - "no-array-constructor": 2, - "no-caller": 2, - "no-class-assign": 2, - "no-cond-assign": 2, - "no-const-assign": 2, - "no-control-regex": 0, - "no-debugger": 0, - "no-delete-var": 2, - "no-dupe-args": 2, - "no-dupe-class-members": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-empty-character-class": 2, - "no-empty-pattern": 2, - "no-eval": 0, - "no-ex-assign": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-extra-boolean-cast": 2, - "no-extra-parens": [2, "functions"], - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-func-assign": 2, - "no-implied-eval": 2, - "no-inner-declarations": [0, "functions"], - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-iterator": 2, - "no-label-var": 2, - "no-labels": [2, {"allowLoop": false, "allowSwitch": false}], - "no-lone-blocks": 2, - "no-mixed-spaces-and-tabs": 2, - "no-multi-spaces": 2, - "no-multi-str": 2, - "no-multiple-empty-lines": [2, {"max": 2}], - "no-native-reassign": 2, - "no-negated-in-lhs": 2, - "no-new": 0, - "no-new-func": 2, - "no-new-object": 2, - "no-new-require": 2, - "no-new-symbol": 2, - "no-new-wrappers": 2, - "no-obj-calls": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-path-concat": 0, - "no-proto": 2, - "no-redeclare": 2, - "no-regex-spaces": 2, - "no-return-assign": 0, - "no-self-assign": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-shadow-restricted-names": 2, - "no-spaced-func": 2, - "no-sparse-arrays": 2, - "no-this-before-super": 2, - "no-throw-literal": 2, - "no-trailing-spaces": 2, - "no-undef": 2, - "no-undef-init": 2, - "no-unexpected-multiline": 2, - "no-unneeded-ternary": [2, {"defaultAssignment": false}], - "no-unreachable": 2, - "no-unused-vars": [ - 2, - {"vars": "local", "args": "none", "varsIgnorePattern": "^_"} - ], - "no-useless-call": 2, - "no-useless-constructor": 2, - "no-with": 2, - "one-var": [0, {"initialized": "never"}], - "operator-linebreak": [ - 2, - "after", - {"overrides": {"?": "before", ":": "before"}} - ], - "padded-blocks": [2, "never"], - "quotes": [ - 2, - "single", - {"avoidEscape": true, "allowTemplateLiterals": true} - ], - "semi": [2, "never"], - "semi-spacing": [2, {"before": false, "after": true}], - "space-before-blocks": [2, "always"], - "space-before-function-paren": 0, - "space-in-parens": [2, "never"], - "space-infix-ops": 2, - "space-unary-ops": [2, {"words": true, "nonwords": false}], - "spaced-comment": 0, - "template-curly-spacing": [2, "never"], - "use-isnan": 2, - "valid-typeof": 2, - "wrap-iife": [2, "any"], - "yield-star-spacing": [2, "both"], - "yoda": [0] - } -} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..312a86c --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,96 @@ +{ + "plugins": [ + "import", + "jsdoc", + "node", + "oxc", + "promise", + "unicorn" + ], + "categories": { + "correctness": "warn", + "suspicious": "warn", + "perf": "warn", + "pedantic": "warn" + }, + "files": ["**/*.js"], + "rules": { + "eslint/array-callback-return": ["warn", { "checkForEach": true }], + "eslint/eqeqeq": ["warn", "always", {"null": "ignore"}], + "eslint/func-style": ["off", "expression"], + "eslint/guard-for-in": "warn", + "eslint/no-duplicate-imports": ["warn", { "includeExports": true }], + "eslint/no-empty": "warn", + "eslint/no-empty-function": "warn", + "eslint/no-iterator": "warn", + "eslint/no-lone-blocks": "warn", + "eslint/no-multi-assign": "warn", + "eslint/no-multi-str": "warn", + "eslint/no-nested-ternary": "warn", + "eslint/no-new-func": "warn", + "eslint/no-proto": "warn", + "eslint/no-return-assign": ["warn", "always"], + "eslint/no-script-url": "warn", + "eslint/no-unused-expressions": "warn", + "eslint/no-var": "warn", + "eslint/no-void": "warn", + "eslint/prefer-exponentiation-operator": "warn", + "eslint/prefer-numeric-literals": "warn", + "eslint/prefer-object-has-own": "warn", + "eslint/prefer-object-spread": "warn", + "eslint/prefer-spread": "warn", + "eslint/yoda": "warn", + "eslint/max-depth": "off", + "eslint/max-classes-per-file": "off", + "eslint/max-lines": "off", + "eslint/max-lines-per-function": "off", + "eslint/max-nested-callbacks": "off", + "eslint/new-cap": "off", + "eslint/radix": "off", + "import/consistent-type-specifier-style": "warn", + "import/exports-last": "warn", + "import/first": "warn", + "import/group-exports": "warn", + "import/no-amd": "warn", + "import/no-commonjs": "warn", + "import/no-cycle": "warn", + "import/no-dynamic-require": "warn", + "import/no-mutable-exports": "warn", + "import/no-named-default": "warn", + "import/no-webpack-loader-syntax": "warn", + "import/unambiguous": "warn", + "import/max-dependencies": "off", + "jsdoc/check-access": "warn", + "jsdoc/empty-tags": "warn", + "jsdoc/require-param-description": "off", + "jsdoc/require-returns-description": "off", + "node/no-new-require": "warn", + "oxc/bad-bitwise-operator": "warn", + "oxc/no-barrel-file": "warn", + "promise/prefer-await-to-callbacks": "warn", + "promise/prefer-await-to-then": "warn", + "promise/spec-only": "warn", + "unicorn/no-abusive-eslint-disable": "warn", + "unicorn/no-anonymous-default-export": "warn", + "unicorn/no-array-for-each": "warn", + "unicorn/no-array-method-this-argument": "warn", + "unicorn/no-array-reduce": "warn", + "unicorn/no-document-cookie": "warn", + "unicorn/no-for-loop": "warn", + "unicorn/no-length-as-slice-end": "warn", + "unicorn/no-nested-ternary": "warn", + "unicorn/prefer-array-index-of": "warn", + "unicorn/prefer-global-this": "warn", + "unicorn/prefer-modern-math-apis": "warn", + "unicorn/prefer-node-protocol": "warn", + "unicorn/prefer-number-properties": "warn", + "unicorn/prefer-object-from-entries": "warn" + }, + "env": { + "node": true, + "builtin": true + }, + "ignorePatterns": [ + "node_modules/*" + ] +} diff --git a/examples/.oxlintrc.json b/examples/.oxlintrc.json new file mode 100644 index 0000000..777d298 --- /dev/null +++ b/examples/.oxlintrc.json @@ -0,0 +1,106 @@ +{ + "plugins": [ + "import", + "jsdoc", + "jsx-a11y", + "node", + "oxc", + "promise", + "react", + "react-perf", + "unicorn" + ], + "categories": { + "correctness": "warn", + "suspicious": "warn", + "perf": "warn", + "pedantic": "warn" + }, + "files": ["**/*.js"], + "rules": { + "eslint/array-callback-return": ["warn", { "checkForEach": true }], + "eslint/eqeqeq": ["warn", "always", {"null": "ignore"}], + "eslint/func-style": ["off", "expression"], + "eslint/guard-for-in": "warn", + "eslint/no-duplicate-imports": ["warn", { "includeExports": true }], + "eslint/no-empty": "warn", + "eslint/no-empty-function": "warn", + "eslint/no-iterator": "warn", + "eslint/no-lone-blocks": "warn", + "eslint/no-multi-assign": "warn", + "eslint/no-multi-str": "warn", + "eslint/no-nested-ternary": "warn", + "eslint/no-new-func": "warn", + "eslint/no-proto": "warn", + "eslint/no-return-assign": ["warn", "always"], + "eslint/no-script-url": "warn", + "eslint/no-unused-expressions": "warn", + "eslint/no-var": "warn", + "eslint/no-void": "warn", + "eslint/prefer-exponentiation-operator": "warn", + "eslint/prefer-numeric-literals": "warn", + "eslint/prefer-object-has-own": "warn", + "eslint/prefer-object-spread": "warn", + "eslint/prefer-spread": "warn", + "eslint/yoda": "warn", + "eslint/max-depth": "off", + "eslint/max-classes-per-file": "off", + "eslint/max-lines": "off", + "eslint/max-lines-per-function": "off", + "eslint/max-nested-callbacks": "off", + "eslint/new-cap": "off", + "eslint/radix": "off", + "import/consistent-type-specifier-style": "warn", + "import/exports-last": "warn", + "import/first": "warn", + "import/group-exports": "warn", + "import/no-amd": "warn", + "import/no-commonjs": "warn", + "import/no-cycle": "warn", + "import/no-dynamic-require": "warn", + "import/no-mutable-exports": "warn", + "import/no-named-default": "warn", + "import/no-webpack-loader-syntax": "warn", + "import/unambiguous": "warn", + "import/max-dependencies": "off", + "jsdoc/check-access": "warn", + "jsdoc/empty-tags": "warn", + "jsdoc/require-param-description": "off", + "jsdoc/require-returns-description": "off", + "node/no-new-require": "warn", + "oxc/bad-bitwise-operator": "warn", + "oxc/no-barrel-file": "warn", + "promise/prefer-await-to-callbacks": "warn", + "promise/prefer-await-to-then": "warn", + "promise/spec-only": "warn", + "react/button-has-type": "warn", + "react/no-danger": "warn", + "react/no-unknown-property": "warn", + "react/require-render-return": "warn", + "react/prefer-es6-class": "warn", + "react/self-closing-comp": "warn", + "unicorn/no-abusive-eslint-disable": "warn", + "unicorn/no-anonymous-default-export": "warn", + "unicorn/no-array-for-each": "warn", + "unicorn/no-array-method-this-argument": "warn", + "unicorn/no-array-reduce": "warn", + "unicorn/no-document-cookie": "warn", + "unicorn/no-for-loop": "warn", + "unicorn/no-length-as-slice-end": "warn", + "unicorn/no-nested-ternary": "warn", + "unicorn/prefer-array-index-of": "warn", + "unicorn/prefer-global-this": "warn", + "unicorn/prefer-modern-math-apis": "warn", + "unicorn/prefer-node-protocol": "warn", + "unicorn/prefer-number-properties": "warn", + "unicorn/prefer-object-from-entries": "warn" + }, + "env": { + "builtin": true, + "browser": true, + "node": true + }, + "ignorePatterns": [ + "node_modules/*" + ] +} diff --git a/package.json b/package.json index 0b23a5b..06d3a73 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@scure/base": "2.0.0" }, "devDependencies": { - "eslint": "^8.0.0", + "oxlint": "^1.14.0", "prettier": "^3.6.2" } } From 8b7b8b1439c23d4788d816f8db2d18e5f5e20edb Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 5 Sep 2025 20:20:57 +0400 Subject: [PATCH 05/14] Example: Convert to ESM, upgrade React to 19, esbuild to 0.25.9 etc. --- examples/build.js | 11 +++++------ examples/demo.jsx | 5 +++-- examples/example.js | 4 +++- examples/package.json | 18 +++++++++++------- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/examples/build.js b/examples/build.js index 52bf337..5802dcc 100755 --- a/examples/build.js +++ b/examples/build.js @@ -1,18 +1,17 @@ #!/usr/bin/env node +import esbuild from 'esbuild' +import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill' -const esbuild = require('esbuild') -const nodeGlobals = require('@esbuild-plugins/node-globals-polyfill').default - -esbuild +await esbuild .build({ entryPoints: ['demo.jsx'], outfile: 'demo.build.js', bundle: true, - plugins: [nodeGlobals({buffer: true})], + plugins: [NodeGlobalsPolyfillPlugin({buffer: true})], define: { window: 'self', global: 'self' }, sourcemap: 'inline' }) - .then(() => console.log('build success.')) +console.log('build success.') diff --git a/examples/demo.jsx b/examples/demo.jsx index 501d216..cb6cac6 100644 --- a/examples/demo.jsx +++ b/examples/demo.jsx @@ -1,6 +1,6 @@ import {decode} from 'light-bolt11-decoder' import React, {useState} from 'react' -import {render} from 'react-dom' +import {createRoot} from 'react-dom/client' import useComputedState from 'use-computed-state' import styled, {css} from 'styled-components' @@ -118,4 +118,5 @@ function Demo() { ) } -render(, document.getElementById('main')) +const root = createRoot(document.getElementById('main')) +root.render() diff --git a/examples/example.js b/examples/example.js index 3f2f751..d4635e6 100644 --- a/examples/example.js +++ b/examples/example.js @@ -1,5 +1,7 @@ +import {decode} from '../bolt11.js' + let pr = 'lnbc20u1p3y0x3hpp5743k2g0fsqqxj7n8qzuhns5gmkk4djeejk3wkp64ppevgekvc0jsdqcve5kzar2v9nr5gpqd4hkuetesp5ez2g297jduwc20t6lmqlsg3man0vf2jfd8ar9fh8fhn2g8yttfkqxqy9gcqcqzys9qrsgqrzjqtx3k77yrrav9hye7zar2rtqlfkytl094dsp0ms5majzth6gt7ca6uhdkxl983uywgqqqqlgqqqvx5qqjqrzjqd98kxkpyw0l9tyy8r8q57k7zpy9zjmh6sez752wj6gcumqnj3yxzhdsmg6qq56utgqqqqqqqqqqqeqqjq7jd56882gtxhrjm03c93aacyfy306m4fq0tskf83c0nmet8zc2lxyyg3saz8x6vwcp26xnrlagf9semau3qm2glysp7sv95693fphvsp54l567' -let d = require('..').decode(pr) +let d = decode(pr) console.log(d) diff --git a/examples/package.json b/examples/package.json index 1f87547..6d1ef50 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,12 +1,16 @@ { + "type": "module", "dependencies": { - "@esbuild-plugins/node-globals-polyfill": "^0.1.1", + "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "buffer": "^6.0.3", - "esbuild": "^0.14.36", - "light-bolt11-decoder": "^2.0.0", - "react": "^18.0.0", - "react-dom": "^18.0.0", - "styled-components": "^5.3.5", - "use-computed-state": "^1.1.0" + "esbuild": "^0.25.9", + "light-bolt11-decoder": "3.2.0", + "react": "^19.1.1", + "react-dom": "^19.1.1", + "styled-components": "^6.1.19", + "use-computed-state": "^1.2.0" + }, + "scripts": { + "build": "node build.js" } } From db4751f18dbfbe068e769757c041da2ffc14f175 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 1 Dec 2025 06:33:20 +0700 Subject: [PATCH 06/14] Replace ts types with JSDoc --- bolt11.d.ts | 89 ---------------------------------------- bolt11.js | 110 +++++++++++++++++++++++++++++++++++++++++++++++--- package.json | 1 - tsconfig.json | 1 - 4 files changed, 105 insertions(+), 96 deletions(-) delete mode 100644 bolt11.d.ts delete mode 100644 tsconfig.json diff --git a/bolt11.d.ts b/bolt11.d.ts deleted file mode 100644 index 74fd82a..0000000 --- a/bolt11.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -declare module "light-bolt11-decoder" { - type NetworkSection = { - name: 'coin_network'; - letters: string; - value?: { - bech32: string; - pubKeyHash: number; - scriptHash: number; - validWitnessVersions: number[]; - }; - }; - - type FeatureBits = { - option_data_loss_protect: string; - initial_routing_sync: string; - option_upfront_shutdown_script: string; - gossip_queries: string; - var_onion_optin: string; - gossip_queries_ex: string; - option_static_remotekey: string; - payment_secret: string; - basic_mpp: string; - option_support_large_channel: string; - extra_bits: { - start_bit: number; - bits: unknown[]; - has_required: boolean; - }; - }; - - type RouteHint = { - pubkey: string; - short_channel_id: string; - fee_base_msat: number; - fee_proportional_millionths: number; - cltv_expiry_delta: number; - }; - - type RouteHintSection = { - name: "route_hint"; - tag: "r"; - letters: string; - value: RouteHint[]; - }; - - type FeatureBitsSection = { - name: "feature_bits"; - tag: "9"; - letters: string; - value: FeatureBits; - }; - - type Section = - | { name: "paymentRequest"; value: string } - | { name: "expiry"; value: number } - | { name: "checksum"; letters: string } - | NetworkSection - | { name: "amount"; letters: string; value: string } - | { name: "separator"; letters: string } - | { name: "timestamp"; letters: string; value: number } - | { name: "payment_hash"; tag: "p"; letters: string; value: string } - | { name: "description"; tag: "d"; letters: string; value: string } - | { name: "payment_secret"; tag: "s"; letters: string; value: string } - | { - name: "min_final_cltv_expiry"; - tag: "c"; - letters: string; - value: number; - } - | FeatureBitsSection - | RouteHintSection - | { name: "signature"; letters: string; value: string }; - - type PaymentJSON = { - paymentRequest: string; - sections: Section[]; - expiry: number; - route_hints: RouteHint[][]; - }; - - type DecodedInvoice = { - paymentRequest: string; - sections: Section[]; - expiry: number; - route_hints: RouteHint[][]; - }; - - function decode(invoice: string): DecodedInvoice; -} diff --git a/bolt11.js b/bolt11.js index 773b72c..b868cc3 100644 --- a/bolt11.js +++ b/bolt11.js @@ -1,6 +1,66 @@ import {bech32, hex, utf8} from '@scure/base' +/** + * + * @typedef {{bech32: string, pubKeyHash: number, scriptHash: number, validWitnessVersions: number[]}} Network + * + * @typedef {{ + * name: 'coin_network', + * letters: string, + * value?: Network + * }} NetworkSection + * + * @typedef {{ + * option_data_loss_protect: string, + * initial_routing_sync: string, + * option_upfront_shutdown_script: string, + * gossip_queries: string, + * var_onion_optin: string, + * gossip_queries_ex: string, + * option_static_remotekey: string, + * payment_secret: string, + * basic_mpp: string, + * option_support_large_channel: string, + * extra_bits: { + * start_bit: number, + * bits: unknown[], + * has_required: boolean + * } + * }} FeatureBits + * + * @typedef {{ pubkey: string, short_channel_id: string, fee_base_msat: number, fee_proportional_millionths: number, cltv_expiry_delta: number }} RouteHint + * @typedef {{ name: "route_hint", tag: "r", letters: string, value: RouteHint[] }} RouteHintSection + * @typedef {{ name: "feature_bits", tag: "9", letters: string, value: FeatureBits }} FeatureBitsSection + * + * @typedef { + * | { name: "paymentRequest", value: string } + * | { name: "expiry", value: number } + * | { name: "checksum", letters: string } + * | NetworkSection + * | { name: "amount", letters: string; value: string } + * | { name: "separator", letters: string } + * | { name: "timestamp", letters: string, value: number } + * | { name: "payment_hash", tag: "p", letters: string, value: string } + * | { name: "description", tag: "d", letters: string, value: string } + * | { name: "payment_secret", tag: "s", letters: string, value: string } + * | { + * name: "min_final_cltv_expiry", + * tag: "c", + * letters: string, + * value: number + * } + * | FeatureBitsSection + * | RouteHintSection + * | { name: "signature", letters: string, value: string } + * | { name: "lightning_network", letters: string } + * } Section + * + * @typedef {{ paymentRequest: string, sections: Section[], expiry: number, route_hints: RouteHint[][] }} DecodedInvoice + * + */ + // defaults for encode; default timestamp is current time at call +/** @type {Network} */ const DEFAULTNETWORK = { // default network is bitcoin bech32: 'bc', @@ -8,31 +68,35 @@ const DEFAULTNETWORK = { scriptHash: 0x05, validWitnessVersions: [0] } +/** @type {Network} */ const TESTNETWORK = { bech32: 'tb', pubKeyHash: 0x6f, scriptHash: 0xc4, validWitnessVersions: [0] } +/** @type {Network} */ const SIGNETNETWORK = { bech32: 'tbs', pubKeyHash: 0x6f, scriptHash: 0xc4, validWitnessVersions: [0] } +/** @type {Network} */ const REGTESTNETWORK = { bech32: 'bcrt', pubKeyHash: 0x6f, scriptHash: 0xc4, validWitnessVersions: [0] } +/** @type {Network} */ const SIMNETWORK = { bech32: 'sb', pubKeyHash: 0x3f, scriptHash: 0x7b, validWitnessVersions: [0] } - +/** @type {string[]} */ const FEATUREBIT_ORDER = [ 'option_data_loss_protect', 'initial_routing_sync', @@ -92,6 +156,11 @@ const TAGPARSERS = { 5: featureBitsParser // keep feature bits as array of 5 bit words } +/** + * + * @param {string} tagCode + * @returns {function(*): {tagCode: number, words: `unknown1${string}`}} + */ function getUnknownParser(tagCode) { return words => ({ tagCode: parseInt(tagCode), @@ -99,14 +168,23 @@ function getUnknownParser(tagCode) { }) } +/** + * + * @param {number[]} words + * @returns {*} + */ function wordsToIntBE(words) { return words.reverse().reduce((total, item, index) => { return total + item * Math.pow(32, index) }, 0) } -// first convert from words to buffer, trimming padding where necessary -// parse in 51 byte chunks. See encoder for details. +/** + * First convert from words to buffer, trimming padding where necessary + * parse in 51 byte chunks. See encoder for details. + * @param {number[]} words + * @returns {*[]} + */ function routingInfoParser(words) { const routes = [] let pubkey, @@ -138,6 +216,11 @@ function routingInfoParser(words) { return routes } +/** + * + * @param {Uint8Array} words + * @returns {{}} + */ function featureBitsParser(words) { const bools = words .slice() @@ -182,6 +265,12 @@ function featureBitsParser(words) { return featureBits } +/** + * + * @param {string} hrpString + * @param {boolean} outputString + * @returns {string|bigint} + */ function hrpToMillisat(hrpString, outputString) { let divisor, value if (hrpString.slice(-1).match(/^[munp]$/)) { @@ -212,14 +301,20 @@ function hrpToMillisat(hrpString, outputString) { return outputString ? millisatoshisBN.toString() : millisatoshisBN } -// decode will only have extra comments that aren't covered in encode comments. -// also if anything is hard to read I'll comment. +/** + * Decode will only have extra comments that aren't covered in encode comments. + * Also, if anything is hard to read I'll comment. + * @param {string} paymentRequest + * @param {Network=} network + * @returns {DecodedInvoice} + */ function decode(paymentRequest, network) { if (typeof paymentRequest !== 'string') throw new Error('Lightning Payment Request must be string') if (paymentRequest.slice(0, 2).toLowerCase() !== 'ln') throw new Error('Not a proper lightning payment request') + /** @type {Section[]} */ const sections = [] const decoded = bech32.decode(paymentRequest, Number.MAX_SAFE_INTEGER) paymentRequest = paymentRequest.toLowerCase() @@ -385,6 +480,11 @@ function decode(paymentRequest, network) { return result + /** + * + * @param {string} name + * @returns {*|undefined} + */ function getValue(name) { let section = sections.find(s => s.name === name) return section ? section.value : undefined diff --git a/package.json b/package.json index 06d3a73..2413dd0 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "type": "module", "description": "decode lightning invoices without overhead (doesn't check signatures).", "main": "bolt11.js", - "types": "bolt11.d.ts", "repository": { "type": "git", "url": "git+https://github.com/fiatjaf/light-bolt11-decoder.git" diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 0967ef4..0000000 --- a/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -{} From d80d86757749c2fde6c435209a073088343f4dc7 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 1 Dec 2025 06:34:48 +0700 Subject: [PATCH 07/14] Remove buffer polyfill --- examples/build.js | 2 -- examples/package.json | 2 -- 2 files changed, 4 deletions(-) diff --git a/examples/build.js b/examples/build.js index 5802dcc..2e06e2c 100755 --- a/examples/build.js +++ b/examples/build.js @@ -1,13 +1,11 @@ #!/usr/bin/env node import esbuild from 'esbuild' -import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill' await esbuild .build({ entryPoints: ['demo.jsx'], outfile: 'demo.build.js', bundle: true, - plugins: [NodeGlobalsPolyfillPlugin({buffer: true})], define: { window: 'self', global: 'self' diff --git a/examples/package.json b/examples/package.json index 6d1ef50..64809bd 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,8 +1,6 @@ { "type": "module", "dependencies": { - "@esbuild-plugins/node-globals-polyfill": "^0.2.3", - "buffer": "^6.0.3", "esbuild": "^0.25.9", "light-bolt11-decoder": "3.2.0", "react": "^19.1.1", From 3b797b44bd3e7f483e6fabfb15d21cf68ab0b932 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 1 Dec 2025 06:35:11 +0700 Subject: [PATCH 08/14] Upgrade packages --- examples/package.json | 6 +++--- package.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/package.json b/examples/package.json index 64809bd..ccf0813 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,10 +1,10 @@ { "type": "module", "dependencies": { - "esbuild": "^0.25.9", + "esbuild": "^0.27.0", "light-bolt11-decoder": "3.2.0", - "react": "^19.1.1", - "react-dom": "^19.1.1", + "react": "^19.2.0", + "react-dom": "^19.2.0", "styled-components": "^6.1.19", "use-computed-state": "^1.2.0" }, diff --git a/package.json b/package.json index 2413dd0..b80b122 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@scure/base": "2.0.0" }, "devDependencies": { - "oxlint": "^1.14.0", - "prettier": "^3.6.2" + "oxlint": "^1.30.0", + "prettier": "^3.7.3" } } From 95e26a987d141415b8d21991159d3c6ef4627480 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 1 Dec 2025 06:36:24 +0700 Subject: [PATCH 09/14] Fix lint issues --- bolt11.js | 97 +++++++++++++++++++++------------------------ examples/demo.jsx | 4 +- examples/index.html | 2 +- 3 files changed, 49 insertions(+), 54 deletions(-) diff --git a/bolt11.js b/bolt11.js index b868cc3..c402a85 100644 --- a/bolt11.js +++ b/bolt11.js @@ -163,7 +163,7 @@ const TAGPARSERS = { */ function getUnknownParser(tagCode) { return words => ({ - tagCode: parseInt(tagCode), + tagCode: Number.parseInt(tagCode), words: bech32.encode('unknown', words, Number.MAX_SAFE_INTEGER) }) } @@ -174,9 +174,7 @@ function getUnknownParser(tagCode) { * @returns {*} */ function wordsToIntBE(words) { - return words.reverse().reduce((total, item, index) => { - return total + item * Math.pow(32, index) - }, 0) + return words.toReversed().reduce((total, item, index) => total + item * (32**index), 0) } /** @@ -187,21 +185,21 @@ function wordsToIntBE(words) { */ function routingInfoParser(words) { const routes = [] - let pubkey, - shortChannelId, - feeBaseMSats, - feeProportionalMillionths, - cltvExpiryDelta + let pubkey + let shortChannelId + let feeBaseMSats + let feeProportionalMillionths + let cltvExpiryDelta let routesBuffer = bech32.fromWordsUnsafe(words) while (routesBuffer.length > 0) { pubkey = hex.encode(routesBuffer.slice(0, 33)) // 33 bytes shortChannelId = hex.encode(routesBuffer.slice(33, 41)) // 8 bytes - feeBaseMSats = parseInt(hex.encode(routesBuffer.slice(41, 45)), 16) // 4 bytes - feeProportionalMillionths = parseInt( + feeBaseMSats = Number.parseInt(hex.encode(routesBuffer.slice(41, 45)), 16) // 4 bytes + feeProportionalMillionths = Number.parseInt( hex.encode(routesBuffer.slice(45, 49)), 16 ) // 4 bytes - cltvExpiryDelta = parseInt(hex.encode(routesBuffer.slice(49, 51)), 16) // 2 bytes + cltvExpiryDelta = Number.parseInt(hex.encode(routesBuffer.slice(49, 51)), 16) // 2 bytes routesBuffer = routesBuffer.slice(51) @@ -224,7 +222,7 @@ function routingInfoParser(words) { function featureBitsParser(words) { const bools = words .slice() - .reverse() + .toReversed() .map(word => [ !!(word & 0b1), !!(word & 0b10), @@ -233,23 +231,22 @@ function featureBitsParser(words) { !!(word & 0b10000) ]) .reduce((finalArr, itemArr) => finalArr.concat(itemArr), []) - while (bools.length < FEATUREBIT_ORDER.length * 2) { + while (bools.length < FEATUREBIT_ORDER.length * 2) bools.push(false) - } const featureBits = {} - FEATUREBIT_ORDER.forEach((featureName, index) => { + for (const featureName of FEATUREBIT_ORDER) { + const index = FEATUREBIT_ORDER.indexOf(featureName); let status - if (bools[index * 2]) { + if (bools[index * 2]) status = 'required' - } else if (bools[index * 2 + 1]) { + else if (bools[index * 2 + 1]) status = 'supported' - } else { + else status = 'unsupported' - } featureBits[featureName] = status - }) + } const extraBits = bools.slice(FEATUREBIT_ORDER.length * 2) featureBits.extra_bits = { @@ -257,7 +254,7 @@ function featureBitsParser(words) { bits: extraBits, has_required: extraBits.reduce( (result, bit, index) => - index % 2 !== 0 ? result || false : result || bit, + index % 2 === 0 ? result || bit : result || false, false ) } @@ -273,16 +270,15 @@ function featureBitsParser(words) { */ function hrpToMillisat(hrpString, outputString) { let divisor, value - if (hrpString.slice(-1).match(/^[munp]$/)) { + if (/^[munp]$/.test(hrpString.slice(-1))) { divisor = hrpString.slice(-1) value = hrpString.slice(0, -1) - } else if (hrpString.slice(-1).match(/^[^munp0-9]$/)) { + } else if (/^[^munp0-9]$/.test(hrpString.slice(-1))) throw new Error('Not a valid multiplier for the amount') - } else { + else value = hrpString - } - if (!value.match(/^\d+$/)) + if (!/^\d+$/.test(value)) throw new Error('Not a valid human readable amount') const valueBN = BigInt(value) @@ -294,9 +290,8 @@ function hrpToMillisat(hrpString, outputString) { if ( (divisor === 'p' && !(valueBN % BigInt(10) === BigInt(0))) || millisatoshisBN > MAX_MILLISATS - ) { + ) throw new Error('Amount is outside of valid range') - } return outputString ? millisatoshisBN.toString() : millisatoshisBN } @@ -317,14 +312,14 @@ function decode(paymentRequest, network) { /** @type {Section[]} */ const sections = [] const decoded = bech32.decode(paymentRequest, Number.MAX_SAFE_INTEGER) - paymentRequest = paymentRequest.toLowerCase() + const paymentRequest_lower = paymentRequest.toLowerCase() const prefix = decoded.prefix let words = decoded.words - let letters = paymentRequest.slice(prefix.length + 1) + let letters = paymentRequest_lower.slice(prefix.length + 1) let sigWords = words.slice(-104) words = words.slice(0, -104) - // Without reverse lookups, can't say that the multipier at the end must + // Without reverse lookups, can't say that the multiplier at the end must // have a number before it, so instead we parse, and if the second group // doesn't have anything, there's a good chance the last letter of the // coin type got captured by the third group, so just re-regex without @@ -332,9 +327,8 @@ function decode(paymentRequest, network) { let prefixMatches = prefix.match(/^ln(\S+?)(\d*)([a-zA-Z]?)$/) if (prefixMatches && !prefixMatches[2]) prefixMatches = prefix.match(/^ln(\S+)$/) - if (!prefixMatches) { + if (!prefixMatches) throw new Error('Not a proper lightning payment request') - } // "ln" section sections.push({ @@ -345,7 +339,16 @@ function decode(paymentRequest, network) { // "bc" section const bech32Prefix = prefixMatches[1] let coinNetwork - if (!network) { + if (network) { + if ( + network.bech32 === undefined || + network.pubKeyHash === undefined || + network.scriptHash === undefined || + !Array.isArray(network.validWitnessVersions) + ) + throw new Error('Invalid network') + coinNetwork = network + } else { switch (bech32Prefix) { case DEFAULTNETWORK.bech32: coinNetwork = DEFAULTNETWORK @@ -363,19 +366,10 @@ function decode(paymentRequest, network) { coinNetwork = SIMNETWORK break } - } else { - if ( - network.bech32 === undefined || - network.pubKeyHash === undefined || - network.scriptHash === undefined || - !Array.isArray(network.validWitnessVersions) - ) - throw new Error('Invalid network') - coinNetwork = network } - if (!coinNetwork || coinNetwork.bech32 !== bech32Prefix) { + if (!coinNetwork || coinNetwork.bech32 !== bech32Prefix) throw new Error('Unknown coin bech32 prefix') - } + sections.push({ name: 'coin_network', letters: bech32Prefix, @@ -393,9 +387,8 @@ function decode(paymentRequest, network) { letters: prefixMatches[2] + prefixMatches[3], value: millisatoshis }) - } else { + } else millisatoshis = null - } // "1" separator sections.push({ @@ -413,7 +406,10 @@ function decode(paymentRequest, network) { }) letters = letters.slice(7) - let tagName, parser, tagLength, tagWords + let tagName + let parser + let tagLength + let tagWords // we have no tag count to go on, so just keep hacking off words // until we have none. while (words.length > 0) { @@ -466,10 +462,9 @@ function decode(paymentRequest, network) { } for (let name in TAGCODES) { - if (name === 'route_hint') { + if (name === 'route_hint') // route hints can be multiple, so this won't work for them continue - } Object.defineProperty(result, name, { get() { diff --git a/examples/demo.jsx b/examples/demo.jsx index cb6cac6..5f45894 100644 --- a/examples/demo.jsx +++ b/examples/demo.jsx @@ -2,7 +2,7 @@ import {decode} from 'light-bolt11-decoder' import React, {useState} from 'react' import {createRoot} from 'react-dom/client' import useComputedState from 'use-computed-state' -import styled, {css} from 'styled-components' +import {styled, css} from 'styled-components' const TAGCOLORS = { lightning_network: 'rgb(31, 31, 40)', @@ -118,5 +118,5 @@ function Demo() { ) } -const root = createRoot(document.getElementById('main')) +const root = createRoot(document.querySelector('#main')) root.render() diff --git a/examples/index.html b/examples/index.html index 4add832..45c0329 100644 --- a/examples/index.html +++ b/examples/index.html @@ -3,6 +3,6 @@ bolt11 demo -
+
From d8a873f1a26f1b6270c4484d587f0493f0a5909f Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 1 Dec 2025 06:55:01 +0700 Subject: [PATCH 10/14] Change from esbuild to rolldown Add lint to scripts Small spelling fix --- README.md | 2 +- examples/build.js | 15 --------------- examples/package.json | 7 +++++-- package.json | 3 ++- 4 files changed, 8 insertions(+), 19 deletions(-) delete mode 100755 examples/build.js diff --git a/README.md b/README.md index 242eb58..f2b2860 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A lightweight and naïve library for decoding lightning network payment requests It doesn't recover payee from signature, doesn't check signature, doesn't parse fallback addresses and doesn't do any encoding -- therefore dependencies are very minimal (no libsecp256k1 here). -Code derived from [bolt11](https://npmjs.com/package/bolt11), which has the full functionality but it's a pain to run in browsers. +Code derived from [bolt11](https://npmjs.com/package/bolt11), which has the full functionality, but it's a pain to run in browsers. Spits out "sections" of the invoice, in a way that is used to make visualizations like https://bolt11.org/. diff --git a/examples/build.js b/examples/build.js deleted file mode 100755 index 2e06e2c..0000000 --- a/examples/build.js +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env node -import esbuild from 'esbuild' - -await esbuild - .build({ - entryPoints: ['demo.jsx'], - outfile: 'demo.build.js', - bundle: true, - define: { - window: 'self', - global: 'self' - }, - sourcemap: 'inline' - }) -console.log('build success.') diff --git a/examples/package.json b/examples/package.json index ccf0813..679db98 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,14 +1,17 @@ { "type": "module", "dependencies": { - "esbuild": "^0.27.0", "light-bolt11-decoder": "3.2.0", "react": "^19.2.0", "react-dom": "^19.2.0", "styled-components": "^6.1.19", "use-computed-state": "^1.2.0" }, + "devDependencies": { + "rolldown": "^1.0.0-beta.52" + }, "scripts": { - "build": "node build.js" + "build": "rolldown demo.jsx --file demo.build.js", + "lint": "oxlint" } } diff --git a/package.json b/package.json index b80b122..b013588 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "author": "fiatjaf", "license": "MIT", "scripts": { - "test": "node --test --experimental-test-coverage tests/basic.test.js" + "test": "node --test --experimental-test-coverage tests/basic.test.js", + "lint": "oxlint" }, "dependencies": { "@scure/base": "2.0.0" From 3fa35ae36664277325480f872ac3ec7013407889 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 1 Dec 2025 09:16:01 +0700 Subject: [PATCH 11/14] Add pnpm-lock.yaml files --- examples/pnpm-lock.yaml | 396 ++++++++++++++++++++++++++++++++++++++++ pnpm-lock.yaml | 125 +++++++++++++ 2 files changed, 521 insertions(+) create mode 100644 examples/pnpm-lock.yaml create mode 100644 pnpm-lock.yaml diff --git a/examples/pnpm-lock.yaml b/examples/pnpm-lock.yaml new file mode 100644 index 0000000..cbe9c5d --- /dev/null +++ b/examples/pnpm-lock.yaml @@ -0,0 +1,396 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + light-bolt11-decoder: + specifier: 3.2.0 + version: 3.2.0 + react: + specifier: ^19.2.0 + version: 19.2.0 + react-dom: + specifier: ^19.2.0 + version: 19.2.0(react@19.2.0) + styled-components: + specifier: ^6.1.19 + version: 6.1.19(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + use-computed-state: + specifier: ^1.2.0 + version: 1.2.0 + devDependencies: + rolldown: + specifier: ^1.0.0-beta.52 + version: 1.0.0-beta.52 + +packages: + + '@emnapi/core@1.7.1': + resolution: {integrity: sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==} + + '@emnapi/runtime@1.7.1': + resolution: {integrity: sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==} + + '@emnapi/wasi-threads@1.1.0': + resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} + + '@emotion/is-prop-valid@1.2.2': + resolution: {integrity: sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==} + + '@emotion/memoize@0.8.1': + resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} + + '@emotion/unitless@0.8.1': + resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} + + '@napi-rs/wasm-runtime@1.0.7': + resolution: {integrity: sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==} + + '@oxc-project/types@0.99.0': + resolution: {integrity: sha512-LLDEhXB7g1m5J+woRSgfKsFPS3LhR9xRhTeIoEBm5WrkwMxn6eZ0Ld0c0K5eHB57ChZX6I3uSmmLjZ8pcjlRcw==} + + '@rolldown/binding-android-arm64@1.0.0-beta.52': + resolution: {integrity: sha512-MBGIgysimZPqTDcLXI+i9VveijkP5C3EAncEogXhqfax6YXj1Tr2LY3DVuEOMIjWfMPMhtQSPup4fSTAmgjqIw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.0.0-beta.52': + resolution: {integrity: sha512-MmKeoLnKu1d9j6r19K8B+prJnIZ7u+zQ+zGQ3YHXGnr41rzE3eqQLovlkvoZnRoxDGPA4ps0pGiwXy6YE3lJyg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.0.0-beta.52': + resolution: {integrity: sha512-qpHedvQBmIjT8zdnjN3nWPR2qjQyJttbXniCEKKdHeAbZG9HyNPBUzQF7AZZGwmS9coQKL+hWg9FhWzh2dZ2IA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.0.0-beta.52': + resolution: {integrity: sha512-dDp7WbPapj/NVW0LSiH/CLwMhmLwwKb3R7mh2kWX+QW85X1DGVnIEyKh9PmNJjB/+suG1dJygdtdNPVXK1hylg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.52': + resolution: {integrity: sha512-9e4l6vy5qNSliDPqNfR6CkBOAx6PH7iDV4OJiEJzajajGrVy8gc/IKKJUsoE52G8ud8MX6r3PMl97NfwgOzB7g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.52': + resolution: {integrity: sha512-V48oDR84feRU2KRuzpALp594Uqlx27+zFsT6+BgTcXOtu7dWy350J1G28ydoCwKB+oxwsRPx2e7aeQnmd3YJbQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.52': + resolution: {integrity: sha512-ENLmSQCWqSA/+YN45V2FqTIemg7QspaiTjlm327eUAMeOLdqmSOVVyrQexJGNTQ5M8sDYCgVAig2Kk01Ggmqaw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.52': + resolution: {integrity: sha512-klahlb2EIFltSUubn/VLjuc3qxp1E7th8ukayPfdkcKvvYcQ5rJztgx8JsJSuAKVzKtNTqUGOhy4On71BuyV8g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.0.0-beta.52': + resolution: {integrity: sha512-UuA+JqQIgqtkgGN2c/AQ5wi8M6mJHrahz/wciENPTeI6zEIbbLGoth5XN+sQe2pJDejEVofN9aOAp0kaazwnVg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.0.0-beta.52': + resolution: {integrity: sha512-1BNQW8u4ro8bsN1+tgKENJiqmvc+WfuaUhXzMImOVSMw28pkBKdfZtX2qJPADV3terx+vNJtlsgSGeb3+W6Jiw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.0.0-beta.52': + resolution: {integrity: sha512-K/p7clhCqJOQpXGykrFaBX2Dp9AUVIDHGc+PtFGBwg7V+mvBTv/tsm3LC3aUmH02H2y3gz4y+nUTQ0MLpofEEg==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.52': + resolution: {integrity: sha512-a4EkXBtnYYsKipjS7QOhEBM4bU5IlR9N1hU+JcVEVeuTiaslIyhWVKsvf7K2YkQHyVAJ+7/A9BtrGqORFcTgng==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.52': + resolution: {integrity: sha512-5ZXcYyd4GxPA6QfbGrNcQjmjbuLGvfz6728pZMsQvGHI+06LT06M6TPtXvFvLgXtexc+OqvFe1yAIXJU1gob/w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.52': + resolution: {integrity: sha512-tzpnRQXJrSzb8Z9sm97UD3cY0toKOImx+xRKsDLX4zHaAlRXWh7jbaKBePJXEN7gNw7Nm03PBNwphdtA8KSUYQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.0-beta.52': + resolution: {integrity: sha512-/L0htLJZbaZFL1g9OHOblTxbCYIGefErJjtYOwgl9ZqNx27P3L0SDfjhhHIss32gu5NWgnxuT2a2Hnnv6QGHKA==} + + '@scure/base@1.1.1': + resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==} + + '@tybys/wasm-util@0.10.1': + resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} + + '@types/stylis@4.2.5': + resolution: {integrity: sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==} + + camelize@1.0.1: + resolution: {integrity: sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==} + + css-color-keywords@1.0.0: + resolution: {integrity: sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==} + engines: {node: '>=4'} + + css-to-react-native@3.2.0: + resolution: {integrity: sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==} + + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + + light-bolt11-decoder@3.2.0: + resolution: {integrity: sha512-3QEofgiBOP4Ehs9BI+RkZdXZNtSys0nsJ6fyGeSiAGCBsMwHGUDS/JQlY/sTnWs91A2Nh0S9XXfA8Sy9g6QpuQ==} + + nanoid@3.3.11: + resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + postcss-value-parser@4.2.0: + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + + postcss@8.4.49: + resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} + engines: {node: ^10 || ^12 || >=14} + + react-dom@19.2.0: + resolution: {integrity: sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==} + peerDependencies: + react: ^19.2.0 + + react@19.2.0: + resolution: {integrity: sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==} + engines: {node: '>=0.10.0'} + + rolldown@1.0.0-beta.52: + resolution: {integrity: sha512-Hbnpljue+JhMJrlOjQ1ixp9me7sUec7OjFvS+A1Qm8k8Xyxmw3ZhxFu7LlSXW1s9AX3POE9W9o2oqCEeR5uDmg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + scheduler@0.27.0: + resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} + + shallowequal@1.1.0: + resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + styled-components@6.1.19: + resolution: {integrity: sha512-1v/e3Dl1BknC37cXMhwGomhO8AkYmN41CqyX9xhUDxry1ns3BFQy2lLDRQXJRdVVWB9OHemv/53xaStimvWyuA==} + engines: {node: '>= 16'} + peerDependencies: + react: '>= 16.8.0' + react-dom: '>= 16.8.0' + + stylis@4.3.2: + resolution: {integrity: sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==} + + tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + + use-computed-state@1.2.0: + resolution: {integrity: sha512-V2xOQGKQdT8LkB523elxpBivrHweZFzCk+A6hpjf0gJyYxhDunSKkp+D/ofdsn8a5C49UwGr6FRBw9sS8wqHnw==} + +snapshots: + + '@emnapi/core@1.7.1': + dependencies: + '@emnapi/wasi-threads': 1.1.0 + tslib: 2.6.2 + optional: true + + '@emnapi/runtime@1.7.1': + dependencies: + tslib: 2.6.2 + optional: true + + '@emnapi/wasi-threads@1.1.0': + dependencies: + tslib: 2.6.2 + optional: true + + '@emotion/is-prop-valid@1.2.2': + dependencies: + '@emotion/memoize': 0.8.1 + + '@emotion/memoize@0.8.1': {} + + '@emotion/unitless@0.8.1': {} + + '@napi-rs/wasm-runtime@1.0.7': + dependencies: + '@emnapi/core': 1.7.1 + '@emnapi/runtime': 1.7.1 + '@tybys/wasm-util': 0.10.1 + optional: true + + '@oxc-project/types@0.99.0': {} + + '@rolldown/binding-android-arm64@1.0.0-beta.52': + optional: true + + '@rolldown/binding-darwin-arm64@1.0.0-beta.52': + optional: true + + '@rolldown/binding-darwin-x64@1.0.0-beta.52': + optional: true + + '@rolldown/binding-freebsd-x64@1.0.0-beta.52': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.52': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.52': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.52': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.52': + optional: true + + '@rolldown/binding-linux-x64-musl@1.0.0-beta.52': + optional: true + + '@rolldown/binding-openharmony-arm64@1.0.0-beta.52': + optional: true + + '@rolldown/binding-wasm32-wasi@1.0.0-beta.52': + dependencies: + '@napi-rs/wasm-runtime': 1.0.7 + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.52': + optional: true + + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.52': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.52': + optional: true + + '@rolldown/pluginutils@1.0.0-beta.52': {} + + '@scure/base@1.1.1': {} + + '@tybys/wasm-util@0.10.1': + dependencies: + tslib: 2.6.2 + optional: true + + '@types/stylis@4.2.5': {} + + camelize@1.0.1: {} + + css-color-keywords@1.0.0: {} + + css-to-react-native@3.2.0: + dependencies: + camelize: 1.0.1 + css-color-keywords: 1.0.0 + postcss-value-parser: 4.2.0 + + csstype@3.1.3: {} + + light-bolt11-decoder@3.2.0: + dependencies: + '@scure/base': 1.1.1 + + nanoid@3.3.11: {} + + picocolors@1.1.1: {} + + postcss-value-parser@4.2.0: {} + + postcss@8.4.49: + dependencies: + nanoid: 3.3.11 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + react-dom@19.2.0(react@19.2.0): + dependencies: + react: 19.2.0 + scheduler: 0.27.0 + + react@19.2.0: {} + + rolldown@1.0.0-beta.52: + dependencies: + '@oxc-project/types': 0.99.0 + '@rolldown/pluginutils': 1.0.0-beta.52 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.0.0-beta.52 + '@rolldown/binding-darwin-arm64': 1.0.0-beta.52 + '@rolldown/binding-darwin-x64': 1.0.0-beta.52 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.52 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.52 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.52 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.52 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.52 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.52 + '@rolldown/binding-openharmony-arm64': 1.0.0-beta.52 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.52 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.52 + '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.52 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.52 + + scheduler@0.27.0: {} + + shallowequal@1.1.0: {} + + source-map-js@1.2.1: {} + + styled-components@6.1.19(react-dom@19.2.0(react@19.2.0))(react@19.2.0): + dependencies: + '@emotion/is-prop-valid': 1.2.2 + '@emotion/unitless': 0.8.1 + '@types/stylis': 4.2.5 + css-to-react-native: 3.2.0 + csstype: 3.1.3 + postcss: 8.4.49 + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) + shallowequal: 1.1.0 + stylis: 4.3.2 + tslib: 2.6.2 + + stylis@4.3.2: {} + + tslib@2.6.2: {} + + use-computed-state@1.2.0: {} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..a5e6a89 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,125 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@scure/base': + specifier: 2.0.0 + version: 2.0.0 + devDependencies: + oxlint: + specifier: ^1.30.0 + version: 1.30.0 + prettier: + specifier: ^3.7.3 + version: 3.7.3 + +packages: + + '@oxlint/darwin-arm64@1.30.0': + resolution: {integrity: sha512-vIiTk1FBObXHvaG3WK/SpwCZP06fuHhSrn8mK2hEs2uSFWG63WgvLAHSGhI4U1X29JGf36zhfUzuKirDIVdKBQ==} + cpu: [arm64] + os: [darwin] + + '@oxlint/darwin-x64@1.30.0': + resolution: {integrity: sha512-DP4ueul8Vza52gJX1/+jyXQjUsgjmPe4Pq5uYOVa8k2V8cKRb2JzBls+DugbeP7yzKNTmlSp3J2mUnHQXuntLA==} + cpu: [x64] + os: [darwin] + + '@oxlint/linux-arm64-gnu@1.30.0': + resolution: {integrity: sha512-1e9NvTvjzG6t1tnUzNU9HZTVwNwhZw2BDQxwIsXV743g54BIkvyZNNXOEGic/Jw4IuIXHzpX3ztVWZaSzvDopg==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxlint/linux-arm64-musl@1.30.0': + resolution: {integrity: sha512-szb5RB8Tbk756/z/GAdmUn+H1E2815BbcM7s6JZYQgyCJxR0RCL1yFXgKyz3BjIDqzR98Tw8H3g4TeJbN2etAg==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxlint/linux-x64-gnu@1.30.0': + resolution: {integrity: sha512-yOWGu4a82yA8xLusaznW41IF5ZkvBNz/U++M2/tCYAQUoJKSfJuAS5AhApRMKZLKeX0Vmdagh0YwvC+e98QG0w==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxlint/linux-x64-musl@1.30.0': + resolution: {integrity: sha512-qL1902VF4EMTZTZdJEIzzUQ+UD0IbH+IW6dhYZXbP9nTXJnItW1fk4cyJq5zfUVu1IoVwKK2FP1jUMqEsBlWTw==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxlint/win32-arm64@1.30.0': + resolution: {integrity: sha512-QK6C1djHKI7g1l5g6W9vkz9sd+sn1QJe6PbaV2sWFjVVoT0tO6LWygVWaci09ZHYVJ+lnCbbaFEgZ9jQhIs05A==} + cpu: [arm64] + os: [win32] + + '@oxlint/win32-x64@1.30.0': + resolution: {integrity: sha512-tbPnJIBUKke9KpceV+DpGyfN3LdhGaEPJHSuD4/mUEwP9Kk6IKSoDNih681RVGhgvaEZg3uHmQr6n9Uh0P3Yrg==} + cpu: [x64] + os: [win32] + + '@scure/base@2.0.0': + resolution: {integrity: sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w==} + + oxlint@1.30.0: + resolution: {integrity: sha512-6Mcpj7Gn26QNRUpue9kRZKQg623mH10kLPl597sNCOfXeUZHTglrc2O54eskHMRA+tR7c0u73nW4GPwSFePLkA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + oxlint-tsgolint: '>=0.8.1' + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + + prettier@3.7.3: + resolution: {integrity: sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==} + engines: {node: '>=14'} + hasBin: true + +snapshots: + + '@oxlint/darwin-arm64@1.30.0': + optional: true + + '@oxlint/darwin-x64@1.30.0': + optional: true + + '@oxlint/linux-arm64-gnu@1.30.0': + optional: true + + '@oxlint/linux-arm64-musl@1.30.0': + optional: true + + '@oxlint/linux-x64-gnu@1.30.0': + optional: true + + '@oxlint/linux-x64-musl@1.30.0': + optional: true + + '@oxlint/win32-arm64@1.30.0': + optional: true + + '@oxlint/win32-x64@1.30.0': + optional: true + + '@scure/base@2.0.0': {} + + oxlint@1.30.0: + optionalDependencies: + '@oxlint/darwin-arm64': 1.30.0 + '@oxlint/darwin-x64': 1.30.0 + '@oxlint/linux-arm64-gnu': 1.30.0 + '@oxlint/linux-arm64-musl': 1.30.0 + '@oxlint/linux-x64-gnu': 1.30.0 + '@oxlint/linux-x64-musl': 1.30.0 + '@oxlint/win32-arm64': 1.30.0 + '@oxlint/win32-x64': 1.30.0 + + prettier@3.7.3: {} From 129d70a18b6896f4c06fc032dc2aa29086544624 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 1 Dec 2025 09:18:46 +0700 Subject: [PATCH 12/14] Bump version, reference github hosted package is example --- examples/package.json | 2 +- examples/pnpm-lock.yaml | 19 ++++++++++--------- package.json | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/examples/package.json b/examples/package.json index 679db98..8834f2e 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,7 +1,7 @@ { "type": "module", "dependencies": { - "light-bolt11-decoder": "3.2.0", + "light-bolt11-decoder": "github:ghst-0/light-bolt11-decoder", "react": "^19.2.0", "react-dom": "^19.2.0", "styled-components": "^6.1.19", diff --git a/examples/pnpm-lock.yaml b/examples/pnpm-lock.yaml index cbe9c5d..77e6809 100644 --- a/examples/pnpm-lock.yaml +++ b/examples/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: light-bolt11-decoder: - specifier: 3.2.0 - version: 3.2.0 + specifier: github:ghst-0/light-bolt11-decoder + version: https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/3fa35ae36664277325480f872ac3ec7013407889 react: specifier: ^19.2.0 version: 19.2.0 @@ -144,8 +144,8 @@ packages: '@rolldown/pluginutils@1.0.0-beta.52': resolution: {integrity: sha512-/L0htLJZbaZFL1g9OHOblTxbCYIGefErJjtYOwgl9ZqNx27P3L0SDfjhhHIss32gu5NWgnxuT2a2Hnnv6QGHKA==} - '@scure/base@1.1.1': - resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==} + '@scure/base@2.0.0': + resolution: {integrity: sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w==} '@tybys/wasm-util@0.10.1': resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} @@ -166,8 +166,9 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - light-bolt11-decoder@3.2.0: - resolution: {integrity: sha512-3QEofgiBOP4Ehs9BI+RkZdXZNtSys0nsJ6fyGeSiAGCBsMwHGUDS/JQlY/sTnWs91A2Nh0S9XXfA8Sy9g6QpuQ==} + light-bolt11-decoder@https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/3fa35ae36664277325480f872ac3ec7013407889: + resolution: {tarball: https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/3fa35ae36664277325480f872ac3ec7013407889} + version: 3.2.0 nanoid@3.3.11: resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} @@ -305,7 +306,7 @@ snapshots: '@rolldown/pluginutils@1.0.0-beta.52': {} - '@scure/base@1.1.1': {} + '@scure/base@2.0.0': {} '@tybys/wasm-util@0.10.1': dependencies: @@ -326,9 +327,9 @@ snapshots: csstype@3.1.3: {} - light-bolt11-decoder@3.2.0: + light-bolt11-decoder@https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/3fa35ae36664277325480f872ac3ec7013407889: dependencies: - '@scure/base': 1.1.1 + '@scure/base': 2.0.0 nanoid@3.3.11: {} diff --git a/package.json b/package.json index b013588..a332fd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "light-bolt11-decoder", - "version": "3.2.0", + "version": "3.2.1", "type": "module", "description": "decode lightning invoices without overhead (doesn't check signatures).", "main": "bolt11.js", From 3caf2a68e9508b416d68fa8a6038ee08d10c3a49 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 1 Dec 2025 09:32:19 +0700 Subject: [PATCH 13/14] Specify version in package.json so git packages gets updated --- examples/package.json | 2 +- examples/pnpm-lock.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/package.json b/examples/package.json index 8834f2e..fe47fd4 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,7 +1,7 @@ { "type": "module", "dependencies": { - "light-bolt11-decoder": "github:ghst-0/light-bolt11-decoder", + "light-bolt11-decoder": "github:ghst-0/light-bolt11-decoder#v3.2.1", "react": "^19.2.0", "react-dom": "^19.2.0", "styled-components": "^6.1.19", diff --git a/examples/pnpm-lock.yaml b/examples/pnpm-lock.yaml index 77e6809..b519558 100644 --- a/examples/pnpm-lock.yaml +++ b/examples/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: light-bolt11-decoder: - specifier: github:ghst-0/light-bolt11-decoder - version: https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/3fa35ae36664277325480f872ac3ec7013407889 + specifier: github:ghst-0/light-bolt11-decoder#v3.2.1 + version: https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/129d70a18b6896f4c06fc032dc2aa29086544624 react: specifier: ^19.2.0 version: 19.2.0 @@ -166,9 +166,9 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - light-bolt11-decoder@https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/3fa35ae36664277325480f872ac3ec7013407889: - resolution: {tarball: https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/3fa35ae36664277325480f872ac3ec7013407889} - version: 3.2.0 + light-bolt11-decoder@https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/129d70a18b6896f4c06fc032dc2aa29086544624: + resolution: {tarball: https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/129d70a18b6896f4c06fc032dc2aa29086544624} + version: 3.2.1 nanoid@3.3.11: resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} @@ -327,7 +327,7 @@ snapshots: csstype@3.1.3: {} - light-bolt11-decoder@https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/3fa35ae36664277325480f872ac3ec7013407889: + light-bolt11-decoder@https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/129d70a18b6896f4c06fc032dc2aa29086544624: dependencies: '@scure/base': 2.0.0 From 5baf4c18e4ef4d4a169dc425d9728e329ed75dda Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 5 Dec 2025 03:05:29 +0700 Subject: [PATCH 14/14] Update packages Remove prettier Tag v3.2.2 --- .prettierrc.yaml | 9 - examples/package.json | 33 +++- examples/pnpm-lock.yaml | 397 ---------------------------------------- package.json | 37 +++- pnpm-lock.yaml | 125 ------------- 5 files changed, 63 insertions(+), 538 deletions(-) delete mode 100644 .prettierrc.yaml delete mode 100644 examples/pnpm-lock.yaml delete mode 100644 pnpm-lock.yaml diff --git a/.prettierrc.yaml b/.prettierrc.yaml deleted file mode 100644 index a881699..0000000 --- a/.prettierrc.yaml +++ /dev/null @@ -1,9 +0,0 @@ -semi: false -arrowParens: avoid -insertPragma: false -printWidth: 80 -proseWrap: preserve -singleQuote: true -trailingComma: none -useTabs: false -bracketSpacing: false diff --git a/examples/package.json b/examples/package.json index fe47fd4..7ebfeac 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,17 +1,42 @@ { "type": "module", "dependencies": { - "light-bolt11-decoder": "github:ghst-0/light-bolt11-decoder#v3.2.1", - "react": "^19.2.0", - "react-dom": "^19.2.0", + "light-bolt11-decoder": "../", + "react": "^19.2.1", + "react-dom": "^19.2.1", "styled-components": "^6.1.19", "use-computed-state": "^1.2.0" }, "devDependencies": { - "rolldown": "^1.0.0-beta.52" + "rolldown": "^1.0.0-beta.53" }, "scripts": { "build": "rolldown demo.jsx --file demo.build.js", "lint": "oxlint" + }, + "pnpm": { + "overrides": { + "vite": "npm:rolldown-vite@latest", + "rolldown-vite>lightningcss": "-", + "rolldown-vite>postcss": "-", + "rolldown>@rolldown/binding-android-arm64": "-", + "rolldown>@rolldown/binding-darwin-arm64": "-", + "rolldown>@rolldown/binding-darwin-x64": "-", + "rolldown>@rolldown/binding-freebsd-x64": "-", + "rolldown>@rolldown/binding-linux-arm-gnueabihf": "-", + "rolldown>@rolldown/binding-linux-arm64-gnu": "-", + "rolldown>@rolldown/binding-linux-arm64-musl": "-", + "rolldown>@rolldown/binding-linux-x64-musl": "-", + "rolldown>@rolldown/binding-openharmony-arm64": "-", + "rolldown>@rolldown/binding-wasm32-wasi": "-", + "rolldown>@rolldown/binding-win32-arm64-msvc": "-", + "rolldown>@rolldown/binding-win32-ia32-msvc": "-", + "rolldown>@rolldown/binding-win32-x64-msvc": "-", + "@vitejs/plugin-react>@babel/core": "-", + "@vitejs/plugin-react>@babel/plugin-transform-react-jsx-self": "-", + "@vitejs/plugin-react>@babel/plugin-transform-react-jsx-source": "-", + "@vitejs/plugin-react>@types/babel__core": "-", + "@vitejs/plugin-react>react-refresh": "-" + } } } diff --git a/examples/pnpm-lock.yaml b/examples/pnpm-lock.yaml deleted file mode 100644 index b519558..0000000 --- a/examples/pnpm-lock.yaml +++ /dev/null @@ -1,397 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - dependencies: - light-bolt11-decoder: - specifier: github:ghst-0/light-bolt11-decoder#v3.2.1 - version: https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/129d70a18b6896f4c06fc032dc2aa29086544624 - react: - specifier: ^19.2.0 - version: 19.2.0 - react-dom: - specifier: ^19.2.0 - version: 19.2.0(react@19.2.0) - styled-components: - specifier: ^6.1.19 - version: 6.1.19(react-dom@19.2.0(react@19.2.0))(react@19.2.0) - use-computed-state: - specifier: ^1.2.0 - version: 1.2.0 - devDependencies: - rolldown: - specifier: ^1.0.0-beta.52 - version: 1.0.0-beta.52 - -packages: - - '@emnapi/core@1.7.1': - resolution: {integrity: sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==} - - '@emnapi/runtime@1.7.1': - resolution: {integrity: sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==} - - '@emnapi/wasi-threads@1.1.0': - resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} - - '@emotion/is-prop-valid@1.2.2': - resolution: {integrity: sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==} - - '@emotion/memoize@0.8.1': - resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} - - '@emotion/unitless@0.8.1': - resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} - - '@napi-rs/wasm-runtime@1.0.7': - resolution: {integrity: sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==} - - '@oxc-project/types@0.99.0': - resolution: {integrity: sha512-LLDEhXB7g1m5J+woRSgfKsFPS3LhR9xRhTeIoEBm5WrkwMxn6eZ0Ld0c0K5eHB57ChZX6I3uSmmLjZ8pcjlRcw==} - - '@rolldown/binding-android-arm64@1.0.0-beta.52': - resolution: {integrity: sha512-MBGIgysimZPqTDcLXI+i9VveijkP5C3EAncEogXhqfax6YXj1Tr2LY3DVuEOMIjWfMPMhtQSPup4fSTAmgjqIw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [android] - - '@rolldown/binding-darwin-arm64@1.0.0-beta.52': - resolution: {integrity: sha512-MmKeoLnKu1d9j6r19K8B+prJnIZ7u+zQ+zGQ3YHXGnr41rzE3eqQLovlkvoZnRoxDGPA4ps0pGiwXy6YE3lJyg==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [darwin] - - '@rolldown/binding-darwin-x64@1.0.0-beta.52': - resolution: {integrity: sha512-qpHedvQBmIjT8zdnjN3nWPR2qjQyJttbXniCEKKdHeAbZG9HyNPBUzQF7AZZGwmS9coQKL+hWg9FhWzh2dZ2IA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [darwin] - - '@rolldown/binding-freebsd-x64@1.0.0-beta.52': - resolution: {integrity: sha512-dDp7WbPapj/NVW0LSiH/CLwMhmLwwKb3R7mh2kWX+QW85X1DGVnIEyKh9PmNJjB/+suG1dJygdtdNPVXK1hylg==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [freebsd] - - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.52': - resolution: {integrity: sha512-9e4l6vy5qNSliDPqNfR6CkBOAx6PH7iDV4OJiEJzajajGrVy8gc/IKKJUsoE52G8ud8MX6r3PMl97NfwgOzB7g==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm] - os: [linux] - - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.52': - resolution: {integrity: sha512-V48oDR84feRU2KRuzpALp594Uqlx27+zFsT6+BgTcXOtu7dWy350J1G28ydoCwKB+oxwsRPx2e7aeQnmd3YJbQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.52': - resolution: {integrity: sha512-ENLmSQCWqSA/+YN45V2FqTIemg7QspaiTjlm327eUAMeOLdqmSOVVyrQexJGNTQ5M8sDYCgVAig2Kk01Ggmqaw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.52': - resolution: {integrity: sha512-klahlb2EIFltSUubn/VLjuc3qxp1E7th8ukayPfdkcKvvYcQ5rJztgx8JsJSuAKVzKtNTqUGOhy4On71BuyV8g==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@rolldown/binding-linux-x64-musl@1.0.0-beta.52': - resolution: {integrity: sha512-UuA+JqQIgqtkgGN2c/AQ5wi8M6mJHrahz/wciENPTeI6zEIbbLGoth5XN+sQe2pJDejEVofN9aOAp0kaazwnVg==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [linux] - libc: [musl] - - '@rolldown/binding-openharmony-arm64@1.0.0-beta.52': - resolution: {integrity: sha512-1BNQW8u4ro8bsN1+tgKENJiqmvc+WfuaUhXzMImOVSMw28pkBKdfZtX2qJPADV3terx+vNJtlsgSGeb3+W6Jiw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [openharmony] - - '@rolldown/binding-wasm32-wasi@1.0.0-beta.52': - resolution: {integrity: sha512-K/p7clhCqJOQpXGykrFaBX2Dp9AUVIDHGc+PtFGBwg7V+mvBTv/tsm3LC3aUmH02H2y3gz4y+nUTQ0MLpofEEg==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] - - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.52': - resolution: {integrity: sha512-a4EkXBtnYYsKipjS7QOhEBM4bU5IlR9N1hU+JcVEVeuTiaslIyhWVKsvf7K2YkQHyVAJ+7/A9BtrGqORFcTgng==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [win32] - - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.52': - resolution: {integrity: sha512-5ZXcYyd4GxPA6QfbGrNcQjmjbuLGvfz6728pZMsQvGHI+06LT06M6TPtXvFvLgXtexc+OqvFe1yAIXJU1gob/w==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [ia32] - os: [win32] - - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.52': - resolution: {integrity: sha512-tzpnRQXJrSzb8Z9sm97UD3cY0toKOImx+xRKsDLX4zHaAlRXWh7jbaKBePJXEN7gNw7Nm03PBNwphdtA8KSUYQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [win32] - - '@rolldown/pluginutils@1.0.0-beta.52': - resolution: {integrity: sha512-/L0htLJZbaZFL1g9OHOblTxbCYIGefErJjtYOwgl9ZqNx27P3L0SDfjhhHIss32gu5NWgnxuT2a2Hnnv6QGHKA==} - - '@scure/base@2.0.0': - resolution: {integrity: sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w==} - - '@tybys/wasm-util@0.10.1': - resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} - - '@types/stylis@4.2.5': - resolution: {integrity: sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==} - - camelize@1.0.1: - resolution: {integrity: sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==} - - css-color-keywords@1.0.0: - resolution: {integrity: sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==} - engines: {node: '>=4'} - - css-to-react-native@3.2.0: - resolution: {integrity: sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==} - - csstype@3.1.3: - resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - - light-bolt11-decoder@https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/129d70a18b6896f4c06fc032dc2aa29086544624: - resolution: {tarball: https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/129d70a18b6896f4c06fc032dc2aa29086544624} - version: 3.2.1 - - nanoid@3.3.11: - resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - - postcss-value-parser@4.2.0: - resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - - postcss@8.4.49: - resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} - engines: {node: ^10 || ^12 || >=14} - - react-dom@19.2.0: - resolution: {integrity: sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==} - peerDependencies: - react: ^19.2.0 - - react@19.2.0: - resolution: {integrity: sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==} - engines: {node: '>=0.10.0'} - - rolldown@1.0.0-beta.52: - resolution: {integrity: sha512-Hbnpljue+JhMJrlOjQ1ixp9me7sUec7OjFvS+A1Qm8k8Xyxmw3ZhxFu7LlSXW1s9AX3POE9W9o2oqCEeR5uDmg==} - engines: {node: ^20.19.0 || >=22.12.0} - hasBin: true - - scheduler@0.27.0: - resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} - - shallowequal@1.1.0: - resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} - - source-map-js@1.2.1: - resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} - engines: {node: '>=0.10.0'} - - styled-components@6.1.19: - resolution: {integrity: sha512-1v/e3Dl1BknC37cXMhwGomhO8AkYmN41CqyX9xhUDxry1ns3BFQy2lLDRQXJRdVVWB9OHemv/53xaStimvWyuA==} - engines: {node: '>= 16'} - peerDependencies: - react: '>= 16.8.0' - react-dom: '>= 16.8.0' - - stylis@4.3.2: - resolution: {integrity: sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==} - - tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - - use-computed-state@1.2.0: - resolution: {integrity: sha512-V2xOQGKQdT8LkB523elxpBivrHweZFzCk+A6hpjf0gJyYxhDunSKkp+D/ofdsn8a5C49UwGr6FRBw9sS8wqHnw==} - -snapshots: - - '@emnapi/core@1.7.1': - dependencies: - '@emnapi/wasi-threads': 1.1.0 - tslib: 2.6.2 - optional: true - - '@emnapi/runtime@1.7.1': - dependencies: - tslib: 2.6.2 - optional: true - - '@emnapi/wasi-threads@1.1.0': - dependencies: - tslib: 2.6.2 - optional: true - - '@emotion/is-prop-valid@1.2.2': - dependencies: - '@emotion/memoize': 0.8.1 - - '@emotion/memoize@0.8.1': {} - - '@emotion/unitless@0.8.1': {} - - '@napi-rs/wasm-runtime@1.0.7': - dependencies: - '@emnapi/core': 1.7.1 - '@emnapi/runtime': 1.7.1 - '@tybys/wasm-util': 0.10.1 - optional: true - - '@oxc-project/types@0.99.0': {} - - '@rolldown/binding-android-arm64@1.0.0-beta.52': - optional: true - - '@rolldown/binding-darwin-arm64@1.0.0-beta.52': - optional: true - - '@rolldown/binding-darwin-x64@1.0.0-beta.52': - optional: true - - '@rolldown/binding-freebsd-x64@1.0.0-beta.52': - optional: true - - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.52': - optional: true - - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.52': - optional: true - - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.52': - optional: true - - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.52': - optional: true - - '@rolldown/binding-linux-x64-musl@1.0.0-beta.52': - optional: true - - '@rolldown/binding-openharmony-arm64@1.0.0-beta.52': - optional: true - - '@rolldown/binding-wasm32-wasi@1.0.0-beta.52': - dependencies: - '@napi-rs/wasm-runtime': 1.0.7 - optional: true - - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.52': - optional: true - - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.52': - optional: true - - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.52': - optional: true - - '@rolldown/pluginutils@1.0.0-beta.52': {} - - '@scure/base@2.0.0': {} - - '@tybys/wasm-util@0.10.1': - dependencies: - tslib: 2.6.2 - optional: true - - '@types/stylis@4.2.5': {} - - camelize@1.0.1: {} - - css-color-keywords@1.0.0: {} - - css-to-react-native@3.2.0: - dependencies: - camelize: 1.0.1 - css-color-keywords: 1.0.0 - postcss-value-parser: 4.2.0 - - csstype@3.1.3: {} - - light-bolt11-decoder@https://codeload.github.com/ghst-0/light-bolt11-decoder/tar.gz/129d70a18b6896f4c06fc032dc2aa29086544624: - dependencies: - '@scure/base': 2.0.0 - - nanoid@3.3.11: {} - - picocolors@1.1.1: {} - - postcss-value-parser@4.2.0: {} - - postcss@8.4.49: - dependencies: - nanoid: 3.3.11 - picocolors: 1.1.1 - source-map-js: 1.2.1 - - react-dom@19.2.0(react@19.2.0): - dependencies: - react: 19.2.0 - scheduler: 0.27.0 - - react@19.2.0: {} - - rolldown@1.0.0-beta.52: - dependencies: - '@oxc-project/types': 0.99.0 - '@rolldown/pluginutils': 1.0.0-beta.52 - optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.0-beta.52 - '@rolldown/binding-darwin-arm64': 1.0.0-beta.52 - '@rolldown/binding-darwin-x64': 1.0.0-beta.52 - '@rolldown/binding-freebsd-x64': 1.0.0-beta.52 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.52 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.52 - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.52 - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.52 - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.52 - '@rolldown/binding-openharmony-arm64': 1.0.0-beta.52 - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.52 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.52 - '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.52 - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.52 - - scheduler@0.27.0: {} - - shallowequal@1.1.0: {} - - source-map-js@1.2.1: {} - - styled-components@6.1.19(react-dom@19.2.0(react@19.2.0))(react@19.2.0): - dependencies: - '@emotion/is-prop-valid': 1.2.2 - '@emotion/unitless': 0.8.1 - '@types/stylis': 4.2.5 - css-to-react-native: 3.2.0 - csstype: 3.1.3 - postcss: 8.4.49 - react: 19.2.0 - react-dom: 19.2.0(react@19.2.0) - shallowequal: 1.1.0 - stylis: 4.3.2 - tslib: 2.6.2 - - stylis@4.3.2: {} - - tslib@2.6.2: {} - - use-computed-state@1.2.0: {} diff --git a/package.json b/package.json index a332fd3..bfc70da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "light-bolt11-decoder", - "version": "3.2.1", + "version": "3.2.2", "type": "module", "description": "decode lightning invoices without overhead (doesn't check signatures).", "main": "bolt11.js", @@ -27,7 +27,38 @@ "@scure/base": "2.0.0" }, "devDependencies": { - "oxlint": "^1.30.0", - "prettier": "^3.7.3" + "oxlint": "^1.31.0" + }, + "pnpm": { + "overrides": { + "vite": "npm:rolldown-vite@latest", + "rolldown-vite>lightningcss": "-", + "rolldown-vite>postcss": "-", + "rolldown>@rolldown/binding-android-arm64": "-", + "rolldown>@rolldown/binding-darwin-arm64": "-", + "rolldown>@rolldown/binding-darwin-x64": "-", + "rolldown>@rolldown/binding-freebsd-x64": "-", + "rolldown>@rolldown/binding-linux-arm-gnueabihf": "-", + "rolldown>@rolldown/binding-linux-arm64-gnu": "-", + "rolldown>@rolldown/binding-linux-arm64-musl": "-", + "rolldown>@rolldown/binding-linux-x64-musl": "-", + "rolldown>@rolldown/binding-openharmony-arm64": "-", + "rolldown>@rolldown/binding-wasm32-wasi": "-", + "rolldown>@rolldown/binding-win32-arm64-msvc": "-", + "rolldown>@rolldown/binding-win32-ia32-msvc": "-", + "rolldown>@rolldown/binding-win32-x64-msvc": "-", + "@vitejs/plugin-react>@babel/core": "-", + "@vitejs/plugin-react>@babel/plugin-transform-react-jsx-self": "-", + "@vitejs/plugin-react>@babel/plugin-transform-react-jsx-source": "-", + "@vitejs/plugin-react>@types/babel__core": "-", + "@vitejs/plugin-react>react-refresh": "-", + "oxlint>@oxlint/darwin-arm64": "-", + "oxlint>@oxlint/darwin-x64": "-", + "oxlint>@oxlint/linux-arm64-gnu": "-", + "oxlint>@oxlint/linux-arm64-musl": "-", + "@oxlint/linux-x64-musl": "-", + "@oxlint/win32-arm64": "-", + "@oxlint/win32-x64": "-" + } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml deleted file mode 100644 index a5e6a89..0000000 --- a/pnpm-lock.yaml +++ /dev/null @@ -1,125 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - dependencies: - '@scure/base': - specifier: 2.0.0 - version: 2.0.0 - devDependencies: - oxlint: - specifier: ^1.30.0 - version: 1.30.0 - prettier: - specifier: ^3.7.3 - version: 3.7.3 - -packages: - - '@oxlint/darwin-arm64@1.30.0': - resolution: {integrity: sha512-vIiTk1FBObXHvaG3WK/SpwCZP06fuHhSrn8mK2hEs2uSFWG63WgvLAHSGhI4U1X29JGf36zhfUzuKirDIVdKBQ==} - cpu: [arm64] - os: [darwin] - - '@oxlint/darwin-x64@1.30.0': - resolution: {integrity: sha512-DP4ueul8Vza52gJX1/+jyXQjUsgjmPe4Pq5uYOVa8k2V8cKRb2JzBls+DugbeP7yzKNTmlSp3J2mUnHQXuntLA==} - cpu: [x64] - os: [darwin] - - '@oxlint/linux-arm64-gnu@1.30.0': - resolution: {integrity: sha512-1e9NvTvjzG6t1tnUzNU9HZTVwNwhZw2BDQxwIsXV743g54BIkvyZNNXOEGic/Jw4IuIXHzpX3ztVWZaSzvDopg==} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@oxlint/linux-arm64-musl@1.30.0': - resolution: {integrity: sha512-szb5RB8Tbk756/z/GAdmUn+H1E2815BbcM7s6JZYQgyCJxR0RCL1yFXgKyz3BjIDqzR98Tw8H3g4TeJbN2etAg==} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@oxlint/linux-x64-gnu@1.30.0': - resolution: {integrity: sha512-yOWGu4a82yA8xLusaznW41IF5ZkvBNz/U++M2/tCYAQUoJKSfJuAS5AhApRMKZLKeX0Vmdagh0YwvC+e98QG0w==} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@oxlint/linux-x64-musl@1.30.0': - resolution: {integrity: sha512-qL1902VF4EMTZTZdJEIzzUQ+UD0IbH+IW6dhYZXbP9nTXJnItW1fk4cyJq5zfUVu1IoVwKK2FP1jUMqEsBlWTw==} - cpu: [x64] - os: [linux] - libc: [musl] - - '@oxlint/win32-arm64@1.30.0': - resolution: {integrity: sha512-QK6C1djHKI7g1l5g6W9vkz9sd+sn1QJe6PbaV2sWFjVVoT0tO6LWygVWaci09ZHYVJ+lnCbbaFEgZ9jQhIs05A==} - cpu: [arm64] - os: [win32] - - '@oxlint/win32-x64@1.30.0': - resolution: {integrity: sha512-tbPnJIBUKke9KpceV+DpGyfN3LdhGaEPJHSuD4/mUEwP9Kk6IKSoDNih681RVGhgvaEZg3uHmQr6n9Uh0P3Yrg==} - cpu: [x64] - os: [win32] - - '@scure/base@2.0.0': - resolution: {integrity: sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w==} - - oxlint@1.30.0: - resolution: {integrity: sha512-6Mcpj7Gn26QNRUpue9kRZKQg623mH10kLPl597sNCOfXeUZHTglrc2O54eskHMRA+tR7c0u73nW4GPwSFePLkA==} - engines: {node: ^20.19.0 || >=22.12.0} - hasBin: true - peerDependencies: - oxlint-tsgolint: '>=0.8.1' - peerDependenciesMeta: - oxlint-tsgolint: - optional: true - - prettier@3.7.3: - resolution: {integrity: sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==} - engines: {node: '>=14'} - hasBin: true - -snapshots: - - '@oxlint/darwin-arm64@1.30.0': - optional: true - - '@oxlint/darwin-x64@1.30.0': - optional: true - - '@oxlint/linux-arm64-gnu@1.30.0': - optional: true - - '@oxlint/linux-arm64-musl@1.30.0': - optional: true - - '@oxlint/linux-x64-gnu@1.30.0': - optional: true - - '@oxlint/linux-x64-musl@1.30.0': - optional: true - - '@oxlint/win32-arm64@1.30.0': - optional: true - - '@oxlint/win32-x64@1.30.0': - optional: true - - '@scure/base@2.0.0': {} - - oxlint@1.30.0: - optionalDependencies: - '@oxlint/darwin-arm64': 1.30.0 - '@oxlint/darwin-x64': 1.30.0 - '@oxlint/linux-arm64-gnu': 1.30.0 - '@oxlint/linux-arm64-musl': 1.30.0 - '@oxlint/linux-x64-gnu': 1.30.0 - '@oxlint/linux-x64-musl': 1.30.0 - '@oxlint/win32-arm64': 1.30.0 - '@oxlint/win32-x64': 1.30.0 - - prettier@3.7.3: {}