{"_id":"import-fresh","_rev":"78566","name":"import-fresh","description":"Import a module while bypassing the cache","dist-tags":{"latest":"3.3.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2022-10-18T09:10:43.000Z","created":"2017-05-21T11:39:44.813Z","3.3.0":"2020-12-20T13:35:41.167Z","3.2.2":"2020-11-01T19:03:03.260Z","3.2.1":"2019-11-13T17:09:02.349Z","3.2.0":"2019-11-13T10:39:57.695Z","3.1.0":"2019-06-30T10:01:45.483Z","3.0.0":"2018-12-25T16:23:55.753Z","2.0.0":"2017-05-21T11:39:44.813Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-fresh.git"},"versions":{"3.3.0":{"name":"import-fresh","version":"3.3.0","description":"Import a module while bypassing the cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-fresh.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd","heapdump":"node heapdump.js"},"keywords":["require","cache","uncache","uncached","module","fresh","bypass"],"dependencies":{"parent-module":"^1.0.0","resolve-from":"^4.0.0"},"devDependencies":{"ava":"^1.0.1","heapdump":"^0.3.12","tsd":"^0.7.3","xo":"^0.23.0"},"gitHead":"f1dddc06da4f1cdfb44a3aaba1f2c353c00dea02","bugs":{"url":"https://github.com/sindresorhus/import-fresh/issues"},"homepage":"https://github.com/sindresorhus/import-fresh#readme","_id":"import-fresh@3.3.0","_nodeVersion":"15.4.0","_npmVersion":"6.14.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b","size":2332,"noattachment":false,"key":"/import-fresh/-/import-fresh-3.3.0.tgz","tarball":"http://name.csiicloud.com:7001/import-fresh/download/import-fresh-3.3.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-fresh_3.3.0_1608471341036_0.2255636072835574"},"_hasShrinkwrap":false,"publish_time":1608471341167,"_cnpm_publish_time":1608471341167},"3.2.2":{"name":"import-fresh","version":"3.2.2","description":"Import a module while bypassing the cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-fresh.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd","heapdump":"node heapdump.js"},"keywords":["require","cache","uncache","uncached","module","fresh","bypass"],"dependencies":{"parent-module":"^1.0.0","resolve-from":"^4.0.0"},"devDependencies":{"ava":"^1.0.1","heapdump":"^0.3.12","tsd":"^0.7.3","xo":"^0.23.0"},"gitHead":"cde3c6f4a6f36d18951297a583f19c780dbd2f0b","bugs":{"url":"https://github.com/sindresorhus/import-fresh/issues"},"homepage":"https://github.com/sindresorhus/import-fresh#readme","_id":"import-fresh@3.2.2","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"fc129c160c5d68235507f4331a6baad186bdbc3e","size":2341,"noattachment":false,"key":"/import-fresh/-/import-fresh-3.2.2.tgz","tarball":"http://name.csiicloud.com:7001/import-fresh/download/import-fresh-3.2.2.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-fresh_3.2.2_1604257383092_0.8104894692220481"},"_hasShrinkwrap":false,"publish_time":1604257383260,"_cnpm_publish_time":1604257383260},"3.2.1":{"name":"import-fresh","version":"3.2.1","description":"Import a module while bypassing the cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-fresh.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd","heapdump":"node heapdump.js"},"keywords":["require","cache","uncache","uncached","module","fresh","bypass"],"dependencies":{"parent-module":"^1.0.0","resolve-from":"^4.0.0"},"devDependencies":{"ava":"^1.0.1","heapdump":"^0.3.12","tsd":"^0.7.3","xo":"^0.23.0"},"gitHead":"8a7a217edee030110b0412853c64a37f6d055fac","bugs":{"url":"https://github.com/sindresorhus/import-fresh/issues"},"homepage":"https://github.com/sindresorhus/import-fresh#readme","_id":"import-fresh@3.2.1","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"633ff618506e793af5ac91bf48b72677e15cbe66","size":2326,"noattachment":false,"key":"/import-fresh/-/import-fresh-3.2.1.tgz","tarball":"http://name.csiicloud.com:7001/import-fresh/download/import-fresh-3.2.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-fresh_3.2.1_1573664942240_0.9935450999499267"},"_hasShrinkwrap":false,"publish_time":1573664942349,"_cnpm_publish_time":1573664942349},"3.2.0":{"name":"import-fresh","version":"3.2.0","description":"Import a module while bypassing the cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-fresh.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd","heapdump":"node heapdump.js"},"keywords":["require","cache","uncache","uncached","module","fresh","bypass"],"dependencies":{"parent-module":"^1.0.0","resolve-from":"^4.0.0"},"devDependencies":{"ava":"^1.0.1","heapdump":"^0.3.12","tsd":"^0.7.3","xo":"^0.23.0"},"gitHead":"28ab80a357703431d925fc4a852662e85130a476","bugs":{"url":"https://github.com/sindresorhus/import-fresh/issues"},"homepage":"https://github.com/sindresorhus/import-fresh#readme","_id":"import-fresh@3.2.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"fed4d772a13949de7d9894b647e77297db14dedf","size":2209,"noattachment":false,"key":"/import-fresh/-/import-fresh-3.2.0.tgz","tarball":"http://name.csiicloud.com:7001/import-fresh/download/import-fresh-3.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-fresh_3.2.0_1573641597593_0.574712556072138"},"_hasShrinkwrap":false,"publish_time":1573641597695,"_cnpm_publish_time":1573641597695},"3.1.0":{"name":"import-fresh","version":"3.1.0","description":"Import a module while bypassing the cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-fresh.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd","heapdump":"node heapdump.js"},"keywords":["require","cache","uncache","uncached","module","fresh","bypass"],"dependencies":{"parent-module":"^1.0.0","resolve-from":"^4.0.0"},"devDependencies":{"ava":"^1.0.1","heapdump":"^0.3.12","tsd":"^0.7.3","xo":"^0.23.0"},"gitHead":"ed2fcde9acaec943427a6756563a39aeb858d1e8","bugs":{"url":"https://github.com/sindresorhus/import-fresh/issues"},"homepage":"https://github.com/sindresorhus/import-fresh#readme","_id":"import-fresh@3.1.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"6d33fa1dcef6df930fae003446f33415af905118","size":2175,"noattachment":false,"key":"/import-fresh/-/import-fresh-3.1.0.tgz","tarball":"http://name.csiicloud.com:7001/import-fresh/download/import-fresh-3.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-fresh_3.1.0_1561888905311_0.3754017808551846"},"_hasShrinkwrap":false,"publish_time":1561888905483,"_cnpm_publish_time":1561888905483},"3.0.0":{"name":"import-fresh","version":"3.0.0","description":"Import a module while bypassing the cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-fresh.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava","heapdump":"node heapdump.js"},"keywords":["require","cache","uncache","uncached","module","fresh","bypass"],"dependencies":{"parent-module":"^1.0.0","resolve-from":"^4.0.0"},"devDependencies":{"ava":"^1.0.1","heapdump":"^0.3.12","xo":"^0.23.0"},"gitHead":"0bf56d798cf5f6c845d3f32b5908b2f4e952f7d0","bugs":{"url":"https://github.com/sindresorhus/import-fresh/issues"},"homepage":"https://github.com/sindresorhus/import-fresh#readme","_id":"import-fresh@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"11.5.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a3d897f420cab0e671236897f75bc14b4885c390","size":1841,"noattachment":false,"key":"/import-fresh/-/import-fresh-3.0.0.tgz","tarball":"http://name.csiicloud.com:7001/import-fresh/download/import-fresh-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-fresh_3.0.0_1545755035608_0.9390160260884601"},"_hasShrinkwrap":false,"publish_time":1545755035753,"_cnpm_publish_time":1545755035753},"2.0.0":{"name":"import-fresh","version":"2.0.0","description":"Import a module while bypassing the cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-fresh.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava","heapdump":"optional-dev-dependency && node heapdump.js"},"files":["index.js"],"keywords":["require","cache","uncache","uncached","module","fresh","bypass"],"dependencies":{"caller-path":"^2.0.0","resolve-from":"^3.0.0"},"devDependencies":{"ava":"*","optional-dev-dependency":"^2.0.1","xo":"^0.18.2"},"optionalDevDependencies":{"heapdump":"^0.3.7"},"xo":{"rules":{"import/no-extraneous-dependencies":"off"}},"gitHead":"db00a4e9b6bb761bd32ab92c0e7955075fbc4e49","bugs":{"url":"https://github.com/sindresorhus/import-fresh/issues"},"homepage":"https://github.com/sindresorhus/import-fresh#readme","_id":"import-fresh@2.0.0","_shasum":"d81355c15612d386c61f9ddd3922d4304822a546","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d81355c15612d386c61f9ddd3922d4304822a546","size":1948,"noattachment":false,"key":"/import-fresh/-/import-fresh-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/import-fresh/download/import-fresh-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-fresh-2.0.0.tgz_1495366784518_0.4047558819875121"},"directories":{},"publish_time":1495366784813,"_hasShrinkwrap":false,"_cnpm_publish_time":1495366784813}},"readme":"# import-fresh\n\n> Import a module while bypassing the [cache](https://nodejs.org/api/modules.html#modules_caching)\n\nUseful for testing purposes when you need to freshly import a module.\n\n## Install\n\n```\n$ npm install import-fresh\n```\n\n## Usage\n\n```js\n// foo.js\nlet i = 0;\nmodule.exports = () => ++i;\n```\n\n```js\nconst importFresh = require('import-fresh');\n\nrequire('./foo')();\n//=> 1\n\nrequire('./foo')();\n//=> 2\n\nimportFresh('./foo')();\n//=> 1\n\nimportFresh('./foo')();\n//=> 1\n```\n\n## import-fresh for enterprise\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of import-fresh and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-import-fresh?utm_source=npm-import-fresh&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)\n\n## Related\n\n- [clear-module](https://github.com/sindresorhus/clear-module) - Clear a module from the import cache\n- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path\n- [import-cwd](https://github.com/sindresorhus/import-cwd) - Import a module from the current working directory\n- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import modules lazily\n","_attachments":{},"homepage":"https://github.com/sindresorhus/import-fresh#readme","bugs":{"url":"https://github.com/sindresorhus/import-fresh/issues"},"license":"MIT"}