added node modules back to the example bot, so it exports with the required modules
This commit is contained in:
294
example_bot/node_modules/@sapphire/snowflake/CHANGELOG.md
generated
vendored
Normal file
294
example_bot/node_modules/@sapphire/snowflake/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,294 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@sapphire/snowflake@3.5.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.5.0...@sapphire/snowflake@3.5.1) - (2023-05-12)
|
||||
|
||||
## 🏠 Refactor
|
||||
|
||||
- **snowflake:** Handle out-of-bounds `increment` correctly (#596) ([b5276d7](https://github.com/sapphiredev/utilities/commit/b5276d7372c33356975a302bafb5ae8aba604431))
|
||||
|
||||
# [@sapphire/snowflake@3.5.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.4.3...@sapphire/snowflake@3.5.0) - (2023-05-10)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- **snowflake:** Expose `processId` and `workerId` (#595) ([b873c1c](https://github.com/sapphiredev/utilities/commit/b873c1cc3b30cb54d710a49f7618e125ac1132ad))
|
||||
|
||||
# [@sapphire/snowflake@3.4.2](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.4.1...@sapphire/snowflake@3.4.2) - (2023-04-12)
|
||||
|
||||
## 🏠 Refactor
|
||||
|
||||
- **Snowflake:** Simplify `compare` logic (#578) ([886254e](https://github.com/sapphiredev/utilities/commit/886254eea2f0cc5e8f63d015acffaf0e61489357))
|
||||
|
||||
# [@sapphire/snowflake@3.4.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.4.0...@sapphire/snowflake@3.4.1) - (2023-04-10)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- **snowflake:** Ensure strings are never compared with bigints ([22199a5](https://github.com/sapphiredev/utilities/commit/22199a5aa0c6150f46e01bfbe328deecb9f818ba))
|
||||
- **deps:** Update all non-major dependencies (#577) ([291dd67](https://github.com/sapphiredev/utilities/commit/291dd6783e57d8f075ce566218ba076ef6c4bbbd))
|
||||
- **deps:** Update all non-major dependencies (#545) ([40ca040](https://github.com/sapphiredev/utilities/commit/40ca040a21d8a0949682051a3a974538183a400e))
|
||||
- **deps:** Update all non-major dependencies (#544) ([cc78f17](https://github.com/sapphiredev/utilities/commit/cc78f17390c7f3db08af92bf46a5a70a9c11dd5f))
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
- Cleanup tests ([aec1bb2](https://github.com/sapphiredev/utilities/commit/aec1bb290d0f3c00a1ae4f4c86302ebbb161d348))
|
||||
|
||||
# [@sapphire/snowflake@3.4.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.3.0...@sapphire/snowflake@3.4.0) - (2022-12-27)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- **deps:** Update all non-major dependencies (#532) ([8033d1f](https://github.com/sapphiredev/utilities/commit/8033d1ff7a5a1974134c61f424f171cccb2915e1))
|
||||
|
||||
## 📝 Documentation
|
||||
|
||||
- Add @06000208 as a contributor ([fa3349e](https://github.com/sapphiredev/utilities/commit/fa3349e55ce4ad008785211dec7bf8e2b5d933df))
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- **snowflake:** Added `Snowflake.compare` (#531) ([6accd6d](https://github.com/sapphiredev/utilities/commit/6accd6d15eab12e312034f8ef43cff032835c972))
|
||||
|
||||
# [@sapphire/snowflake@3.3.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.2.2...@sapphire/snowflake@3.3.0) - (2022-12-03)
|
||||
|
||||
## 🏠 Refactor
|
||||
|
||||
- Split `@sapphire/time-utilities` into 4 sub-packages (#462) ([574299a](https://github.com/sapphiredev/utilities/commit/574299a99e658f6500a2a7efa587a0919b2d1313))
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- **snowflake:** TwitterSnowflake using incorrect epoch (#522) ([4ad4117](https://github.com/sapphiredev/utilities/commit/4ad41170488161b2998bd72da5a8b7fea10539a0))
|
||||
- **deps:** Update all non-major dependencies (#514) ([21b07d5](https://github.com/sapphiredev/utilities/commit/21b07d5db529a0d982647a60de98e46f36f1ac93))
|
||||
- **deps:** Update all non-major dependencies (#505) ([6178296](https://github.com/sapphiredev/utilities/commit/617829649e1e4deeee02b14533b5377cd5bc1fb3))
|
||||
- **deps:** Update all non-major dependencies (#466) ([dc08606](https://github.com/sapphiredev/utilities/commit/dc08606a97154e47c65536123ac5f8b1262f7bd2))
|
||||
- **deps:** Update all non-major dependencies ([e20f299](https://github.com/sapphiredev/utilities/commit/e20f29906e83cee000aaba9c6827e3bec5173d28))
|
||||
- **deps:** Update all non-major dependencies ([2308bd7](https://github.com/sapphiredev/utilities/commit/2308bd74356b6b2e0c12995b25f4d8ade4803fe9))
|
||||
- **deps:** Update all non-major dependencies ([84af0db](https://github.com/sapphiredev/utilities/commit/84af0db2db749223b036aa99fe19a2e9af5681c6))
|
||||
- **deps:** Update all non-major dependencies ([50cd8de](https://github.com/sapphiredev/utilities/commit/50cd8dea593b6f5ae75571209456b3421e2ca59a))
|
||||
|
||||
## 📝 Documentation
|
||||
|
||||
- Add @didinele as a contributor ([42ef7b6](https://github.com/sapphiredev/utilities/commit/42ef7b656c48fd0e720119db1d622c8bba2791e9))
|
||||
- Add @goestav as a contributor ([0e56a92](https://github.com/sapphiredev/utilities/commit/0e56a92a4e2d0942bfa207f81a8cb03b32312034))
|
||||
- Add @CitTheDev as a contributor ([34169ea](https://github.com/sapphiredev/utilities/commit/34169eae1dc0476ccf5a6c4f36e28602a204829e))
|
||||
- Add @legendhimslef as a contributor ([059b6f1](https://github.com/sapphiredev/utilities/commit/059b6f1ab5362d46d58624d06c1aa39192b0716f))
|
||||
- Add @r-priyam as a contributor ([fb278ba](https://github.com/sapphiredev/utilities/commit/fb278bacf627ec6fc88752eafeb12df5f3177a2c))
|
||||
- Change name of @kyranet (#451) ([df4fdef](https://github.com/sapphiredev/utilities/commit/df4fdefce18659975a4ebc224723638507d02d35))
|
||||
- Update @RealShadowNova as a contributor ([a869ba0](https://github.com/sapphiredev/utilities/commit/a869ba0abfad041610b9115187d426aebe671af6))
|
||||
- Add @muchnameless as a contributor ([a1221fe](https://github.com/sapphiredev/utilities/commit/a1221fea68506e99591d5d00ec552a07c26833f9))
|
||||
- Add @enxg as a contributor ([d2382f0](https://github.com/sapphiredev/utilities/commit/d2382f04e3909cb4ad11798a0a10e683f6cf5383))
|
||||
- Add @EvolutionX-10 as a contributor ([efc3a32](https://github.com/sapphiredev/utilities/commit/efc3a320a72ae258996dd62866d206c33f8d4961))
|
||||
- Add @MajesticString as a contributor ([295b3e9](https://github.com/sapphiredev/utilities/commit/295b3e9849a4b0fe64074bae02f6426378a303c3))
|
||||
- Add @Mzato0001 as a contributor ([c790ef2](https://github.com/sapphiredev/utilities/commit/c790ef25df2d7e22888fa9f8169167aa555e9e19))
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- **utilities:** Add possibility to import single functions by appending them to the import path. (#454) ([374c145](https://github.com/sapphiredev/utilities/commit/374c145a5dd329cfc1a867ed6720abf408683a88))
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
- Migrate to vitest (#380) ([075ec73](https://github.com/sapphiredev/utilities/commit/075ec73c7a8e3374fad3ada612d37eb4ac36ec8d))
|
||||
|
||||
# [@sapphire/snowflake@3.2.2](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.2.1...@sapphire/snowflake@3.2.2) - (2022-04-24)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- Fix typo (#333) ([ae2f257](https://github.com/sapphiredev/utilities/commit/ae2f25766d5985735f2d9b257eebd27cdc8a7c52))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Add @NotKaskus as a contributor ([00da8f1](https://github.com/sapphiredev/utilities/commit/00da8f199137b9277119823f322d1f2d168d928a))
|
||||
- Add @imranbarbhuiya as a contributor ([fb674c2](https://github.com/sapphiredev/utilities/commit/fb674c2c5594d41e71662263553dcb4bac9e37f4))
|
||||
- Add @axisiscool as a contributor ([ce1aa31](https://github.com/sapphiredev/utilities/commit/ce1aa316871a88d3663efbdf2a42d3d8dfe6a27f))
|
||||
- Add @dhruv-kaushikk as a contributor ([ebbf43f](https://github.com/sapphiredev/utilities/commit/ebbf43f63617daba96e72c50a234bf8b64f6ddc4))
|
||||
- Add @Commandtechno as a contributor ([f1d69fa](https://github.com/sapphiredev/utilities/commit/f1d69fabe1ee0abe4be08b19e63dbec03102f7ce))
|
||||
- Fix typedoc causing OOM crashes ([63ba41c](https://github.com/sapphiredev/utilities/commit/63ba41c4b6678554b1c7043a22d3296db4f59360))
|
||||
|
||||
## [3.2.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.2.0...@sapphire/snowflake@3.2.1) (2022-04-01)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
# [3.2.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.1.0...@sapphire/snowflake@3.2.0) (2022-03-06)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **snowflake:** fixed the examples for `DiscordSnowflake` and `TwitterSnowflake` ([#282](https://github.com/sapphiredev/utilities/issues/282)) ([2e5ed7f](https://github.com/sapphiredev/utilities/commit/2e5ed7fdadccf261967c45f73d0dc78e2497eed3))
|
||||
|
||||
### Features
|
||||
|
||||
- allow module: NodeNext ([#306](https://github.com/sapphiredev/utilities/issues/306)) ([9dc6dd6](https://github.com/sapphiredev/utilities/commit/9dc6dd619efab879bb2b0b3c9e64304e10a67ed6))
|
||||
- **ts-config:** add multi-config structure ([#281](https://github.com/sapphiredev/utilities/issues/281)) ([b5191d7](https://github.com/sapphiredev/utilities/commit/b5191d7f2416dc5838590c4ff221454925553e37))
|
||||
|
||||
# [3.1.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.0.1...@sapphire/snowflake@3.1.0) (2022-01-28)
|
||||
|
||||
### Features
|
||||
|
||||
- change build system to tsup ([#270](https://github.com/sapphiredev/utilities/issues/270)) ([365a53a](https://github.com/sapphiredev/utilities/commit/365a53a5517a01a0926cf28a83c96b63f32ed9f8))
|
||||
|
||||
## [3.0.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.0.0...@sapphire/snowflake@3.0.1) (2022-01-10)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
# [3.0.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.1.4...@sapphire/snowflake@3.0.0) (2021-12-08)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **snowflake:** remove env-based defaults ([#232](https://github.com/sapphiredev/utilities/issues/232)) ([10408e4](https://github.com/sapphiredev/utilities/commit/10408e4d3677e91490d967c3d89bf9575946090b))
|
||||
|
||||
### Features
|
||||
|
||||
- **Snowflake:** rework entire package ([#231](https://github.com/sapphiredev/utilities/issues/231)) ([1d02f1a](https://github.com/sapphiredev/utilities/commit/1d02f1a2f520efcbc194c3992af593d0e493873b))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **Snowflake:** Renamed `processID` to `processId`
|
||||
- **Snowflake:** Renamed `workerID` to `workerId`
|
||||
- **Snowflake:** `workerId` now defaults to 0n instead of 1n
|
||||
- **Snowflake:** `DiscordSnowflake` is not longer a class, but a constructed Snowflake
|
||||
- **Snowflake:** `TwitterSnowflake` is not longer a class, but a constructed Snowflake
|
||||
|
||||
## [2.1.4](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.1.3...@sapphire/snowflake@2.1.4) (2021-11-06)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
## [2.1.3](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.1.2...@sapphire/snowflake@2.1.3) (2021-10-26)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
## [2.1.2](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.1.1...@sapphire/snowflake@2.1.2) (2021-10-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- allow more node & npm versions in engines field ([5977d2a](https://github.com/sapphiredev/utilities/commit/5977d2a30a4b2cfdf84aff3f33af03ffde1bbec5))
|
||||
|
||||
## [2.1.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.1.0...@sapphire/snowflake@2.1.1) (2021-10-11)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
# [2.1.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.0.0...@sapphire/snowflake@2.1.0) (2021-10-04)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **snowflake:** fixed snowflake generating duplicate IDs ([#166](https://github.com/sapphiredev/utilities/issues/166)) ([f0cf4ad](https://github.com/sapphiredev/utilities/commit/f0cf4ad6bc0b8b2447499ca36581d2b453e52715))
|
||||
|
||||
### Features
|
||||
|
||||
- **snowflake:** set minimum NodeJS to v14 ([11a61c7](https://github.com/sapphiredev/utilities/commit/11a61c72bc29e683f9a4492815db3db094103bbc))
|
||||
|
||||
# [2.0.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.6...@sapphire/snowflake@2.0.0) (2021-07-17)
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- **rateLimits:** rewrite all of it ([#130](https://github.com/sapphiredev/utilities/issues/130)) ([320778c](https://github.com/sapphiredev/utilities/commit/320778ca65cbf3591bd1ce0b1f2eb430693eef9a))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **rateLimits:** Removed `Bucket`
|
||||
|
||||
## [1.3.6](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.5...@sapphire/snowflake@1.3.6) (2021-07-11)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
## [1.3.5](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.4...@sapphire/snowflake@1.3.5) (2021-06-27)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
## [1.3.4](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.3...@sapphire/snowflake@1.3.4) (2021-06-19)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **doc:** change `[@link](https://github.com/link)` to `[@linkplain](https://github.com/linkplain)` for support in VSCode IntelliSense ([703d460](https://github.com/sapphiredev/utilities/commit/703d4605b547a8787aff62d6f1054ea26dfd9d1c))
|
||||
- **docs:** update-tsdoc-for-vscode-may-2021 ([#126](https://github.com/sapphiredev/utilities/issues/126)) ([f8581bf](https://github.com/sapphiredev/utilities/commit/f8581bfe97a1b2f8aac3a3d3ed342d8ba92d730b))
|
||||
|
||||
## [1.3.3](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.2...@sapphire/snowflake@1.3.3) (2021-06-06)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- remove peer deps, update dev deps, update READMEs ([#124](https://github.com/sapphiredev/utilities/issues/124)) ([67256ed](https://github.com/sapphiredev/utilities/commit/67256ed43b915b02a8b5c68230ba82d6210c5032))
|
||||
- **snowflake:** fixed parsing for timestamps as Date objects ([c17a515](https://github.com/sapphiredev/utilities/commit/c17a515b02931cf778ca69913132e8d4558504a1))
|
||||
|
||||
## [1.3.2](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.1...@sapphire/snowflake@1.3.2) (2021-05-20)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **snowflake:** mark package as side effect free ([6a9bafc](https://github.com/sapphiredev/utilities/commit/6a9bafc24caba4b0ebbdd6896ac245ae6d60dede))
|
||||
|
||||
## [1.3.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.0...@sapphire/snowflake@1.3.1) (2021-05-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- drop the `www.` from the SapphireJS URL ([494d89f](https://github.com/sapphiredev/utilities/commit/494d89ffa04f78c195b93d7905b3232884f7d7e2))
|
||||
- update all the SapphireJS URLs from `.com` to `.dev` ([f59b46d](https://github.com/sapphiredev/utilities/commit/f59b46d1a0ebd39cad17b17d71cd3b9da808d5fd))
|
||||
|
||||
# [1.3.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.8...@sapphire/snowflake@1.3.0) (2021-04-21)
|
||||
|
||||
### Features
|
||||
|
||||
- add @sapphire/embed-jsx ([#100](https://github.com/sapphiredev/utilities/issues/100)) ([7277a23](https://github.com/sapphiredev/utilities/commit/7277a236015236ed8e81b7882875410facc4ce17))
|
||||
|
||||
## [1.2.8](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.7...@sapphire/snowflake@1.2.8) (2021-04-19)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- change all Sapphire URLs from "project"->"community" & use our domain where applicable 👨🌾🚜 ([#102](https://github.com/sapphiredev/utilities/issues/102)) ([835b408](https://github.com/sapphiredev/utilities/commit/835b408e8e57130c3787aca2e32613346ff23e4d))
|
||||
|
||||
## [1.2.7](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.6...@sapphire/snowflake@1.2.7) (2021-04-03)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
## [1.2.6](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.5...@sapphire/snowflake@1.2.6) (2021-03-16)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- remove terser from all packages ([#79](https://github.com/sapphiredev/utilities/issues/79)) ([1cfe4e7](https://github.com/sapphiredev/utilities/commit/1cfe4e7c804e62c142495686d2b83b81d0026c02))
|
||||
|
||||
## [1.2.5](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.4...@sapphire/snowflake@1.2.5) (2021-02-16)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
## [1.2.4](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.3...@sapphire/snowflake@1.2.4) (2021-01-16)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
## [1.2.3](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.2...@sapphire/snowflake@1.2.3) (2021-01-01)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
## [1.2.2](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.1...@sapphire/snowflake@1.2.2) (2020-12-26)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
## [1.2.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.0...@sapphire/snowflake@1.2.1) (2020-12-22)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
# [1.2.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.1.0...@sapphire/snowflake@1.2.0) (2020-11-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **snowflake:** pass keep_classnames to terser ([76ea062](https://github.com/sapphiredev/utilities/commit/76ea062d07000b169d9781f1a199b85ad3db0ba6))
|
||||
- **snowflake:** pass keep_fnames to terser ([b52aa76](https://github.com/sapphiredev/utilities/commit/b52aa764d8b02535496e0ceea3204a37552ce3d1))
|
||||
|
||||
### Features
|
||||
|
||||
- added time-utilities package ([#26](https://github.com/sapphiredev/utilities/issues/26)) ([f17a333](https://github.com/sapphiredev/utilities/commit/f17a3339667a452e8745fad7884272176e5d65e8))
|
||||
|
||||
# [1.1.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.0.1...@sapphire/snowflake@1.1.0) (2020-11-04)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **ratelimits,snowflake,utilities:** fixed esm output target ([9fdab3f](https://github.com/sapphiredev/utilities/commit/9fdab3fca283c8c0b47cc32661c5cf8e0a5e583c))
|
||||
- **snowflake:** properly specify ESM and CommonJS exports ([e3278e6](https://github.com/sapphiredev/utilities/commit/e3278e6868a4f31d5b2a100710bcbce2b79bc218))
|
||||
|
||||
### Features
|
||||
|
||||
- added ratelimits package ([#15](https://github.com/sapphiredev/utilities/issues/15)) ([e0ae18c](https://github.com/sapphiredev/utilities/commit/e0ae18c5e1d0ae4e68a982829f1cf251fddfc80d))
|
||||
|
||||
## [1.0.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.0.0...@sapphire/snowflake@1.0.1) (2020-09-20)
|
||||
|
||||
**Note:** Version bump only for package @sapphire/snowflake
|
||||
|
||||
# 1.0.0 (2020-09-05)
|
||||
|
||||
### Features
|
||||
|
||||
- implement snowflake ([5ba4e2d](https://github.com/sapphiredev/utilities/commit/5ba4e2d82557dd4ff60ffe891a7b46e46373bea2))
|
||||
- **decorators:** add decorators package ([#4](https://github.com/sapphiredev/utilities/issues/4)) ([677b3e5](https://github.com/sapphiredev/utilities/commit/677b3e59d5c6160cbe6fb410821cadd7c0f00e3c))
|
||||
170
example_bot/node_modules/@sapphire/snowflake/README.md
generated
vendored
Normal file
170
example_bot/node_modules/@sapphire/snowflake/README.md
generated
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
<div align="center">
|
||||
|
||||

|
||||
|
||||
# @sapphire/snowflake
|
||||
|
||||
**Deconstruct and generate snowflake IDs using BigInts.**
|
||||
|
||||
[](https://github.com/sapphiredev/utilities/blob/main/LICENSE.md)
|
||||
[](https://codecov.io/gh/sapphiredev/utilities)
|
||||
[](https://bundlephobia.com/result?p=@sapphire/snowflake)
|
||||
[](https://www.npmjs.com/package/@sapphire/snowflake)
|
||||
|
||||
</div>
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
- [Description](#description)
|
||||
- [Features](#features)
|
||||
- [Installation](#installation)
|
||||
- [Usage](#usage)
|
||||
- [Constructing snowflakes](#constructing-snowflakes)
|
||||
- [Snowflakes with custom epoch](#snowflakes-with-custom-epoch)
|
||||
- [Snowflake with Discord epoch constant](#snowflake-with-discord-epoch-constant)
|
||||
- [Snowflake with Twitter epoch constant](#snowflake-with-twitter-epoch-constant)
|
||||
- [Deconstructing snowflakes](#deconstructing-snowflakes)
|
||||
- [Snowflakes with custom epoch](#snowflakes-with-custom-epoch-1)
|
||||
- [Snowflake with Discord epoch constant](#snowflake-with-discord-epoch-constant-1)
|
||||
- [Snowflake with Twitter epoch constant](#snowflake-with-twitter-epoch-constant-1)
|
||||
- [Buy us some doughnuts](#buy-us-some-doughnuts)
|
||||
- [Contributors ✨](#contributors-%E2%9C%A8)
|
||||
|
||||
## Description
|
||||
|
||||
There is often a need to get a unique ID for entities, be that for Discord messages/channels/servers, keys in a database or many other similar examples. There are many ways to get such a unique ID, and one of those is using a so-called "snowflake". You can read more about snowflake IDs in [this Medium article](https://medium.com/better-programming/uuid-generation-snowflake-identifiers-unique-2aed8b1771bc).
|
||||
|
||||
## Features
|
||||
|
||||
- Written in TypeScript
|
||||
- Bundled with esbuild so it can be used in NodeJS and browsers
|
||||
- Offers CommonJS, ESM and UMD bundles
|
||||
- Offers predefined epochs for Discord and Twitter
|
||||
- Fully tested
|
||||
|
||||
## Installation
|
||||
|
||||
You can use the following command to install this package, or replace `npm install` with your package manager of choice.
|
||||
|
||||
```sh
|
||||
npm install @sapphire/snowflake
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**Note:** While this section uses `require`, the imports match 1:1 with ESM imports. For example `const { Snowflake } = require('@sapphire/snowflake')` equals `import { Snowflake } from '@sapphire/snowflake'`.
|
||||
|
||||
### Constructing snowflakes
|
||||
|
||||
#### Snowflakes with custom epoch
|
||||
|
||||
```typescript
|
||||
// Import the Snowflake class
|
||||
const { Snowflake } = require('@sapphire/snowflake');
|
||||
|
||||
// Define a custom epoch
|
||||
const epoch = new Date('2000-01-01T00:00:00.000Z');
|
||||
|
||||
// Create an instance of Snowflake
|
||||
const snowflake = new Snowflake(epoch);
|
||||
|
||||
// Generate a snowflake with the given epoch
|
||||
const uniqueId = snowflake.generate();
|
||||
```
|
||||
|
||||
#### Snowflake with Discord epoch constant
|
||||
|
||||
```typescript
|
||||
// Import the Snowflake class
|
||||
const { DiscordSnowflake } = require('@sapphire/snowflake');
|
||||
|
||||
// Generate a snowflake with Discord's epoch
|
||||
const uniqueId = DiscordSnowflake.generate();
|
||||
|
||||
// Alternatively, you can use the method directly
|
||||
const uniqueId = DiscordSnowflake.generate();
|
||||
```
|
||||
|
||||
#### Snowflake with Twitter epoch constant
|
||||
|
||||
```typescript
|
||||
// Import the Snowflake class
|
||||
const { TwitterSnowflake } = require('@sapphire/snowflake');
|
||||
|
||||
// Generate a snowflake with Twitter's epoch
|
||||
const uniqueId = TwitterSnowflake.generate();
|
||||
|
||||
// Alternatively, you can use the method directly
|
||||
const uniqueId = TwitterSnowflake.generate();
|
||||
```
|
||||
|
||||
### Deconstructing snowflakes
|
||||
|
||||
#### Snowflakes with custom epoch
|
||||
|
||||
```typescript
|
||||
// Import the Snowflake class
|
||||
const { Snowflake } = require('@sapphire/snowflake');
|
||||
|
||||
// Define a custom epoch
|
||||
const epoch = new Date('2000-01-01T00:00:00.000Z');
|
||||
|
||||
// Create an instance of Snowflake
|
||||
const snowflake = new Snowflake(epoch);
|
||||
|
||||
// Deconstruct a snowflake with the given epoch
|
||||
const uniqueId = snowflake.deconstruct('3971046231244935168');
|
||||
```
|
||||
|
||||
#### Snowflake with Discord epoch constant
|
||||
|
||||
```typescript
|
||||
// Import the Snowflake class
|
||||
const { DiscordSnowflake } = require('@sapphire/snowflake');
|
||||
|
||||
// Deconstruct a snowflake with Discord's epoch
|
||||
const uniqueId = DiscordSnowflake.deconstruct('3971046231244935168');
|
||||
|
||||
// Alternatively, you can use the method directly
|
||||
const uniqueId = DiscordSnowflake.deconstruct('3971046231244935168');
|
||||
```
|
||||
|
||||
#### Snowflake with Twitter epoch constant
|
||||
|
||||
```typescript
|
||||
// Import the Snowflake class
|
||||
const { TwitterSnowflake } = require('@sapphire/snowflake');
|
||||
|
||||
// Deconstruct a snowflake with Twitter's epoch
|
||||
const uniqueId = TwitterSnowflake.deconstruct('3971046231244935168');
|
||||
|
||||
// Alternatively, you can use the method directly
|
||||
const uniqueId = TwitterSnowflake.deconstruct('3971046231244935168');
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Buy us some doughnuts
|
||||
|
||||
Sapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
|
||||
|
||||
We accept donations through Open Collective, Ko-fi, PayPal, Patreon and GitHub Sponsorships. You can use the buttons below to donate through your method of choice.
|
||||
|
||||
| Donate With | Address |
|
||||
| :-------------: | :-------------------------------------------------: |
|
||||
| Open Collective | [Click Here](https://sapphirejs.dev/opencollective) |
|
||||
| Ko-fi | [Click Here](https://sapphirejs.dev/kofi) |
|
||||
| Patreon | [Click Here](https://sapphirejs.dev/patreon) |
|
||||
| PayPal | [Click Here](https://sapphirejs.dev/paypal) |
|
||||
|
||||
## Contributors
|
||||
|
||||
Please make sure to read the [Contributing Guide][contributing] before making a pull request.
|
||||
|
||||
Thank you to all the people who already contributed to Sapphire!
|
||||
|
||||
<a href="https://github.com/sapphiredev/utilities/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=sapphiredev/utilities" />
|
||||
</a>
|
||||
|
||||
[contributing]: https://github.com/sapphiredev/.github/blob/main/.github/CONTRIBUTING.md
|
||||
67
example_bot/node_modules/@sapphire/snowflake/package.json
generated
vendored
Normal file
67
example_bot/node_modules/@sapphire/snowflake/package.json
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"name": "@sapphire/snowflake",
|
||||
"version": "3.5.1",
|
||||
"description": "Deconstructs and generates snowflake IDs using BigInts",
|
||||
"author": "@sapphire",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"browser": "dist/index.global.js",
|
||||
"unpkg": "dist/index.global.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"exports": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/snowflake",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
"lint": "eslint src tests --ext ts --fix -c ../../.eslintrc",
|
||||
"build": "tsup",
|
||||
"docs": "typedoc-json-parser",
|
||||
"prepack": "yarn build",
|
||||
"bump": "cliff-jumper",
|
||||
"check-update": "cliff-jumper --dry-run"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sapphiredev/utilities.git",
|
||||
"directory": "packages/snowflake"
|
||||
},
|
||||
"files": [
|
||||
"dist/**/*.js*",
|
||||
"dist/**/*.mjs*",
|
||||
"dist/**/*.d*"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=v14.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
},
|
||||
"keywords": [
|
||||
"@sapphire/snowflake",
|
||||
"bot",
|
||||
"typescript",
|
||||
"ts",
|
||||
"yarn",
|
||||
"discord",
|
||||
"sapphire",
|
||||
"standalone"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/sapphiredev/utilities/issues"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@vitest/coverage-c8": "^0.31.0",
|
||||
"tsup": "^6.7.0",
|
||||
"typedoc": "^0.24.7",
|
||||
"typedoc-json-parser": "^7.4.0",
|
||||
"typescript": "^5.0.4",
|
||||
"vitest": "^0.31.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user