Skip to content

Instantly share code, notes, and snippets.

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 June 30, 2017 08:20
pnpm testimonials
@zkochan
zkochan / README.md
Last active November 2, 2021 05:40
Question on Gitter about pnpm hard links
7zip-bin-linux@^1.0.3:
id: registry.npmjs.org/7zip-bin-linux/1.0.3
shasum: 66724d7bb7526381574393888f62566ed537151c
tarball: 'https://registry.npmjs.org/7zip-bin-linux/-/7zip-bin-linux-1.0.3.tgz'
7zip-bin-mac@^1.0.1:
id: registry.npmjs.org/7zip-bin-mac/1.0.1
shasum: 3e68778bbf0926adc68159427074505d47555c02
tarball: 'https://registry.npmjs.org/7zip-bin-mac/-/7zip-bin-mac-1.0.1.tgz'
7zip-bin-win@^2.0.2:
id: registry.npmjs.org/7zip-bin-win/2.0.2
@zkochan
zkochan / README.md
Last active December 1, 2016 21:51
How to migrate a project to TypeScript
  1. Use lebab to convert your modules to ES2015 modules.
lebab es5.js -o es6.js --transform commonjs
  1. Change the .js extensions to .ts.
  2. Install typescript as a devDependency to your package
@zkochan
zkochan / README.md
Created November 17, 2016 18:42
How to migrate an npm package to TypeScript

Rename all .js files to .ts files

ERROR in /home/zkochan/.pnpm/.store/flat/babel-polyfill@6.16.0/_/lib/index.js
Module not found: Error: Cannot resolve module 'babel-loader' in /home/zkochan/.pnpm/.store/flat/babel-polyfill@6.16.0/_/lib
@ /home/zkochan/.pnpm/.store/flat/babel-polyfill@6.16.0/_/lib/index.js 3:0-23
ERROR in /home/zkochan/.pnpm/.store/flat/babel-polyfill@6.16.0/_/lib/index.js
Module not found: Error: Cannot resolve module 'babel-loader' in /home/zkochan/.pnpm/.store/flat/babel-polyfill@6.16.0/_/lib
@ /home/zkochan/.pnpm/.store/flat/babel-polyfill@6.16.0/_/lib/index.js 7:0-35
ERROR in /home/zkochan/.pnpm/.store/flat/babel-polyfill@6.16.0/_/lib/index.js
Module not found: Error: Cannot resolve module 'babel-loader' in /home/zkochan/.pnpm/.store/flat/babel-polyfill@6.16.0/_/lib
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
10% building modules 4/6 modules 2 active ...re/style-loader@0.13.1/_/addStyles.jsTypeError: Cannot read property 'directoryExists' of undefined
at Object.getAutomaticTypeDirectiveNames (/home/zkochan/src/test/issue394/node_modules/.store/typescript@2.0.0/_/lib/typescript.js:43865:17)
at State.loadTypesFromConfig (/home/zkochan/src/test/issue394/node_modules/.store/awesome-typescript-loader@2.2.4/_/src/host.ts:150:36)
at new State (/home/zkochan/src/test/issue394/node_modules/.store/awesome-typescript-loader@2.2.4/_/src/host.ts:144:14)
at Object.ensureInstance (/home/zkochan/src/test/issue394/node_modules/.store/awesome-typescript-loader@2.2.4/_/src/instance.ts:150:19)
at compiler (/home/zkochan/src/test/issue394/node_modules/.store/awesome-typescript-loader@2.2.4/_/src/index.ts:37:20)
at Object.loader (/home/zkochan/src/test/issue394/node_module
@zkochan
zkochan / create-app.js
Created March 11, 2016 16:14
create-app
'use strict';
module.exports = createApp;
var createElement = require('virtual-dom/create-element');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/patch');
function createApp(mount) {
var tree;
var node;
@zkochan
zkochan / example.js
Created February 7, 2016 18:31
hexi-passport API
server.route.pre(function(next, opts) {
if (!opts.config.passport) return next(opts);
if (opts.config.passport.authenticate) {
opts.handler = [
function(req, res, next) {
var passportOpts = opts.config.passport.authenticate[req.params.provider] ||
opts.config.passport.authenticate.default;
passport.authenticate(req.params.provider, passportOpts)(req, res, next);
},