Hacker Newsnew | past | comments | ask | show | jobs | submit | zkochan's commentslogin

enablePrePostScripts is about running "prebuild" and "postbuild" scripts automatically, when you run "pnpm run build"


well, it is literally in an example in the text that you provided. So, I am not sure why you confused it with postinstall lifecycle scripts.


Good luck!


You can use pnpm without symlinks by setting node-linker=hoisted

https://pnpm.io/npmrc#node-linker


That's great news! pnpm might be my answer after all.


pnpm is really good for monorepos and there are many big open source projects that use pnpm: https://pnpm.io/workspaces#usage-examples


pnpm also implements all three: https://pnpm.io/feature-comparison

But I think it is best to use Yarn for PnP and pnpm for the symlinked node_modules structure.


Both pnpm and Yarn are independent projects maintained by the community. I personally think that these are better projects than npm CLI because they can make their own decisions. Not decisions dictated by business needs of a company.

I was OK to merge pnpm into npm in the past. They have never suggested me this opportunity. Instead, they decided to re-implement pnpm's algorithm into npm and call it "isolated mode".


I see, I tried it now, it looks great.

Most of my problems were created by the material UI libraries (I wanted to use them with SvelteKit), but I just got rid of it as those libraries were making development harder instead of helping.

I still wish there would be a nice UI library for Svelte, but I guess that's the disadvantage of not going with the mainstream frontend toolkit.


> ...material UI libraries...making development harder instead of helping.

I'm glad I'm not the only one who has had that experience.


Material UI (MUI for react) not just impact the DX, it also bloats the runtime impacting the UX


pnpm as well supports all three modes. But I think it is better to use Yarn for the PnP mode and pnpm for the symlinked mode.

Here is a feature comparison: https://pnpm.io/feature-comparison


That was the deal a few weeks ago. After the atrocities that their army has committed in my country, I do not think I will ever unblock traffic from Russian Federation.


If that's how it works, there's a lot of people on the planet who have good reason to block traffic from the USA.

Fortunately for me as a developer in the USA, I guess most of them, in the Global south, aren't developers, or know they can't be successful as developers blocking traffic from the USA, no matter how many atrocities the US military or intelligence have committed in their countries. :(. I guess if they wanted to try, it's an interesting question if that would be some kind of effective action in changing US atrocious behavior. Probably not. :(

That said, this is basically a form of boycott. There does seem to have been some significant change of opinion around the value and ethics of the tool, from when the main example we had was the BDS movement called by Palestinian civil society against Israel. (Which by the way, does not in fact call for doing things like blocking all network access to those in Israel, what people are doing against Russia is way broader and less targetted than what the... more controversial(?) Palestinian-led BDS has done or called for against Israel. Which is interesting.)


In the USA there are different people. Good and bad. There are states that are very conservative and there is California. There are some basic values that everyone agrees upon. I think nobody can claim that everyone is bad or good in the US. Same goes for any other democratic society. Same goes for Ukraine. There are a lot of people that I don't like in Ukraine.

In Russia there are some good people but they are in extreme minority. Extreme. Even the liberals in Russia are supporting the annexation of Crimea. Maybe the dictatorship is the reason, maybe the propaganda. I don't know and I don't care. This is how it is and I do what I can to exclude them from my life.


There's different people in Russia too. No one is blocking US citizens because they dropped bombs killing 300 people shopping in markets or 200k civilians in Iraq or for the many abuses like Abu Grahib.

Actually america has been by far the biggest aggressor on the planrt in tge last decades, and it killed the most civilians outside Africa.

That's my problem with this massive anti russian hysteria in software.

You only appear careless, racist and naive. It's better to avoid politics in software and business, because if you don't you have to basically ban anyone.


You have the audacity to call it anti Russian hysteria, when I should hide from air raid attacks sometimes several times a day?

Please don't use pnpm. Use Yarn or npm, those are better package managers for you.


I am sorry for that situation but my opinion does not change.

OS and politics should not be mixed. Your actions do nothing but say that you will "weaponize" an open source library to match one goal "punishing Russians" but not punishing other perpetrators.

If every software maintainer started to apply its own political views and ban some users the entire ecosystem would implode.

Should muslim developers ban all chinese users for the uighur concentration camps, and myanmaris for their treatment of Rohingya?

Should I, a Polish developer, ban Ukrainians because they hail as a hero and title streets to a criminal like Bandera that killed my own polish family in eastern galicia during world war two?

Where and when would this hysteria end?

I have sympathy for your situation, but not for such solutions. They damage everyone, including OSS.


"Even the liberals in Russia are supporting the annexation of Crimea"

- Supporting an annexation that has already happened is not the same as supporting a war.

- That being said, even the liberals in the US supported the various invasions and occupations. Don't forget that Libya happened under Obama.

- Even the liberals in Turkey are supporting the annexation of northern Cyprus, even the liberals in China support the annexation of Tibet, etc. It is not something unique to Russia.

"In Russia there are some good people but they are in extreme minority"

Bush's approval rating was the highest when he declared the invasion of Afghanistan (90%) and when he declared the invasion of Iraq (70%).

In addition to that this is typical racist rhetoric, I have heard exactly the same thing about Mexicans, Blacks, Albanians, Jews, Roma, etc.


Racist rhetoric? Don't be ridiculous. There is no Russian race. I don't block Russians if they leave Russia. I have many Russian friends in Ukraine. Only Russians that live in Russia are blocked. Russians that pay tax to a government that is waging war against my country.


Maybe "racist" was not the best choice. Feel free to replace it with "discriminatory" instead.

Anyway, this does not explain your plan to keep the restriction permanently. After all they will not be paying taxes that fund the war effort after the war is be over.


As someone who lives in the USA and is a USA citizen, I'm frequently surprised by how much people don't hold US voters responsible for the actions of the government.

The US has and continues to do some pretty awful things around the world. Turning some parts of Pakistan into hellscapes where an invisible drone could kill you from the sky at any time and regularly does kill women and children with no warning, would be one example.

The vast majority of citizens in the US either pay no attention to this at all, or think it's a a good thing. There is a minority who think it's awful. (I suspect these proportions are pretty similar in Russia).

Since the US is theoretically a democracy, we citizens could, one would think, easily stop these things by voting for different people, you'd think people would hold us more accountable and be really mad at us. But somehow they don't, they're like, eh, most people in the US are good people I don't blame them for their government!

And to be fair, I wish I knew how to get my government to do something different -- or how to get more people in the country to pay attention to the really catastrophically criminal things my goverment does, I don't feel like I have much control over it either. (Although surely more than Russians do, in the really not a democracy of Russia?) I do what I can, I am politically involved where I can find the energy to be. It doesn't feel like enough. I'm not sure I or my country-mates deserve the dispensation to not be held responsible.

I think most governments do awful -- really horrendous, murderous -- things. I think tmost people are fundamentally good people, but many citizens of powerful countries doing bad things have these days been hoodwinked to ignore them or support them.

I wish I knew what to do about it. One thing I am personally sure of is that it starts from not judging people by their ethnicity or nationality -- that kind of thinking is what helps governments convince their residents that the violent things they are doing to someone else are ok. That's the problem not the solution.

But I'm not opposed to boycotting as a tactic. I do support BDS against Israel. The BDS organizers have been very careful (and learning from experience) at trying to figure out how to do it in a way that is ethical and maximizes effectiveness. (I think the BDS campaign has been effective, relative to anything else done to try to support Palestinians, although not nearly as effective as one would like, which goes without saying as Israel continues it's decades-long occupation). But reading what they have to say on the topic of boycotts against invaders, Israel, and Russia, is in my opinion worthwhile: https://bdsmovement.net/Hypocrisy


> it starts from not judging people by their ethnicity or nationality

Russians that leave Russia are not blocked.

I am Hungarian by ethnicity. I will be probably also judged for the terrible policy of Orban. I feel deep shame for it. So I understand (a little) in what situation those "good" Russians are. And I know that those Russians support my decision and understand it.


[flagged]


> Iraq, Afghanistan, Libya, Syria, all within the very recent history, plus countless more US-backed color revolutions - including the one in your very own country, which realistically is the very reason for the current state of affairs in there.

Oh God! You and your conspiracy theories are annoying. If the U.S. is so powerful, why hasn't it organized a color revolution in Russia or at least in Serbia, maybe in pro-Russian Hungary? I was at both revolutions in Ukraine and I know why they arose, they were supported by the Ukrainian people, self-organized. And it's been like that all through our history. You don't know shit about the political situation in Ukraine and its history, but you think you have it all figured out. I'm sure you don't even know your own history. So don't talk bullshit!


yeah, things like McCain hanging out with the Euromaidan crowd in 2013 is not enough of a smoking gun. he just did it as a private citizen, same as he did with Syrian rebels. he was just quirky like that, right?

>If the U.S. is so powerful, why hasn't it organized a color revolution in Russia or at least in Serbia, maybe in pro-Russian Hungary?

you conveniently left out Belarus and Kazakhstan, who had attempts to do that literally the last year. both crushed with Russian help, which is probably the reason why Loukashenko is so friendly with Putin now

as for why they don't do that in Russia, why, they did manage to do that before. they even bragged about getting Yeltsin reelected on the cover of the Time magazine. the guy who oversaw a default, a defeat against Chechnya, and selling away the Soviet wealth to the emerging oligarch class for pennies on the dollar. not sure if the Russians are thankful for that help though

>I was at both revolutions in Ukraine and I know why they arose, they were supported by the Ukrainian people, self-organized. And it's been like that all through our history. You don't know shit about the political situation in Ukraine and its history, but you think you have it all figured out.

I know enough. you've had an equivalent of Jan 6, funded and armed from across the Atlantic. we just don't call that an insurrection when its convenient to us, just like we don't call the guys with swastika tattoos and flags "nazis" when they serve our interests


> US-backed color revolutions - including the one in your very own country,

I see

I hope you won't use pnpm and we won't speak again.


As much as you disagree with it, posting it on twitter to harass and get your followed to dunk on that person is not acceptable. https://twitter.com/ZoltanKochan/status/1511638290608308228

Also please do not misunderstand, people mention the US acts in order to point out the hypocrisy shown, not to justify the invasion.


ah, I was wondering why did this comment chain get flagged so long after the fact


I don't intend to, and yes, hopefully we won't


> Trump, the only president in recent history who did not start any wars

All of this "Trump is the ambassador of peace" rhetoric may almost convince you to forget that 90% of his electorate are gun-crazed maniacs.


yeah sure, 90% of 50% of eligible voters in the US are gun-crazed maniacs. and still, his record is minus one war, unlike every other president all the way back to... shit, I can't even tell without looking it up. I wasn't even around the last time there was one.


Reagan I think. That being said this is likely because he served only one term. Obama bombed Libya on his second term.


Oh, I thought that you were Hungarian (after reading https://github.com/pnpm/pnpm/issues/1080#issuecomment-373872...), but I guess you are both? Your reaction makes more sense in that case. Although I do hope that you will reconsider the idea of a permanent block, I believe that open source (and the world in general) would be much worse and divides between nations would be greater if Greek software blocked Turkey, Israeli software blocked Germany, middle eastern software blocked the US, etc.


> After the atrocities that their army has committed in my country, I do not think I will ever unblock traffic from Russian Federation.

Are you gonna ban Israeli for their apartheid, chinese for the uighurs concentration camps, myanmari for ethnic cleansings of Rohingya? What about americans and the 200k civilians killed in iraq in an illegal and unprovoked aggression?

See what's the point of doing lame politics like that? You end up declaring to the world that 800 villages burned and 50k civilians thrown in fire matter none to you because they aren't white.

I feel disgust at these double standards, at showing to the world that there are tier 1 and tier 2 victims.

Or do you just care a


Not symlinks. Hard links. Or copy-on-write on systems that support them.


[EDIT: (thanks ttybird2! b^)] We might need to change the following diagram?

https://pnpm.io/motivation

It appears to show several symlinks? Thanks for pnpm!


You are actually replying to the pnpm maintainer :p


It is unrelated because you don't have this issue with pnpm. pnpm uses a central content-addressable store and each unique file is written only once on a disk. It doesn't matter in how many projects you install the same dependency.


I think GP was amazed by the sheer number of dependencies, not by the how many of them are duplicated. It also amazes me. People talking above about having 10s of GB of dependencies. Crazy to me.


This amazes me as well. At work we have a simple website which has 1 GB of node_modules and the actual source code is well under a megabyte.


I'm very curious to know how in the world a node_modules directory can grow above 1GB! Which dependencies are the worst offenders? Is it dominated by a few huge deps?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: