-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from hopinc/feat/ts@next
- Loading branch information
Showing
44 changed files
with
1,434 additions
and
900 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@onehop/js': patch | ||
--- | ||
|
||
Converted to .ts imports, added some byte helper fns (from hop-go) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@onehop/js': patch | ||
--- | ||
|
||
Properly JSDoc all symbols |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@onehop/js': minor | ||
--- | ||
|
||
Convert to ts 5, export more symbols, deprecate some others |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,8 @@ node_modules | |
.DS_Store | ||
dist | ||
_workbench.ts | ||
docs | ||
.env | ||
temp | ||
.next | ||
docs | ||
package.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
{ | ||
"yaml.schemas": { | ||
"https://json.schemastore.org/github-action.json": "./.github/workflows/build.yml" | ||
}, | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
|
||
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts", | ||
|
||
"bundledPackages": [], | ||
|
||
"compiler": { | ||
"overrideTsconfig": { | ||
"moduleResolution": "NodeNext" | ||
} | ||
}, | ||
|
||
"apiReport": { | ||
"enabled": true, | ||
"reportFolder": "<projectFolder>/temp" | ||
}, | ||
|
||
"docModel": { | ||
"enabled": true, | ||
"apiJsonFilePath": "<projectFolder>/temp/js.api.json" | ||
}, | ||
|
||
"dtsRollup": { | ||
"enabled": false | ||
}, | ||
|
||
"tsdocMetadata": {}, | ||
|
||
"messages": { | ||
"compilerMessageReporting": { | ||
"default": { | ||
"logLevel": "warning" | ||
} | ||
}, | ||
|
||
"extractorMessageReporting": { | ||
"default": { | ||
"logLevel": "warning" | ||
} | ||
}, | ||
|
||
"tsdocMessageReporting": { | ||
"default": { | ||
"logLevel": "warning" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {copyFileSync, readdirSync} from 'node:fs'; | ||
import {join} from 'node:path'; | ||
import {fileURLToPath} from 'node:url'; | ||
|
||
const dist = join(fileURLToPath(import.meta.url), '..', '..', 'dist'); | ||
|
||
const utils = readdirSync(join(dist, 'utils')); | ||
|
||
const copy = (from, to) => { | ||
copyFileSync(join(dist, from), join(dist, to)); | ||
}; | ||
|
||
copy('index.d.ts', 'index.d.cts'); | ||
|
||
for (const util of utils) { | ||
copy(`utils/${util}/index.d.ts`, `utils/${util}/index.d.cts`); | ||
} | ||
|
||
copy('node/index.d.ts', 'node/index.d.cts'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
{ | ||
"name": "@onehop/js", | ||
"version": "1.29.0", | ||
"type": "module", | ||
"main": "./dist/index.cjs", | ||
"types": "./dist/index.d.ts", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"node": { | ||
"import": "./dist/node/index.js", | ||
"require": "./dist/node/index.cjs", | ||
"types": "./dist/index.d.ts" | ||
"require": "./dist/node/index.cjs" | ||
}, | ||
"browser": "./dist/index.js", | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs", | ||
"types": "./dist/index.d.ts" | ||
"require": "./dist/index.cjs" | ||
}, | ||
"./utils/zod": { | ||
"import": "./dist/utils/zod/index.js", | ||
"require": "./dist/utils/zod/index.cjs", | ||
"types": "./dist/utils/zod/index.d.ts" | ||
"require": "./dist/utils/zod/index.cjs" | ||
} | ||
}, | ||
"type": "module", | ||
"repository": "https://github.com/hopinc/js.git", | ||
"homepage": "https://hop.io", | ||
"author": "Hop <[email protected]>", | ||
|
@@ -40,29 +36,30 @@ | |
"utils" | ||
], | ||
"scripts": { | ||
"build": "rm -rf dist && tsup", | ||
"build": "rm -rf dist && tsup && node ./build/copy.js", | ||
"bench": "HOP_DEBUG=true tsx _workbench.ts", | ||
"release": "yarn build && yarn changeset publish", | ||
"vercel-build": "yarn typedoc --plugin typedoc-plugin-missing-exports src/index.ts", | ||
"test": "tsx tests/index.ts" | ||
"fullbuild": "yarn build && yarn docs", | ||
"test": "tsx tests/index.ts", | ||
"package": "yarn build && yarn pack" | ||
}, | ||
"devDependencies": { | ||
"@changesets/cli": "2.26.0", | ||
"@types/glob": "8.0.1", | ||
"@types/node": "18.13.0", | ||
"@types/glob": "8.1.0", | ||
"@types/node": "18.15.3", | ||
"dotenv": "16.0.3", | ||
"glob": "8.1.0", | ||
"glob": "9.3.0", | ||
"prettier": "2.8.4", | ||
"tsup": "6.6.0", | ||
"tsx": "3.12.3", | ||
"typedoc": "0.23.24", | ||
"tsup": "6.6.3", | ||
"tsx": "3.12.5", | ||
"typedoc": "0.23.27", | ||
"typedoc-plugin-markdown": "3.14.0", | ||
"typedoc-plugin-missing-exports": "1.0.0", | ||
"typescript": "^4.9.5" | ||
"typescript": "^5.0.2" | ||
}, | ||
"dependencies": { | ||
"@onehop/json-methods": "^1.2.0", | ||
"cross-fetch": "^3.1.5", | ||
"zod": "^3.20.3" | ||
"zod": "^3.21.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base" | ||
] | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["config:base"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.