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
[Wrong] Es6/nodenext module only has a field named resolveFully
and you should remove other fields.
#7979
Comments
Please search for issues. I'm on mobile so linking them is hard. |
@kdy1 thanks, that issue was closed and the problem was still happening in the latest |
It's closed becauae it's not a bug. It's about a wrong configuration. |
@kdy1 yeah I was just trying to reason for my opening a new issue; however, maybe it'd be nice to change the types so that the user would know when they provide an invalid configuration? Like, I think there should be red squiggles when the user tries to use both |
@kdy1 what @DuCanhGH is talking about relates to this change
|
I can change the type if required, but in future. |
Not sure if it's related, but After updating to "@swc/core": "1.3.88"
|
swc-project/swc-node#732 seems to be the same issue |
I think this is an improvement of the wrong config detection. |
lazy
, expected resolveFully
resolveFully
qnd you should remove other fields.
resolveFully
qnd you should remove other fields.resolveFully
and you should remove other fields.
It is better to be a minor or major update because it broken many other packages such as |
I don't consider an improved validation as a breaking change. |
This is the very definition of breaking change. If a library makes a change that breaks consumers - that is a breaking change. Your "consideration" should be data driven. How you "label" the substance of the change is not relevant to the fact that this is breaking everyone who uses SWC. I would suggest you reclassify this as a breaking change. |
So if a bug made a program of user work where it should not, the bug should never be fixed without marking it as a breaking change, right? |
If you have years of precedent, and suddenly cause all of those applications to crash in a point release, then yes, it should be marked as a breaking change. It's reach is much wider than just invoking
This happens because the
A random developer who installed some completely unrelated dependency in their project won't know that the root cause is a "validation improvement". Can this not emit a warning and ignore extraneous values? serde has direct support for capturing those values: serde-rs/serde#941 (comment) #[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_json;
use std::collections::BTreeMap as Map;
use serde_json::Value;
#[derive(Serialize, Deserialize)]
struct S {
a: u32,
b: String,
#[serde(flatten)]
other: Map<String, Value>,
} |
I expected |
I don't know why they haven't... TypeStrong/ts-node#2070 Really appreciate this! |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
Since
@swc/core@1.3.80
, my project -@ducanh2912/next-pwa
- has been seeing this issue:For me - building the package using
rollup
with@rollup/plugin-swc
:For people who use my project:
This seems to only stop happening if I remove
module.lazy
andmodule.noInterop
from.swcrc
, but they don't seem to have been removed at all, which tells me that this is likely a bug.Input code
Link to the repo: https://github.com/DuCanhGH/next-pwa/tree/master/packages/next-pwa
Code compiled on users' end:
Config
Config used to compile the package itself:
Config used to compile on users' end:
Playground link
https://play.swc.rs/?version=1.3.80&code=H4sIAAAAAAAAA5VTwW4aMRC98xWjqIpApfadZJG2gVSooSASmkOJLMeeBTdee2t7Udp0%2F70GdpOoSBvl4Iv95r03bzwedUYyrvU9Fw%2BQAPe%2FjYCuw18l%2BtCDZAhPHQBKYRNC4QeUStyitgU6kts%2FSmtOrFtTNJ%2BW11Ra4ekt3tN0PqGLA8coHmV4UNZEImGND%2FAE8uW2D6XTUEXxWvXsGdcYWzo9gDl3QXF9vkBhnTw%2Fpu%2BDD06ZNfyF0kjMlEE5HEbeXQcA0VyZowkDKJwV6D1BsyWMzW9TdpleXX1OL76y0exiOR1%2Fu2Gsvy9SOV9ja8Vkmn4ZN3BeSmVb4elyNJk18K2S2A7%2FPhmNn%2BGZfcP95axxXh2HuEBfxAuMgbzK9cerSdztilQG3f9LenWEDkPpDAguNuhJzoPYHGH7NTYyrY11eI3cic0Agivx0EbV2%2BlUtdZhNi8mIEkSODmB09P9S9us0puUsQYYP1HtiK4oM%2FgYVlTywFeUfNwf8tNb84GqXoS3NfSm4ns6rAWacAg6Z103PscBdeJWTbl7gExpjJsHuZWlRtLBx8K6uCXV2T%2B8Oe6unwMAAA%3D%3D&config=H4sIAAAAAAAAA1WPQQ7DIAwE731FxLnnHvqDPsMijkQFGNlGCq34eyFBaXLcWWnH%2Ft6myQSas0fznL4ttawl9WRQHua%2BIw%2Bf0pByxkEivaIiUxq40dor8xb7n0rAgnzkRqREhbXPd41YdkmHpatlvWgamtESgxJLaxbwgltTxx3KEGUhDmcJI1g9gY5yVBe2vyArBVBnzajrZdETCZ5c%2B1vBRbeUA9cfInoy3ToBAAA%3D
SWC Info output
Expected behavior
This issue shouldn't happen, and the code should be compiled successfully like in
@swc/core@1.3.78
and below.Actual behavior
The error happens as described in section "Describe the bug".
Version
1.3.86
Additional context
On users' end, seems that even installing
@swc/core@1.3.8x
works (this forcesnext-pwa
to resolve to thatswc
instead of Next's internalswc
), but this is not the case for the package itself. Only by pinning@swc/core
to1.3.78
can I get it to build.The text was updated successfully, but these errors were encountered: