Giter VIP home page Giter VIP logo

Comments (12)

ricmoo avatar ricmoo commented on July 1, 2024 2

That is weird. I’m not sure why I removed it.

I’ll track down the commit history, but I certainly have no issue exporting it in the next minor bump.

from ethers.js.

ricmoo avatar ricmoo commented on July 1, 2024 1

Just re-opening so I don’t forget for the next minor-bump. :)

from ethers.js.

aaronzshey avatar aaronzshey commented on July 1, 2024

I just noticed - the export is, in fact, misspelled! It should be CommunityResourceable, not CommunityResourcable.

from ethers.js.

aaronzshey avatar aaronzshey commented on July 1, 2024

Quick update - I think I understand why this interface was commented out. Even after exporting it from providers/index.ts and ethers.ts, it just won't import for some reason. Live replit link using my patched version of ethers. Until this is actually fixed and CommunityResourceable becomes a valid import, could I trouble you to remove the minor-bump label? Thanks!

from ethers.js.

ricmoo avatar ricmoo commented on July 1, 2024

I don’t have a replit account, so I can’t see the link.

what is the error you get when trying to import it? Are you exporting it as a type and importing it as a type?

from ethers.js.

aaronzshey avatar aaronzshey commented on July 1, 2024

Both

import { CommunityResourceable } from "ethers";

and

import type { CommunityResourceable } from "ethers";

Screen Shot 2024-06-27 at 5 53 06 PM Screen Shot 2024-06-27 at 5 53 33 PM

Don't work :(

(installed using `npm install github:aaronzshey/ethers.js)

It is exported as a type! Here and here

This is quite strange, because importing other types, such as Networkish or WebSocketLike doesn't work.

from ethers.js.

ricmoo avatar ricmoo commented on July 1, 2024

Oh! After making the changes are you updating the dist files for both cjs and esm for your tests? npm run build-clean should build what you need. Can you check the imported files that it is present there?

from ethers.js.

aaronzshey avatar aaronzshey commented on July 1, 2024

What's really strange is that npm run build was working fine for me earlier. But after updating src.ts/ethers.ts, it stopped working and I would get these errors:

node_modules/@types/node/globals.d.ts(385,15): error TS2300: Duplicate identifier 'Response'.
node_modules/@types/node/globals.d.ts(386,9): error TS2300: Duplicate identifier 'Response'.
node_modules/@types/node/globals.d.ts(399,15): error TS2300: Duplicate identifier 'Headers'.
node_modules/@types/node/globals.d.ts(400,9): error TS2300: Duplicate identifier 'Headers'.
src.ts/utils/geturl-browser.ts(9,11): error TS2300: Duplicate identifier 'Headers'.
src.ts/utils/geturl-browser.ts(14,11): error TS2300: Duplicate identifier 'Response'.
src.ts/utils/geturl-browser.ts(71,13): error TS2740: Type 'Response' is missing the following properties from type 'Response': ok, type, url, redirected, and 7 more.

and then lib.commonjs and lib.esm would each only have two files: package.json and README.md. Is there a build requirement I've missed

from ethers.js.

ricmoo avatar ricmoo commented on July 1, 2024

There shouldn’t be, that I can think of. Are there any changes to the ts config? Is it using the pegged version of ts? That error certainly seems weird…

from ethers.js.

aaronzshey avatar aaronzshey commented on July 1, 2024
Screen Shot 2024-06-27 at 6 13 33 PM

A quick diff check of the configs - doesn't look like it. I'll go through the versions right now and see if anything looks amiss.

from ethers.js.

aaronzshey avatar aaronzshey commented on July 1, 2024

Okay, great thought about the changes to config files. In package-lock, @types/node was bumped from 18.15.13 -> 20.14.9, probably because I just installed typescript today. I'll revert these versions and keep you updated.

from ethers.js.

aaronzshey avatar aaronzshey commented on July 1, 2024

Commit 21731f9 resolves #4776 - the issues were in my tsconfig files, and the @types/node version. CommunityResourceable is now present in cjs and esm, and can be imported using import { CommunityResourceable } from "ethers" or import type { CommunityResourceable } from "ethers". Looking forwards to the next minor release!

from ethers.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.