Skip to content

Instantly share code, notes, and snippets.

use reqwest::Client;
use miette::{IntoDiagnostic, Result};
use tar::Archive;
use std::{
collections::HashMap,
io::{Cursor, Read, Write},
path::PathBuf,
};
use ssri::Integrity;
@zkochan
zkochan / keybase.md
Created August 17, 2021 12:58
keybase.md

Keybase proof

I hereby claim:

  • I am zkochan on github.
  • I am zkochan (https://keybase.io/zkochan) on keybase.
  • I have a public key whose fingerprint is 7B74 D129 9568 B586 BA99 62B5 649E 4D4A F74E 7DEC

To claim this, I am signing this object:

hoistPattern:
- '*'
hoistedAliases:
github.com/adamwdraper/Numeral-js/a7a2dedde724ee6c74cf3370b958c06d19c54659:
- numeral
registry.npmjs.org/@babel/code-frame/7.5.5:
- '@babel/code-frame'
registry.npmjs.org/@babel/generator/7.6.3:
- '@babel/generator'
registry.npmjs.org/@babel/helper-annotate-as-pure/7.0.0:
@zkochan
zkochan / overrides.json
Created August 30, 2019 20:27
overrides for pnpmfile.js
{
"jest-resolve": {
"peerDependencies": {
"jest-haste-map": "*"
}
},
"winston-transport": {
"peerDependencies": {
"logform": "*"
}
@zkochan
zkochan / package.json
Last active July 20, 2019 19:22
How to force users of a repository to use pnpm for installation
{
"scripts": {
"preinstall": "node --eval \"!process.env.npm_config_user_agent.startsWith('pnpm/')&&(console.log('Use `pnpm install` to install dependencies in this repository')||true)&&process.exit(1)\""
}
}
importers:
.:
devDependencies:
add-stream: 1.0.0
commitizen: 2.10.1
conventional-changelog: 2.0.3
cz-customizable: 5.2.0
ejs: 2.6.1
husky: 1.0.0-rc.14
jase: 1.2.0
@zkochan
zkochan / .md
Last active November 15, 2021 14:43
filtering in pnpm vs lerna
Lerna v3.2 pnpm v2.15
--scope my-component -- my-component
--scope toolbar-* -- toolbar-*
--scope my-component --include-filtered-dependencies -- my-component...
--scope my-component --include-filtered-dependents -- ...my-component
const chalk = require('chalk')
var diff = require('ansi-diff')({
// if you want to support word wrapping, provide the terminal width
width: process.stdout.columns
})
// render now
render1()
@zkochan
zkochan / How peers are resolved 1.md
Last active March 27, 2018 22:01
How peers are resolved
- .registry.npmjs.org / foo / 1.0.0 / node_modules
  hard link to the specific foo package in the store
  - foo
  dependencies of foo, symlinks to folders where these deps are resolved with their deps
  - qux
  - plugh
@zkochan
zkochan / pnpmfile.js
Created September 2, 2017 13:08
overriding resolve
'use strict'
module.exports = {
hooks: {
readPackage
}
}
function readPackage (pkg) {
if (!pkg.dependencies) return pkg