Skip to content

Commit

Permalink
chore: generate download stats
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Aug 26, 2023
1 parent 2edc36f commit 06576fb
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
72 changes: 72 additions & 0 deletions DOWNLOAD_STATS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
| name | download |
| ---- | -------- |
| `nolyfill` | [![npm](https://img.shields.io/npm/dm/nolyfill.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/nolyfill) |
| `@nolyfill/shared` | [![npm](https://img.shields.io/npm/dm/@nolyfill/shared.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/shared) |
| `@nolyfill/array-buffer-byte-length` | [![npm](https://img.shields.io/npm/dm/@nolyfill/array-buffer-byte-length.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/array-buffer-byte-length) |
| `@nolyfill/array-includes` | [![npm](https://img.shields.io/npm/dm/@nolyfill/array-includes.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/array-includes) |
| `@nolyfill/array.from` | [![npm](https://img.shields.io/npm/dm/@nolyfill/array.from.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/array.from) |
| `@nolyfill/array.prototype.find` | [![npm](https://img.shields.io/npm/dm/@nolyfill/array.prototype.find.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/array.prototype.find) |
| `@nolyfill/array.prototype.findlastindex` | [![npm](https://img.shields.io/npm/dm/@nolyfill/array.prototype.findlastindex.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/array.prototype.findlastindex) |
| `@nolyfill/array.prototype.flat` | [![npm](https://img.shields.io/npm/dm/@nolyfill/array.prototype.flat.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/array.prototype.flat) |
| `@nolyfill/array.prototype.flatmap` | [![npm](https://img.shields.io/npm/dm/@nolyfill/array.prototype.flatmap.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/array.prototype.flatmap) |
| `@nolyfill/array.prototype.reduce` | [![npm](https://img.shields.io/npm/dm/@nolyfill/array.prototype.reduce.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/array.prototype.reduce) |
| `@nolyfill/array.prototype.tosorted` | [![npm](https://img.shields.io/npm/dm/@nolyfill/array.prototype.tosorted.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/array.prototype.tosorted) |
| `@nolyfill/arraybuffer.prototype.slice` | [![npm](https://img.shields.io/npm/dm/@nolyfill/arraybuffer.prototype.slice.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/arraybuffer.prototype.slice) |
| `@nolyfill/asynciterator.prototype` | [![npm](https://img.shields.io/npm/dm/@nolyfill/asynciterator.prototype.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/asynciterator.prototype) |
| `@nolyfill/available-typed-arrays` | [![npm](https://img.shields.io/npm/dm/@nolyfill/available-typed-arrays.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/available-typed-arrays) |
| `@nolyfill/deep-equal` | [![npm](https://img.shields.io/npm/dm/@nolyfill/deep-equal.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/deep-equal) |
| `@nolyfill/define-properties` | [![npm](https://img.shields.io/npm/dm/@nolyfill/define-properties.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/define-properties) |
| `@nolyfill/es-aggregate-error` | [![npm](https://img.shields.io/npm/dm/@nolyfill/es-aggregate-error.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/es-aggregate-error) |
| `@nolyfill/es-iterator-helpers` | [![npm](https://img.shields.io/npm/dm/@nolyfill/es-iterator-helpers.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/es-iterator-helpers) |
| `@nolyfill/es-set-tostringtag` | [![npm](https://img.shields.io/npm/dm/@nolyfill/es-set-tostringtag.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/es-set-tostringtag) |
| `@nolyfill/function-bind` | [![npm](https://img.shields.io/npm/dm/@nolyfill/function-bind.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/function-bind) |
| `@nolyfill/function.prototype.name` | [![npm](https://img.shields.io/npm/dm/@nolyfill/function.prototype.name.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/function.prototype.name) |
| `@nolyfill/get-symbol-description` | [![npm](https://img.shields.io/npm/dm/@nolyfill/get-symbol-description.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/get-symbol-description) |
| `@nolyfill/globalthis` | [![npm](https://img.shields.io/npm/dm/@nolyfill/globalthis.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/globalthis) |
| `@nolyfill/gopd` | [![npm](https://img.shields.io/npm/dm/@nolyfill/gopd.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/gopd) |
| `@nolyfill/harmony-reflect` | [![npm](https://img.shields.io/npm/dm/@nolyfill/harmony-reflect.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/harmony-reflect) |
| `@nolyfill/has` | [![npm](https://img.shields.io/npm/dm/@nolyfill/has.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/has) |
| `@nolyfill/has-property-descriptors` | [![npm](https://img.shields.io/npm/dm/@nolyfill/has-property-descriptors.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/has-property-descriptors) |
| `@nolyfill/has-proto` | [![npm](https://img.shields.io/npm/dm/@nolyfill/has-proto.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/has-proto) |
| `@nolyfill/has-symbols` | [![npm](https://img.shields.io/npm/dm/@nolyfill/has-symbols.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/has-symbols) |
| `@nolyfill/has-tostringtag` | [![npm](https://img.shields.io/npm/dm/@nolyfill/has-tostringtag.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/has-tostringtag) |
| `@nolyfill/is-array-buffer` | [![npm](https://img.shields.io/npm/dm/@nolyfill/is-array-buffer.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/is-array-buffer) |
| `@nolyfill/is-date-object` | [![npm](https://img.shields.io/npm/dm/@nolyfill/is-date-object.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/is-date-object) |
| `@nolyfill/is-regex` | [![npm](https://img.shields.io/npm/dm/@nolyfill/is-regex.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/is-regex) |
| `@nolyfill/is-shared-array-buffer` | [![npm](https://img.shields.io/npm/dm/@nolyfill/is-shared-array-buffer.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/is-shared-array-buffer) |
| `@nolyfill/is-string` | [![npm](https://img.shields.io/npm/dm/@nolyfill/is-string.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/is-string) |
| `@nolyfill/is-symbol` | [![npm](https://img.shields.io/npm/dm/@nolyfill/is-symbol.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/is-symbol) |
| `@nolyfill/is-weakref` | [![npm](https://img.shields.io/npm/dm/@nolyfill/is-weakref.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/is-weakref) |
| `@nolyfill/iterator.prototype` | [![npm](https://img.shields.io/npm/dm/@nolyfill/iterator.prototype.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/iterator.prototype) |
| `@nolyfill/object-is` | [![npm](https://img.shields.io/npm/dm/@nolyfill/object-is.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/object-is) |
| `@nolyfill/object-keys` | [![npm](https://img.shields.io/npm/dm/@nolyfill/object-keys.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/object-keys) |
| `@nolyfill/object.assign` | [![npm](https://img.shields.io/npm/dm/@nolyfill/object.assign.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/object.assign) |
| `@nolyfill/object.entries` | [![npm](https://img.shields.io/npm/dm/@nolyfill/object.entries.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/object.entries) |
| `@nolyfill/object.fromentries` | [![npm](https://img.shields.io/npm/dm/@nolyfill/object.fromentries.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/object.fromentries) |
| `@nolyfill/object.getownpropertydescriptors` | [![npm](https://img.shields.io/npm/dm/@nolyfill/object.getownpropertydescriptors.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/object.getownpropertydescriptors) |
| `@nolyfill/object.groupby` | [![npm](https://img.shields.io/npm/dm/@nolyfill/object.groupby.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/object.groupby) |
| `@nolyfill/object.hasown` | [![npm](https://img.shields.io/npm/dm/@nolyfill/object.hasown.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/object.hasown) |
| `@nolyfill/object.values` | [![npm](https://img.shields.io/npm/dm/@nolyfill/object.values.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/object.values) |
| `@nolyfill/promise.allsettled` | [![npm](https://img.shields.io/npm/dm/@nolyfill/promise.allsettled.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/promise.allsettled) |
| `@nolyfill/promise.any` | [![npm](https://img.shields.io/npm/dm/@nolyfill/promise.any.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/promise.any) |
| `@nolyfill/reflect.getprototypeof` | [![npm](https://img.shields.io/npm/dm/@nolyfill/reflect.getprototypeof.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/reflect.getprototypeof) |
| `@nolyfill/reflect.ownkeys` | [![npm](https://img.shields.io/npm/dm/@nolyfill/reflect.ownkeys.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/reflect.ownkeys) |
| `@nolyfill/regexp.prototype.flags` | [![npm](https://img.shields.io/npm/dm/@nolyfill/regexp.prototype.flags.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/regexp.prototype.flags) |
| `@nolyfill/safe-array-concat` | [![npm](https://img.shields.io/npm/dm/@nolyfill/safe-array-concat.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/safe-array-concat) |
| `@nolyfill/safe-regex-test` | [![npm](https://img.shields.io/npm/dm/@nolyfill/safe-regex-test.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/safe-regex-test) |
| `@nolyfill/string.prototype.matchall` | [![npm](https://img.shields.io/npm/dm/@nolyfill/string.prototype.matchall.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/string.prototype.matchall) |
| `@nolyfill/string.prototype.padend` | [![npm](https://img.shields.io/npm/dm/@nolyfill/string.prototype.padend.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/string.prototype.padend) |
| `@nolyfill/string.prototype.padstart` | [![npm](https://img.shields.io/npm/dm/@nolyfill/string.prototype.padstart.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/string.prototype.padstart) |
| `@nolyfill/string.prototype.replaceall` | [![npm](https://img.shields.io/npm/dm/@nolyfill/string.prototype.replaceall.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/string.prototype.replaceall) |
| `@nolyfill/string.prototype.trim` | [![npm](https://img.shields.io/npm/dm/@nolyfill/string.prototype.trim.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/string.prototype.trim) |
| `@nolyfill/string.prototype.trimend` | [![npm](https://img.shields.io/npm/dm/@nolyfill/string.prototype.trimend.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/string.prototype.trimend) |
| `@nolyfill/string.prototype.trimleft` | [![npm](https://img.shields.io/npm/dm/@nolyfill/string.prototype.trimleft.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/string.prototype.trimleft) |
| `@nolyfill/string.prototype.trimright` | [![npm](https://img.shields.io/npm/dm/@nolyfill/string.prototype.trimright.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/string.prototype.trimright) |
| `@nolyfill/string.prototype.trimstart` | [![npm](https://img.shields.io/npm/dm/@nolyfill/string.prototype.trimstart.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/string.prototype.trimstart) |
| `@nolyfill/typed-array-buffer` | [![npm](https://img.shields.io/npm/dm/@nolyfill/typed-array-buffer.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/typed-array-buffer) |
| `@nolyfill/typed-array-byte-length` | [![npm](https://img.shields.io/npm/dm/@nolyfill/typed-array-byte-length.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/typed-array-byte-length) |
| `@nolyfill/typed-array-byte-offset` | [![npm](https://img.shields.io/npm/dm/@nolyfill/typed-array-byte-offset.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/typed-array-byte-offset) |
| `@nolyfill/typed-array-length` | [![npm](https://img.shields.io/npm/dm/@nolyfill/typed-array-length.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/typed-array-length) |
| `@nolyfill/unbox-primitive` | [![npm](https://img.shields.io/npm/dm/@nolyfill/unbox-primitive.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/unbox-primitive) |
| `@nolyfill/which-boxed-primitive` | [![npm](https://img.shields.io/npm/dm/@nolyfill/which-boxed-primitive.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/which-boxed-primitive) |
| `@nolyfill/which-typed-array` | [![npm](https://img.shields.io/npm/dm/@nolyfill/which-typed-array.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/@nolyfill/which-typed-array) |
24 changes: 24 additions & 0 deletions create.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,11 @@ const manualPackagesList = /** @type {const} */ ([
'globalthis' // globalthis package's entrypoint is a function, not the implementation
]);

const nonNolyfillPackagesList = /** @type {const} */ ([
'nolyfill',
'@nolyfill/shared'
]);

(async () => {
await Promise.all([
...autoGeneratedPackagesList.map(pkg => createEsShimLikePackage(pkg[0], pkg[1], pkg[2], pkg[3], pkg[4], pkg[5])),
Expand Down Expand Up @@ -437,6 +442,10 @@ export const allPackages = ${JSON.stringify(allPackages, null, 2)};\n`;
compareAndWriteFile(
path.join(__dirname, 'packages', 'cli', 'src', 'all-packages.ts'),
cliAllPackagesTs
),
compareAndWriteFile(
path.join(__dirname, 'DOWNLOAD_STATS.md'),
generateDonwloadStats()
)
]);

Expand Down Expand Up @@ -564,3 +573,18 @@ async function createSingleFilePackage(packageName, implementation, extraDepende

console.log(`[${packageName}] created`);
}

function generateDonwloadStats() {
const pkgList = [
...autoGeneratedPackagesList.map(pkg => `@nolyfill/${pkg[0]}`),
...singleFilePackagesList.map(pkg => `@nolyfill/${pkg[0]}`),
...manualPackagesList.map(pkg => `@nolyfill/${pkg}`)
].sort();
pkgList.unshift(...nonNolyfillPackagesList);

return '| name | download |\n| ---- | -------- |\n'.concat(
pkgList.map(
pkg => `| \`${pkg}\` | [![npm](https://img.shields.io/npm/dm/${pkg}.svg?style=flat-square&logo=npm&logoColor=white&label=download&color=333)](https://www.npmjs.com/package/${pkg}) |`
).join('\n')
);
}

0 comments on commit 06576fb

Please sign in to comment.