JSJ 266 NPM 5.0 with Rebecca Turner

JSJ 266 NPM 5.0 with Rebecca Turner

On today’s episode of JavaScript Jabber, Charles Max Wood and panelist Joe Eames chat with Rebecca Turner, tech lead for https://www.npmjs.com/, a popular Javascript package manager with the worlds largest software registry. Learn about the newly released NPM 5 including a few of the updated features. Stay tuned![1:58] Was the release of node JS 8 tied to NPM5?
- Features in NPM5 have been in planning for 2 years now.
- Planned on getting it out earlier this year.
- Node 8 was coming out and got pushed out a month.
- Putting NPM5 into Node 8 became doable.
- Pushed really hard to get NPM5 into https://nodejs.org/en/blog/release/v8.0.0/ so that users would get NPM5 and updates to NPM5.
[2:58] Why would it matter? NPM doesn’t care right?
- Right you can use NPM5 with any version of node.
- Most people don’t update NPM, but upgrade Node.
- So releasing them together allowed for when people updated Node they would get NPM 5.
[3:29] How does the upgrade process work if you’re using NVM or some node version manager?
- Depends. Different approaches for each
- NVM gets a fresh copy of Node with new globals. NVM5 and Node 8 are bundled.
- For some, If you manually upgrade NVM you’ll always have to manually. It will keep the one you manually upgraded to.
[4:16] Why NPM 5?
- It’s night and day faster.
- 3 to 5 times speed up is not uncommon.
- Most package managers are slow.
- NPM 5 is still growing. Will get even faster.
[5:18] How did you make it faster?
- The NPM’s cache is old. It’s very slow. Appalling slow.
- Rewrote cache
- Saw huge performance gains
[5:49] What is the function of the cache?
- Cache makes it so you don’t have to reinstall modules from the internet.
- It has registry information too.
- It will now obey http headers for timing out cache.
[6:50] Other things that made it faster?
- Had a log file for a long time. It was called https://docs.npmjs.com/cli/shrinkwrap.
- NPM 5 makes it default.
- Renamed it to packagelog.json
- Exactly like shrinkwrap package file seen before
- In combo with cache, it makes it really fast.
- Stores information about what the tree should look like and it’s general structure.
- It doesn’t have to go back and learn versions of packages.
[7:50] Can you turn the default Packagelog.json off?
- Yes. Just:
- Set packagelog=false in the npmrc
[8:01] Why make it default? Why wasn’t it default before?
- It Didn’t have it before. Shrinkwrap was added as a separate project enfolded in NPM and wasn’t core to the design of NPM.
- Most people would now benefit from it. Not many scenarios where you wouldn’t want one.
- Teams not using the same tools causes headaches and issues.
[9:38] Where does not having a lock show up as a problem?
- It records the versions of the packages installed and where NPM put them so that when you clone a project down you will have exactly the same versions across machines.
- Collaborators have the exact same version.
- Protects from issues after people introduce changes and patch releases.
- NPM being faster is just a bonus.
- Store the sha512 of the package that was installed in the glock file so that we can verify it when you install. It’s Bit for bit what you had previously.
[11:12] Could you solve that by setting the package version as the same version as the .Json file?
- No. That will lock down the versions of the modules that you install personally, not the dependancies, or transitive dependancies.
- Package log allows you to look into the head of the installer. This is what the install looks like.
[12:16] Defaulting the log file speed things up? How?
- It doesn’t have to figure out dependences or the tree which makes it faster.
- Shrinkwrap command is still there, it renames it to shrinkwrap but shrinkwrap cannot be published.
- For application level things or big libraries, using shrinkwrap to lock down versions is popular.
[13:42] You’ve Adopted specifications in a ROC process. When did you guys do that?
- Did it in January
- Have been using them internally for years. Inviting people into the process.
- Specifications
- Written in the form of “Here is the problem and here are the solutions.”
- Spec folder in NPM docs, things being added to that as they specify how things work.
- Spec tests have been great.
[14:59] The update adds new tools. Will there be new things in registry as well?
- Yes.
- Information about a package from registry, it returns document that has info about every version and package json data and full readme for every version.
- It gets very large.
- New API to request smaller version of that document.
- Reduces bandwidth, lower download size, makes it substantially faster.
- Used to be hashed with sha1, With this update it will be hashed with sha512 as well as sha1 for older clients.
[16:20] Will you be stopping support for older versions?
- LTS version of NPM was a thing for a while. They stopped doing that.
- Two models, people either use whatever version came with Node or they update to the latest.
- The NPM team is really small. Hard to maintain old NPM branches.
- Supports current versions and that’s pretty much it.
- If there are big problems they will fix old versions. Patches , etc.
[17:36] Will there ever be problems with that?
- Older versions should continue to work. Shouldn’t break any of that.
- Can’t upgrade from 0.8.
- It does break with different Node version
- Does not support Node versions 0.10 or 0.12.
[18:47] How do you upgrade to NPM?
- sudo npm install -gmpm
- Yes, you may not need sudo. depend on what you’re on.
[19:07] How long has it been since version 4?
- Last October is when it came out.
[19:24] Do you already have plans for version 6?
- Yes!
- More releases than before coming up.
- Finally deprecating old features that are only used in a few packages out of the whole registry.
- Running tests on getting rid of things.
[20:50] Self healing cache. What is it and why do we want it?
- Users are sometimes showing up where installs are broken and tarbols are corrupted.
- This happens sometimes with complicated containerization setups makes it more likely. It’s unclear where the problem actually is.
- https://www.npmjs.com/package/cacache - content addressable cache. Take the hash of your package and use it to look up address to look it up in the cache.
- Compares the Tarbol using an address to look it up in the cache.
- Compares to see if it’s old. Trashes old and downloads updated one.
- Came out with the cache. Free side effect of the new cache.
[23:14] New information output as part of the update?
- NPM has always gave back you the tree from what you just installed.
- Now, trees can be larger and displaying that much information is not useful.
- User patch - gives you specifically what you asked for.
- Information it shows will be something like: “I installed 50 items, updated 7, deleted 2.”
[24:23] Did you personally put that together?
- Yes, threw it together and then got feedback from users and went with it.
- Often unplanned features will get made and will be thrown out to get feedback.
- Another new things ls output now shows you modules that were deduped. Shows logical tree and it’s relationships and what was deduped.
[25:27] You came up to node 4 syntax. Why not go to node 8?
- To allow people with just node 4 be able to use NPM.
- Many projects still run Node 4. Once a project has been deployed, people generally don’t touch it.
[26:20] Other new features? What about the File Specifier?
- File specifier is new. File paths can be in package json, usually put inside pointing to something inside your package.
- It will copy from there to your node modules.
- Just a node module symlink.
- Much faster. Verifiable that what’s in your node modules matches the source. If it’s pointing at the right place it’s correct. If not, then it’s not.
- Earlier, sometimes it was hard to tell.
[27:38] Anything else as part of the NPM 5 release? Who do you think will be most affected by it?
- For the most part, people notice three things:
- 1st. no giant tree at the end
- 2nd. Much faster
- 3rd. Package lock.
[28:14] If it’s locked, how do you update it?
- Run npm installer and then npm update
- Used to be scary, but works well now.
- Updates to latest semver, matches semver to package json to all node modules.
- Updates package lock at the same time
- Summary in Git shows what’s changed.
[28:59] Did Yarn come into play with your decisions with this release?
- The plans have been in play for a long time for this update.
- https://yarnpkg.com/en/ inclusion of similar features and the feedback was an indicator that some of the features were valuable.
[29:53] Other plans to incorporate features similar to yarn?
- Features are already pretty close.
- There are other alternative package managers out there.
- PMPM interesting because when it installs it doesn’t copy all the files. It c

Become a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

Episoder(734)

Interactive Coding Tutorials with Tomek Salkowski: Enhancing Developer Experiences - JSJ 651

Interactive Coding Tutorials with Tomek Salkowski: Enhancing Developer Experiences - JSJ 651

AJ and Steve dive deep into the world of interactive coding tutorials alongside guest, Tomek Sułkowski. They kick off with a brief chat about the weather before delving into Tomek's expertise in creating engaging and interactive tutorials—shedding light on everything from the history of coding tutorials to the technical wonders of web containers, brought to prominence by platforms like Stackblitz.They explore the innovative "tutorials kit dot dev," a revelatory tool for developers, and discuss the triumphs and challenges in building these interactive learning experiences. Plus, discover amazing tech insights from AJ, development updates from Tomek, and a whole lot more. SocialsLinkedIn: Tomek Sułkowski PicksAJ - Rocky Mountain ATVAJ - pg-essentialsAJ - SSH now has IncludeAJ - DeepSeek-Coder-v2Tomek - Component partyTomek - IconesBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

1 Okt 202457min

Optimizing SQL and ORM Practices for High-Performance Applications - JSJ 650

Optimizing SQL and ORM Practices for High-Performance Applications - JSJ 650

In today's episode, Charles, Steve, and AJ, are joined by back-end engineer and team lead at Homebound, Stephen Haberman. We delve into the fascinating world of SQL c and its revolutionary approach to managing SQL queries with dedicated SQL files, delivering benefits such as reduced typing errors and pre-deployment checks. Stephen also walks us through the advantages and limitations of ORMs versus query builders like Prisma and Drizzle, sharing insights into Joyce ORM's unique philosophy and simplified CRUD operations.They explore the intricacies of Domain Driven Design (DDD), its emphasis on ubiquitous language, and how it shapes business logic and storage management. AJ contributes by discussing the potential of SQL c and Slonik for dynamic query building. Additionally, they discuss Steven's innovative work with GraphFileWorker and GrafAST, highlighting the performance improvements in GraphQL backends. Whether you're intrigued by the technicalities of ORMs, the evolution of database tools, or just love a good anecdote, this episode packed with technical insights and lively discussions is one you won't want to miss. Join them on this journey into the world of database management and development!SocialsLinkedIn: Stephen HabermanPicks AJ - TypeScript to JSDocAJ - MySQL to TypeScriptAJ - sqlcAJ - Slonik (Node + Postgres)AJ - SwiftUI EssentialsAJ - Introduction to SwiftUI AJ - Trump, but not saying dumb thingsCharles - Biblios | Board GameCharles - FreeStyle Libre 3 System | Continuous Glucose MonitoringStephen - Grafast | GrafastBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

24 Sep 20241h 31min

Mentorship in Tech: Balancing Professionalism and Friendship for Maximum Growth and Accountability - JSJ 649

Mentorship in Tech: Balancing Professionalism and Friendship for Maximum Growth and Accountability - JSJ 649

They dive deep into the world of mentorship, personal growth, and problem-solving with our special guests, Joao and Manny, alongside our insightful panelists, AJ and Charles.In this episode, they explore the transformative power of weekly accountability meetings (WAM), where tasks are committed and followed up with a yes or no, no excuses allowed. Joao and Manny share their journey of mentorship that crossed borders, forging a strong bond through adversity and mutual respect. We'll also delve into how their dynamic friendship amplifies professional standards, and the importance of balancing personal and professional relationships.We discuss the profound impacts of structured problem-solving methods, specifically George Polya's renowned four-step process. Joao and Manny highlight how this systematic approach has refined their coding skills and overall problem-solving abilities. Alongside, we touch upon the fascinating intersection of human learning and AI, emphasizing the unique capacity humans have for generalizing new problems from limited data.In addition, our speakers will share their roadmap for continuous learning, curriculum development, and practical exercises—highlighting tools like Trello for task management and Anki for reinforcing learning. AJ O'Neil offers his unique perspective on the talent it takes to thrive in programming and how personal enjoyment is crucial for sustained success.Later, we'll transition to our Picks section, where AJ, Charles, and the guests share their latest recommendations, from essential productivity tools and engaging books to top-notch apps and board games.Finally, we'll wrap up with some valuable insights on time management, consistent study habits, and the importance of finding a mentor who truly cares about your growth. Whether you're a seasoned developer or just starting out, this episode is packed with practical advice and inspiring stories that you won't want to miss. So, tune in for all this and more on Top End Devs!PicksAJ - Apple EarpodsAJ - SwiftUICharles - Biblios | Board GameCharles - FreeStyle Libre 3 SystemManny - Jaco: The Extraordinary and Tragic Life of Jaco PastoriusManny - Baldur's Gate 3 on SteamBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

17 Sep 20241h 19min

Unpacking Deno 2: Code Stability, Free Speech, and more - JSJ 648

Unpacking Deno 2: Code Stability, Free Speech, and more - JSJ 648

Today, Charles, Dan, AJ, and Steve dive into a range of fascinating discussions. Joining this episode is special guest, Ryan Dahl, the visionary creator behind Node.js and Deno.In this episode, they traverse an eclectic mix of topics, from humorous offbeat news and dad jokes to in-depth tech discussions. They explore the complexities and legalities surrounding free speech, offering diverse perspectives on its implications in the modern digital landscape.But the heart of our discussion is Ryan Dahl's exploration of Deno 2, the latest evolution in JavaScript's runtime environment. You'll hear about its distinctive features, including the revolutionary JSR project, and how it aims to simplify and secure modern JavaScript development, addressing challenges and limitations found in Node.js. They also discuss the intricacies of TypeScript support, Deno’s security model, and the future potential of JavaScript in data science.Join them for a lively conversation packed with insights, technical deep-dives, and plenty of humor. Whether you're a seasoned developer or just starting your coding journey, this episode is sure to offer valuable takeaways and an entertaining ride through the world of modern web development.Sponsors Wix StudioSocialsLinkedIn: Ryan DahlTwitter: @deno_landDenoPicksAJ - SwiftAJ - DenoCharles - Challengers! | Board GameRyan - GrainBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

10 Sep 20241h 34min

Opinionated Core Web Vitals - JSJ 647

Opinionated Core Web Vitals - JSJ 647

Dan Shappir takes the lead this week to discuss Core Web Vitals and how Google is pushing the web to be faster.He leads Chuck, Aimee, and AJ through the ways that developers can measure and improve the performance of websites based on the statistics specified by Google as components of Google rankings.Sponsors Wix StudioLinksWeb VitalsPicksAimee- GitHub | treosh/lighthouse-ci-actionAimee- GitHub | GoogleChrome/lighthouse-ciAJ- Classless CSSAJ- One FinanceAJ- JCS - Criminal Psychology - YouTubeAJ- Auth Library Live StreamCharles- Atlas Shrugged Charles- Dev Influencers | Devchat.tvDan- Core Web Vitals Technology ReportDan- Math Has a Fatal Flaw - YouTubeBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

3 Sep 20241h 10min

Beyond JavaScript: Master TypeScript at Scale at SquiggleConf  - JSJ 646

Beyond JavaScript: Master TypeScript at Scale at SquiggleConf - JSJ 646

Dan together with Josh Goldberg, a prominent open-source maintainer and author of "Learning TypeScript, dive into the world of TypeScript and JavaScript with a special focus on the upcoming Squiggleconf. In this episode, they'll detail the conference format, including its dedicated days for talks and workshops, and highlight the impressive lineup of speakers who will cover topics like ASTs, TypeScript at scale, and essential documentation practices.Josh also shares insights into the evolution and practical application of TypeScript ESLint. Expect a deep dive into TypeScript's latest features, such as generics and specific lint rules that enhance code quality and developer experience.SocialsLinkedIn: ‌Josh ‌GoldbergPicksDan - Dan's favorite standalone fantasy booksDan - Despicable Me and MinionsJosh - NeuromancerJosh - WitcherBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

28 Aug 20241h 10min

Deep Dive into Metrics and Monitoring with Prometheus and Grafana - JSJ 645

Deep Dive into Metrics and Monitoring with Prometheus and Grafana - JSJ 645

Dive into a fascinating discussion blending the worlds of literature, gaming, and tech. In this episode, Chuck and Dan explore the intriguing connections between The Hobbit and The Lord of the Rings, including an extraordinary tale about Israeli pilots translating The Hobbit during wartime. They share insights into Guy Gavriel Kaye’s standalone novel Tigana, inspired by Renaissance Italy, and discuss the complexities and strategies of board games like Monopoly and Letters from Whitechapel.But that’s not all. The episode takes a technical turn as the speakers delve into the dynamic world of application monitoring with Prometheus. They unpack the mechanics of event loop lag, heap usage, and GC storms, and share how Prometheus's query language (PromQL) and integration with Grafana can proactively manage and solve performance issues. Hear about real-time alerting, sophisticated querying, and the practical applications of these tools in companies like Next Insurance and Sisense.This episode is packed with information - from managing performance metrics and alerting systems to insightful discussions on favorite standalone fantasy novels and the productivity hacks that keep our hosts on top of their game. So, sit back and join us for an engaging and informative session on Top End Devs!SocialsLinkedIn: Chuck WoodLinkedIn: Dan ShappirPicksCharles - Letters from Whitechapel | Board GameCharles - TrainingPeaks | Empower Your TrainingBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

20 Aug 20241h 25min

Crafting Code and Community: AI, LeetCode, and Meetups - JSJ 644

Crafting Code and Community: AI, LeetCode, and Meetups - JSJ 644

In this episode, they dive deep into the world of coding, meetups, and the evolving landscape of technical interviews. Join them as they explore the fascinating use of OpenAI's technology for coding assistance, the challenges of setting up impactful meetups, and the intricacies of mastering LeetCode problems.Our experts share invaluable insights—from leveraging AI tools like GPT to generate code effectively, to the essential strategies for problem-solving during high-pressure technical interviews. They also touch on the importance of deliberate practice, group support, and finding the right mindset for tackling coding challenges. Plus, hear personal stories about the benefits of taking breaks, the role of LeetCode in honing coding skills, and the shift in interview styles towards speed and pattern recognition.Sponsors Wix StudioSocialsAnatoliy D. ZaslavskiyLinksNYC LeetCode SquadPicksAJ - Yumi and the Nightmare Painter by Brandon SandersonAJ - The ChosenAJ - Beauty & The BeatAnatoliy - Authentic relatingAnatoliy - Neurodivergent Guide to the WorkplaceCharles - Challengers! | Board GameSteve - Myspace celebrates its 21st birthday. Do we still need it?Become a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

13 Aug 20241h 9min

Populært innen Business og økonomi

stopp-verden
dine-penger-pengeradet
lydartikler-fra-aftenposten
rss-penger-polser-og-politikk
kommentarer-fra-aftenposten
e24-podden
rss-borsmorgen-okonominyhetene
utbytte
finansredaksjonen
pengepodden-2
tid-er-penger-en-podcast-med-peter-warren
pengesnakk
stormkast-med-valebrokk-stordalen
livet-pa-veien-med-jan-erik-larssen
morgenkaffen-med-finansavisen
rss-markedspuls-2
okonomiamatorene
rss-investering-gjort-enkelt
rss-fri-kontantstrom
paretopodden