Skip to content

Commit

Permalink
Alternate fix for #58
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Sep 8, 2024
1 parent 851d4da commit 29ed96f
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 7 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"all:install": "pnpm i -r",
"all:link": "pnpm run -r link",
"clean": "rm -rf node_modules coverage pkg/*/node_modules pkg/*/coverage pkg/*/types",
"version": "ver=`npm pkg get version | sed -E 's/\"*([^\"]+)\"*/\\1/'` && npm pkg set -ws version=$ver && npm pkg set dependencies.dohdec=$ver --workspace dohdec-cli && git add pkg/*/package.json"
"version": "ver=`npm pkg get version | sed -E 's/\"*([^\"]+)\"*/\\1/'` && npm pkg set -ws version=$ver && npm pkg set dependencies.dohdec=$ver --workspace dohdec-cli && pnpm run -r version && git add pkg/*/package.json && git add pkg/*/lib/pkg.js"
},
"keywords": [
"doh",
Expand All @@ -45,6 +45,7 @@
"eslint-plugin-markdown": "5.1.0",
"eslint-plugin-node": "^11.1.0",
"mock-dns-server": "0.0.3",
"package-extract": "2.0.2",
"typedoc": "0.26.6"
},
"packageManager": "[email protected]",
Expand Down
4 changes: 1 addition & 3 deletions pkg/dohdec/lib/doh.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import * as packet from 'dns-packet';
import * as pkg from './pkg.js';
import * as tls from 'node:tls';
import DNSutils from './dnsUtils.js';
import assert from 'node:assert';
import cryptoRandomString from 'crypto-random-string';
import fs from 'node:fs';
import got from 'got';

const pkg = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf8'));

const PAD_SIZE = 128;
const WF_DNS = 'application/dns-message';
const WF_JSON = 'application/dns-json';
Expand Down
5 changes: 5 additions & 0 deletions pkg/dohdec/lib/pkg.js

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

3 changes: 2 additions & 1 deletion pkg/dohdec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"docs": "typedoc",
"test": "ava",
"types": "tsc",
"check": "npm pack --dry-run"
"check": "npm pack --dry-run",
"version": "package-extract -so lib/pkg.js name version"
},
"keywords": [
"doh",
Expand Down
28 changes: 26 additions & 2 deletions pnpm-lock.yaml

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

0 comments on commit 29ed96f

Please sign in to comment.