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

fix: copy src into dist in w3up-client #1239

Merged
merged 3 commits into from
Dec 13, 2023
Merged

fix: copy src into dist in w3up-client #1239

merged 3 commits into from
Dec 13, 2023

Conversation

travis
Copy link
Member

@travis travis commented Dec 13, 2023

I ran into an issue in a Next.js app that seems to be a result of having sourcecode and type declarations in separate directories:

./node_modules/.pnpm/@[email protected]/node_modules/@web3-storage/w3up-client/src/types.ts:15:29
Type error: Could not find a declaration file for module './client.js'. '/Users/travis/dev/pl/fetch-test/node_modules/.pnpm/@[email protected]/node_modules/@web3-storage/w3up-client/src/client.js' implicitly has an 'any' type.

  13 |   Unit,
  14 | } from '@ucanto/interface'
> 15 | import { type Client } from './client.js'
     |                             ^

Copying the sourcecode into dist and updating exports to point to it seems to fix this.

I ran into an issue in a Next.js app that seems to a result of having sourcecode and type declarations in separate directories:

```
./node_modules/.pnpm/@web3-storage[email protected]/node_modules/@web3-storage/w3up-client/src/types.ts:15:29
Type error: Could not find a declaration file for module './client.js'. '/Users/travis/dev/pl/fetch-test/node_modules/.pnpm/@web3-storage[email protected]/node_modules/@web3-storage/w3up-client/src/client.js' implicitly has an 'any' type.

  13 |   Unit,
  14 | } from '@ucanto/interface'
> 15 | import { type Client } from './client.js'
     |                             ^
```

Copying the sourcecode into `dist` and updating exports to point to it seems to fix this.
very unclear why this is needed, especially since it didn't seem
to be needed before I made the package.json changes, but this fixes the build!
the previous one was giving TSC a hard time
@travis travis merged commit 468bb79 into main Dec 13, 2023
3 checks passed
@travis travis deleted the fix/next-build-errors branch December 13, 2023 18:09
travis pushed a commit that referenced this pull request Jan 3, 2024
🤖 I have created a release *beep* *boop*
---


##
[12.0.0](w3up-client-v11.2.1...w3up-client-v12.0.0)
(2024-01-03)


### ⚠ BREAKING CHANGES

* return allocated bytes in `store/add` receipt
([#1213](#1213))

### Features

* expose OwnedSpace and SharedSpace from access-client
([#1244](#1244))
([8ec1b44](8ec1b44))
* return allocated bytes in `store/add` receipt
([#1213](#1213))
([5d52e44](5d52e44))


### Fixes

* copy src into dist in w3up-client
([#1239](#1239))
([468bb79](468bb79))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants