Skip to content

Instantly share code, notes, and snippets.

Zoltan Kochan zkochan

Block or report user

Report or block zkochan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .modules.yaml
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 Aug 30, 2019
overrides for pnpmfile.js
View overrides.json
{
"jest-resolve": {
"peerDependencies": {
"jest-haste-map": "*"
}
},
"winston-transport": {
"peerDependencies": {
"logform": "*"
}
@zkochan
zkochan / package.json
Last active Jul 20, 2019
How to force users of a repository to use pnpm for installation
View package.json
{
"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)\""
}
}
View shrinkwrap.yaml
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 Jun 13, 2019
filtering in pnpm vs lerna
View .md
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
View output.js
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 Mar 27, 2018
How peers are resolved
View How peers are resolved 1.md
- .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 Sep 2, 2017
overriding resolve
View pnpmfile.js
'use strict'
module.exports = {
hooks: {
readPackage
}
}
function readPackage (pkg) {
if (!pkg.dependencies) return pkg
View gist:9adfc3529a480d16fe39f66763ef820c
zkochan@zkochan:~/src/test/vscode1$ npm i vscode-ripgrep
> vscode-ripgrep@0.0.12 postinstall /home/zkochan/src/test/node_modules/vscode-ripgrep
> node ./dist/postinstall.js
module.js:471
throw err;
^
Error: Cannot find module 'github-releases'
@zkochan
zkochan / testimonials.md
Created Jun 30, 2017
pnpm testimonials
View testimonials.md
You can’t perform that action at this time.