Skip to content

Commit 06576fb

Browse files
committed
chore: generate download stats
1 parent 2edc36f commit 06576fb

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed

DOWNLOAD_STATS.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
| name | download |
2+
| ---- | -------- |
3+
| `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) |
4+
| `@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) |
5+
| `@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) |
6+
| `@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) |
7+
| `@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) |
8+
| `@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) |
9+
| `@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) |
10+
| `@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) |
11+
| `@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) |
12+
| `@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) |
13+
| `@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) |
14+
| `@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) |
15+
| `@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) |
16+
| `@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) |
17+
| `@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) |
18+
| `@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) |
19+
| `@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) |
20+
| `@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) |
21+
| `@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) |
22+
| `@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) |
23+
| `@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) |
24+
| `@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) |
25+
| `@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) |
26+
| `@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) |
27+
| `@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) |
28+
| `@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) |
29+
| `@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) |
30+
| `@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) |
31+
| `@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) |
32+
| `@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) |
33+
| `@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) |
34+
| `@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) |
35+
| `@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) |
36+
| `@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) |
37+
| `@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) |
38+
| `@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) |
39+
| `@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) |
40+
| `@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) |
41+
| `@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) |
42+
| `@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) |
43+
| `@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) |
44+
| `@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) |
45+
| `@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) |
46+
| `@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) |
47+
| `@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) |
48+
| `@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) |
49+
| `@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) |
50+
| `@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) |
51+
| `@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) |
52+
| `@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) |
53+
| `@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) |
54+
| `@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) |
55+
| `@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) |
56+
| `@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) |
57+
| `@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) |
58+
| `@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) |
59+
| `@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) |
60+
| `@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) |
61+
| `@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) |
62+
| `@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) |
63+
| `@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) |
64+
| `@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) |
65+
| `@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) |
66+
| `@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) |
67+
| `@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) |
68+
| `@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) |
69+
| `@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) |
70+
| `@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) |
71+
| `@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) |
72+
| `@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) |

create.cjs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,11 @@ const manualPackagesList = /** @type {const} */ ([
396396
'globalthis' // globalthis package's entrypoint is a function, not the implementation
397397
]);
398398

399+
const nonNolyfillPackagesList = /** @type {const} */ ([
400+
'nolyfill',
401+
'@nolyfill/shared'
402+
]);
403+
399404
(async () => {
400405
await Promise.all([
401406
...autoGeneratedPackagesList.map(pkg => createEsShimLikePackage(pkg[0], pkg[1], pkg[2], pkg[3], pkg[4], pkg[5])),
@@ -437,6 +442,10 @@ export const allPackages = ${JSON.stringify(allPackages, null, 2)};\n`;
437442
compareAndWriteFile(
438443
path.join(__dirname, 'packages', 'cli', 'src', 'all-packages.ts'),
439444
cliAllPackagesTs
445+
),
446+
compareAndWriteFile(
447+
path.join(__dirname, 'DOWNLOAD_STATS.md'),
448+
generateDonwloadStats()
440449
)
441450
]);
442451

@@ -564,3 +573,18 @@ async function createSingleFilePackage(packageName, implementation, extraDepende
564573

565574
console.log(`[${packageName}] created`);
566575
}
576+
577+
function generateDonwloadStats() {
578+
const pkgList = [
579+
...autoGeneratedPackagesList.map(pkg => `@nolyfill/${pkg[0]}`),
580+
...singleFilePackagesList.map(pkg => `@nolyfill/${pkg[0]}`),
581+
...manualPackagesList.map(pkg => `@nolyfill/${pkg}`)
582+
].sort();
583+
pkgList.unshift(...nonNolyfillPackagesList);
584+
585+
return '| name | download |\n| ---- | -------- |\n'.concat(
586+
pkgList.map(
587+
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}) |`
588+
).join('\n')
589+
);
590+
}

0 commit comments

Comments
 (0)