{"id":16528665,"url":"https://github.com/zetlen/fenestrate","last_synced_at":"2025-09-12T20:31:49.288Z","repository":{"id":21808359,"uuid":"25131006","full_name":"zetlen/fenestrate","owner":"zetlen","description":"helps npm modules avoid the 260-character path limit on Windows","archived":false,"fork":false,"pushed_at":"2016-05-06T02:55:07.000Z","size":30,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-22T23:24:52.579Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zetlen.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-12T20:22:23.000Z","updated_at":"2021-08-19T15:27:44.000Z","dependencies_parsed_at":"2022-08-20T00:00:29.298Z","dependency_job_id":null,"html_url":"https://github.com/zetlen/fenestrate","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/zetlen/fenestrate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Ffenestrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Ffenestrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Ffenestrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Ffenestrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zetlen","download_url":"https://codeload.github.com/zetlen/fenestrate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Ffenestrate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274873238,"owners_count":25365823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T17:41:09.164Z","updated_at":"2025-09-12T20:31:49.051Z","avatar_url":"https://github.com/zetlen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nfenestrate\n==========\n\nFlatten the dependency graph for your NPM package so that it's less likely\nto bump up against the 260-char path limit on Windows. Does not assign blame\nor bloviate about whose responsibility this whole mess is.\n\n**The package needs to be fully installed before fenestrate configuration \ncreation will work. Run `npm install` before `fenestrate` if you haven't\nalready installed the module in place. `fenestrate rewrite` on the other hand\ndoes not require installation first.**\n\nInstallation:\n\n    npm install -g fenestrate\n\nUsage:\n\n    C:\\some\\long\\path\u003e fenestrate make .\\module\n\n(Of course it works on *nix systems as well.)\n\nCommon Commands:\n\n\n`make`    updates the package.json file in the current directory to contain a\n          __fenestrate configuration that can be used to rewrite the\n          node_modules directory later, using `fenestrate rewrite-full`.\n\n`rewrite` rewrites the node_modules directory to use the flattest possible\n          dependency graph for the dependencies. requires `make` first.\n\n`rewrite-prod` does what `rewrite` does, but skips `devDependencies`.\n\n`rewrite-full` swaps out the fenestrated package.json before performing a\n          `rewrite`, resulting in the flattest possible dependency graph.\n          it may lead to instability if your dependencies are doing anything\n          strange, but it is the most aggressive algorithm.\n\n`rewrite-prod-full` does what `rewrite-full` does, but skips\n          `devDependencies`.\n\n`restore` defenestrates! It undoes the changes written to your node_modules by\n          `fenestrate rewrite`.\n\n`remove`  removes the __fenestrate configuration from package.json.\n\n`dry-run` describes the changes that would be made to package.json, but won't\n          make them.\n\n`help`    prints this help text.\n\n\u003c!-- cut here --\u003e\n\npackaging\n---------\n\nIf you're making an npm package and you know the graph is dangerously deep for windows (i'm looking at you, [bower](http://bower.io)) you should run `fenestrate make` on your package and commit the change.\n\nThe `fenestrate make` command creates a flatter dependency graph and saves it in a special `__fenestrate` attribute in your `package.json` file. By itself, it doesn't flatten the dep graph, but *indicates to the Windows consumer that the package can be safely flattened with `fenestrate rewrite`, and describes the flatter dependencies.* The idea is for Windows servers to add a post-install hook script to the `node_modules` folder in their installation root (and this setup is covered in the next section).\n\nSo by successfully running `fenestrate make` on your package before you publish it, you're letting Windows consumers know that your package is optimized for Windows, even if you can't test on Windows yourself.\n\nwindows server setup\n--------------------\n\nYou can configure a Windows server to run `fenestrate rewrite` on every npm package that installs inside a certain directory tree. (Note that `fenestrate rewrite` will silently fail with a successful exit code if it doesn't find a `__fenestrate` configuration, so it can be safely run on non-fenestrated packages as well.)\n\nLet's say that all of your npm packages on a given server will be descendents of the `D:\\web\\` folder. Add the following file, creating directories if they don't already exist:\n\n    D:\\web\\node_modules\\.hooks\\install.cmd\n\nAnd put in that file:\n\n    fenestrate rewrite .\n\nAdd another, blank file, with the same name without the three-letter extension. (This is a Node quirk on Windows, to force it to acknowledge an install hook script.)\n\n    D:\\web\\node_modules\\.hooks\\install\n\nFinally, install fenestrate globally:\n\n    npm install -g fenestrate\n\nAnd now, all packages will be fenestrate rewritten as they come in. You're welcome.\n\nLicensed GPLv3.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetlen%2Ffenestrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzetlen%2Ffenestrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetlen%2Ffenestrate/lists"}