-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: declare interface types in .d.ts file (#122)
If we don't declare ts interfaces in a .d.ts file they get duplicated in our generated .d.ts files. We should pull in types from `ipfs-core-types` for the block api but it's yet to be fully typed so this is draft PR that can be finished after the IPFS top level types have improved. - Moves all types into `.d.ts` files so they do not get duplicated in generated types - Switches to named exports - Loosens mtime definition for unixfs - Exports utility functions for converting mtimes and modes - Runs ts check during linting BREAKING CHANGE: switches to named exports
- Loading branch information
1 parent
9a2b5f2
commit eaa8449
Showing
68 changed files
with
698 additions
and
586 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 |
---|---|---|
|
@@ -46,7 +46,6 @@ jobs: | |
- stage: check | ||
name: linting | ||
script: | ||
- npm --version | ||
- npm run lint | ||
|
||
- stage: check | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
'use strict' | ||
|
||
/** @type {import('aegir').Options["build"]["config"]} */ | ||
const buildConfig = { | ||
plugins: [ | ||
{ | ||
name: 'node built ins', | ||
setup (build) { | ||
build.onResolve({ filter: /^stream$/ }, () => { | ||
return { path: require.resolve('readable-stream') } | ||
}) | ||
build.onResolve({ filter: /^crypto$/ }, () => { | ||
return { path: require.resolve('crypto-browserify') } | ||
}) | ||
build.onResolve({ filter: /^cborg$/ }, () => { | ||
return { path: require.resolve('cborg') } | ||
}) | ||
} | ||
} | ||
] | ||
} | ||
|
||
/** @type {import('aegir').PartialOptions} */ | ||
module.exports = { | ||
karma: { | ||
browserNoActivityTimeout: 1000 * 1000, | ||
build: { | ||
config: buildConfig | ||
}, | ||
webpack: { | ||
node: { | ||
// needed by the cbor module | ||
stream: true, | ||
|
||
// needed by the core-util-is module | ||
Buffer: true | ||
test: { | ||
browser: { | ||
config: { | ||
buildConfig | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
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.