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

packaging changes jsr.io/npm updates #33

Merged
merged 11 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
deno-version: [1.40.5]
deno-version: [1.44.0]

steps:
- name: checkout project
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:

strategy:
matrix:
deno-version: [1.36.4]
node-version: [21.x]
deno-version: [1.44.0]
node-version: [22.x]

steps:
- name: checkout nkeys
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
test:
strategy:
matrix:
node-version: [20.x]
deno-version: [1.36.4]
node-version: [22.x]
deno-version: [1.44.0]

runs-on: ubuntu-latest
permissions:
Expand Down
11 changes: 6 additions & 5 deletions bin/check-bundle-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@
let tag = Deno.env.get("RELEASE_VERSION");
const pkg = await Deno.readTextFile("package.json");
const m = JSON.parse(pkg);
if(tag) {
if(tag.startsWith("v")) {
if (tag) {
if (tag.startsWith("v")) {
tag = tag.substring(1);
}
if(m.version !== tag) {
console.error(`[ERROR] expected RELEASE_VERSION and package versions to match ${tag} !== ${m.version}`);
if (m.version !== tag) {
console.error(
`[ERROR] expected RELEASE_VERSION and package versions to match ${tag} !== ${m.version}`,
);
Deno.exit(1);
}
console.log(`[OK] RELEASE_VERSION and package versions match ${tag}`);
} else {
console.log(`[SKIP] tag check`);
}


Deno.exit(0);
15 changes: 5 additions & 10 deletions bin/cjs-fix-imports.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { parse } from "https://deno.land/std@0.75.0/flags/mod.ts";
import {
basename,
extname,
join,
resolve,
} from "https://deno.land/std@0.75.0/path/mod.ts";
import { parseArgs } from "jsr:@std/cli/parse-args";
import { basename, extname, join, resolve } from "jsr:@std/path";

const argv = parse(
const argv = parseArgs(
Deno.args,
{
alias: {
Expand All @@ -21,7 +16,7 @@ const argv = parse(
);

// resolve the specified directories to fq
let dirs = (argv._ as string[]).map((n) => {
const dirs = (argv._ as string[]).map((n) => {
return resolve(n);
});
// resolve the out dir
Expand Down Expand Up @@ -63,7 +58,7 @@ await Deno.lstat(out)
// process each file - remove extensions from requires/import
for (const fn of files) {
const data = await Deno.readFile(fn);
let txt = new TextDecoder().decode(data);
const txt = new TextDecoder().decode(data);
let mod = txt.replace(/from\s+"(\S+).[t|j]s"/gim, 'from "$1"');
mod = mod.replace(/require\("(\S+).[j|t]s"\)/gim, 'require("$1")');
const target = join(out, basename(fn));
Expand Down
2 changes: 1 addition & 1 deletion bin/tweetnacl-esm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// while attribution of its origin, shims if necessary,
// and reworking it to allow running it in different
// runtimes
import data from "../package.json" assert { type: "json" };
import data from "../package.json" with { type: "json" };
const version = data.dependencies["tweetnacl"];

async function copyFromModulesDir(
Expand Down
15 changes: 15 additions & 0 deletions docs/assets/icons.js

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

Loading
Loading