{"id":18563135,"url":"https://github.com/compulim/p-defer-es5","last_synced_at":"2025-05-15T18:12:47.639Z","repository":{"id":36750861,"uuid":"230015612","full_name":"compulim/p-defer-es5","owner":"compulim","description":"ES5 version of p-defer","archived":false,"fork":false,"pushed_at":"2023-03-04T05:30:56.000Z","size":421,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-26T04:28:42.751Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compulim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-24T23:56:20.000Z","updated_at":"2022-02-28T07:35:01.000Z","dependencies_parsed_at":"2024-06-19T01:42:56.752Z","dependency_job_id":null,"html_url":"https://github.com/compulim/p-defer-es5","commit_stats":{"total_commits":43,"total_committers":2,"mean_commits":21.5,"dds":"0.39534883720930236","last_synced_commit":"8f0c8ecd02d792dbbb07559933f302d170f2992e"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fp-defer-es5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fp-defer-es5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fp-defer-es5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fp-defer-es5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compulim","download_url":"https://codeload.github.com/compulim/p-defer-es5/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394726,"owners_count":22063984,"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","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-11-06T22:11:53.415Z","updated_at":"2025-05-15T18:12:45.543Z","avatar_url":"https://github.com/compulim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# p-defer-es5\n\n[![npm version](https://img.shields.io/npm/v/p-defer-es5.svg)](https://www.npmjs.com/package/p-defer-es5) [![npm version](https://img.shields.io/npm/v/p-defer-es5/main.svg)](https://www.npmjs.com/package/p-defer-es5/v/main) [![Continuous deployment](https://github.com/compulim/p-defer-es5/actions/workflows/continuous-deployment.yml/badge.svg?branch=main)](https://github.com/compulim/p-defer-es5/actions/workflows/continuous-deployment.yml)\n\nThis package is based on [`p-defer`](https://npmjs.com/package/p-defer). It did not contains an ES5 module. Importing the module directly or indirectly may break web apps running on ES5 browsers.\n\nOn `npm install`, this package will transpile your version of `p-defer` to make it compatible with ES5 browsers. Then in your code, you use `p-defer-es5` instead of `p-defer`.\n\nPackage authors should consider importing this package instead of `p-defer`, so your packages will not break your users due to having `p-defer` as a transient dependency.\n\n## How to use\n\nTo install in your project, run:\n\n```sh\nnpm install p-defer p-defer-es5\n```\n\nYou can also use it in HTML:\n\n```html\n\u003cscript src=\"https://unpkg.com/p-defer-es5/dist/p-defer-es5.production.min.js\"\u003e\u003c/script\u003e\n```\n\n## How it works\n\nOn `postinstall`, this package will run `esbuild` to bundle `p-defer` into a single file. Then run Babel to transpile it for ES5.\n\nThis package peer-depends on `p-defer`. Thus, you can select your own version of `p-defer`.\n\n### Updating `p-defer`\n\nWhen you update `p-defer`, re-run `npm install p-defer-es5` to get the latest package transpiled.\n\n## Alternatives\n\nInstead of importing this package, there are alternative workarounds you can use.\n\n### Including the source code\n\nYou can copy the source code of `p-defer` into your web app and use your build pipeline transpile the original package.\n\nBe sure to include the original license and continue to depends on the package to make sure `npm audit` will scan for vulnerabilities.\n\n### Modify your bundler configuration\n\nSome bundlers is configured not to transpile code under `/node_modules/` unless specified explicitly. You can modify bundler configuration to include `/node_modules/p-defer/` and use Babel to transpile it while bundling.\n\n## Contributions\n\nLike us? [Star](https://github.com/compulim/p-defer-es5/stargazers) us.\n\nWant to make it better? [File](https://github.com/compulim/p-defer-es5/issues) us an issue.\n\nDon't like something you see? [Submit](https://github.com/compulim/p-defer-es5/pulls) a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Fp-defer-es5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompulim%2Fp-defer-es5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Fp-defer-es5/lists"}