Facebook ties JavaScript code together with Yarn

Package management client hits 1.0


Facebook, known for telling tales about users it doesn't have, has spun another sort of yarn.

The ad gavage network on Thursday released Yarn 1.0, the latest update to the open source JavaScript package manager introduced last year with the help of Google, Exponent and Tilde.

Yarn is an alternative to npm (Node Package Manager), the default package manager for Node.js installations.

Both Yarn and npm, backed by a company called npm, make JavaScript development more tolerable by managing the code libraries that become unavoidable when developing modern web applications.

Yarn and npm, as client applications, connect to the npm registry, home to almost half a million packages, to fetch however many bundles of code are required by the application in question.

According to Facebook, there are now more than 175,000 projects on GitHub that use Yarn and the software now handles over 3 billion package downloads a month.

"Yarn's main focus when we launched almost a year ago was stability, resiliency, and performance," said Facebook engineers Burak Yiğit Kaya, Christoph Nakazawa, and Maël Nison in a blog post.

They claim that large companies like Twitter and Microsoft have used the software and reduced package install times by a factor of five.

In addition to speed, Yarn's main reason for being is to make the installations more reliable and reproducible through the inclusion of lockfiles. These files limit installed dependences to a specific version, in order to make every install result in the same file structure – in the node_modules folder – across all machines.

Yarn's deterministic approach to package management has particular appeal to devops automation, where scripts demand consistent behavior.

Version 1.0 of Yarn adds some new bells and whistles. A feature called Workspaces is designed to make life easier for companies that prefer a single large code repository, to avoid dependency synchronization problems, over distributed repositories.

Workspaces allows users to gather dependences listed in multiple package.json files and install them in subfolders of a single root package.json file, under a single lock file. To ensure that current code gets used across all projects, Yarn builds symlinks between Workspaces that depend on each other.

Yarn includes a new auto-merge mechanism, to resolve lockfile merge conflicts that may arise after the yarn install command.

In addition, there's a selective version resolution feature designed to handle situations where layers of dependencies delay the availability of patched code. Instead of waiting for a direct dependency to be updated or forking code for a fix, the resolution field in package.json files can demand specific versions of sub-dependencies.

Kaya, Nakazawa, and Nison say they hope to make Yarn more useful for providing some assurance that packages are safe. They say they're planning to work with npm to add two-factor authentication to Yarn to enhance package security, which has proven to be something of an issue for npm.


Other stories you might like

  • New York City rips out last city-owned public payphones
    Y'know, those large cellphones fixed in place that you share with everyone and have to put coins in. Y'know, those metal disks representing...

    New York City this week ripped out its last municipally-owned payphones from Times Square to make room for Wi-Fi kiosks from city infrastructure project LinkNYC.

    "NYC's last free-standing payphones were removed today; they'll be replaced with a Link, boosting accessibility and connectivity across the city," LinkNYC said via Twitter.

    Manhattan Borough President Mark Levine said, "Truly the end of an era but also, hopefully, the start of a new one with more equity in technology access!"

    Continue reading
  • Cheers ransomware hits VMware ESXi systems
    Now we can say extortionware has jumped the shark

    Another ransomware strain is targeting VMware ESXi servers, which have been the focus of extortionists and other miscreants in recent months.

    ESXi, a bare-metal hypervisor used by a broad range of organizations throughout the world, has become the target of such ransomware families as LockBit, Hive, and RansomEXX. The ubiquitous use of the technology, and the size of some companies that use it has made it an efficient way for crooks to infect large numbers of virtualized systems and connected devices and equipment, according to researchers with Trend Micro.

    "ESXi is widely used in enterprise settings for server virtualization," Trend Micro noted in a write-up this week. "It is therefore a popular target for ransomware attacks … Compromising ESXi servers has been a scheme used by some notorious cybercriminal groups because it is a means to swiftly spread the ransomware to many devices."

    Continue reading
  • Twitter founder Dorsey beats hasty retweet from the board
    We'll see you around the Block

    Twitter has officially entered the post-Dorsey age: its founder and two-time CEO's board term expired Wednesday, marking the first time the social media company hasn't had him around in some capacity.

    Jack Dorsey announced his resignation as Twitter chief exec in November 2021, and passed the baton to Parag Agrawal while remaining on the board. Now that board term has ended, and Dorsey has stepped down as expected. Agrawal has taken Dorsey's board seat; Salesforce co-CEO Bret Taylor has assumed the role of Twitter's board chair. 

    In his resignation announcement, Dorsey – who co-founded and is CEO of Block (formerly Square) – said having founders leading the companies they created can be severely limiting for an organization and can serve as a single point of failure. "I believe it's critical a company can stand on its own, free of its founder's influence or direction," Dorsey said. He didn't respond to a request for further comment today. 

    Continue reading
  • Snowflake stock drops as some top customers cut usage
    You might say its valuation is melting away

    IPO darling Snowflake's share price took a beating in an already bearish market for tech stocks after filing weaker than expected financial guidance amid a slowdown in orders from some of its largest customers.

    For its first quarter of fiscal 2023, ended April 30, Snowflake's revenue grew 85 percent year-on-year to $422.4 million. The company made an operating loss of $188.8 million, albeit down from $205.6 million a year ago.

    Although surpassing revenue expectations, the cloud-based data warehousing business saw its valuation tumble 16 percent in extended trading on Wednesday. Its stock price dived from $133 apiece to $117 in after-hours trading, and today is cruising back at $127. That stumble arrived amid a general tech stock sell-off some observers said was overdue.

    Continue reading
  • Amazon investors nuke proposed ethics overhaul and say yes to $212m CEO pay
    Workplace safety, labor organizing, sustainability and, um, wage 'fairness' all struck down in vote

    Amazon CEO Andy Jassy's first shareholder meeting was a rousing success for Amazon leadership and Jassy's bank account. But for activist investors intent on making Amazon more open and transparent, it was nothing short of a disaster.

    While actual voting results haven't been released yet, Amazon general counsel David Zapolsky told Reuters that stock owners voted down fifteen shareholder resolutions addressing topics including workplace safety, labor organizing, sustainability, and pay fairness. Amazon's board recommended voting no on all of the proposals.

    Jassy and the board scored additional victories in the form of shareholder approval for board appointments, executive compensation and a 20-for-1 stock split. Jassy's executive compensation package, which is tied to Amazon stock price and mostly delivered as stock awards over a multi-year period, was $212 million in 2021. 

    Continue reading
  • Confirmed: Broadcom, VMware agree to $61b merger
    Unless anyone out there can make a better offer. Oh, Elon?

    Broadcom has confirmed it intends to acquire VMware in a deal that looks set to be worth $61 billion, if it goes ahead: the agreement provides for a “go-shop” provision under which the virtualization giant may solicit alternative offers.

    Rumors of the proposed merger emerged earlier this week, amid much speculation, but neither of the companies was prepared to comment on the deal before today, when it was disclosed that the boards of directors of both organizations have unanimously approved the agreement.

    Michael Dell and Silver Lake investors, which own just over half of the outstanding shares in VMware between both, have apparently signed support agreements to vote in favor of the transaction, so long as the VMware board continues to recommend the proposed transaction with chip designer Broadcom.

    Continue reading

Biting the hand that feeds IT © 1998–2022