No description
Find a file
Renovate Bot 1a62a5a6e3
All checks were successful
Stage / build (push) Successful in 8s
Stage / rsync (push) Successful in 5s
Update dependency @babel/traverse to v7.25.6 (#212)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@babel/traverse](https://babel.dev/docs/en/next/babel-traverse) ([source](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse)) | resolutions | minor | [`7.24.8` -> `7.25.6`](https://renovatebot.com/diffs/npm/@babel%2ftraverse/7.24.8/7.25.6) |

---

### Release Notes

<details>
<summary>babel/babel (@&#8203;babel/traverse)</summary>

### [`v7.25.6`](https://github.com/babel/babel/blob/HEAD/CHANGELOG.md#v7256-2024-08-29)

[Compare Source](https://github.com/babel/babel/compare/v7.25.4...v7.25.6)

##### 🐛 Bug Fix

-   `babel-generator`
    -   [#&#8203;16783](https://github.com/babel/babel/pull/16783) Properly print inner comments in TS array types ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
    -   [#&#8203;16775](https://github.com/babel/babel/pull/16775) fix: jsx whitespace is not properly preserved when retainLines ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-traverse`
    -   [#&#8203;16727](https://github.com/babel/babel/pull/16727) fix: `path.getAssignmentIdentifiers` may be `undefined` ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-parser`
    -   [#&#8203;16761](https://github.com/babel/babel/pull/16761) fix: improve static canFollowModifier checks ([@&#8203;JLHwung](https://github.com/JLHwung))
-   `babel-helpers`, `babel-plugin-transform-optional-chaining`, `babel-runtime-corejs3`
    -   [#&#8203;16769](https://github.com/babel/babel/pull/16769) Only wrap functions in `superPropertyGet` helper ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

##### 💅 Polish

-   `babel-generator`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-named-capturing-groups-regex`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`
    -   [#&#8203;16780](https://github.com/babel/babel/pull/16780) Do not enforce printing space between `(` and comments ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-import-attributes`
    -   [#&#8203;16781](https://github.com/babel/babel/pull/16781) Don't throw when enabling both syntax-import-{assertions,attributes} ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-generator`
    -   [#&#8203;16782](https://github.com/babel/babel/pull/16782) TS union/intersection nested in union does not need parens ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

##### 🏠 Internal

-   `babel-generator`
    -   [#&#8203;16777](https://github.com/babel/babel/pull/16777) Remove unused `parent` params in the generator ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

### [`v7.25.4`](https://github.com/babel/babel/blob/HEAD/CHANGELOG.md#v7254-2024-08-22)

[Compare Source](https://github.com/babel/babel/compare/v7.25.3...v7.25.4)

##### 🐛 Bug Fix

-   `babel-traverse`
    -   [#&#8203;16756](https://github.com/babel/babel/pull/16756) fix: Skip computed key when renaming ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`
    -   [#&#8203;16755](https://github.com/babel/babel/pull/16755) fix: Decorator 2018-09 may throw an exception ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-types`
    -   [#&#8203;16710](https://github.com/babel/babel/pull/16710) Visit AST fields nodes according to their syntactical order ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-generator`
    -   [#&#8203;16709](https://github.com/babel/babel/pull/16709) Print semicolon after TS `export namespace as A` ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

##### 💅 Polish

-   `babel-generator`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-typescript`, `babel-runtime-corejs2`, `babel-runtime`, `babel-traverse`
    -   [#&#8203;16722](https://github.com/babel/babel/pull/16722) Avoid unnecessary parens around sequence expressions ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-generator`, `babel-plugin-transform-class-properties`
    -   [#&#8203;16714](https://github.com/babel/babel/pull/16714) Avoid unnecessary parens around exported arrow functions ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-generator`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-transform-object-rest-spread`
    -   [#&#8203;16712](https://github.com/babel/babel/pull/16712) Avoid printing unnecessary parens around object destructuring ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

##### 🔬 Output optimization

-   `babel-generator`
    -   [#&#8203;16740](https://github.com/babel/babel/pull/16740) Avoid extra spaces between comments/regexps in compact mode ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

### [`v7.25.3`](https://github.com/babel/babel/blob/HEAD/CHANGELOG.md#v7253-2024-07-31)

[Compare Source](https://github.com/babel/babel/compare/v7.25.2...v7.25.3)

##### 🐛 Bug Fix

-   `babel-plugin-bugfix-firefox-class-in-computed-class-key`, `babel-traverse`
    -   [#&#8203;16699](https://github.com/babel/babel/pull/16699) Avoid validating visitors produced by `traverse.visitors.merge` ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

##### 🏠 Internal

-   `babel-parser`
    -   [#&#8203;16688](https://github.com/babel/babel/pull/16688) Add `@babel/types` as a dependency of `@babel/parser` ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

### [`v7.25.2`](https://github.com/babel/babel/blob/HEAD/CHANGELOG.md#v7252-2024-07-30)

[Compare Source](https://github.com/babel/babel/compare/v7.25.1...v7.25.2)

##### 🐛 Bug Fix

-   `babel-core`, `babel-traverse`
    -   [#&#8203;16695](https://github.com/babel/babel/pull/16695) Ensure that `requeueComputedKeyAndDecorators` is available ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

### [`v7.25.1`](https://github.com/babel/babel/blob/HEAD/CHANGELOG.md#v7251-2024-07-28)

[Compare Source](https://github.com/babel/babel/compare/v7.25.0...v7.25.1)

##### 🐛 Bug Fix

-   `babel-plugin-transform-function-name`
    -   [#&#8203;16683](https://github.com/babel/babel/pull/16683) fix: `ensureFunctionName` may be undefined ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-plugin-transform-react-constant-elements`
    -   [#&#8203;16582](https://github.com/babel/babel/pull/16582) fix plugin-transform-react-constant-elements transform JSXFrament but not add JSXExpressionContainer ([@&#8203;keiseiTi](https://github.com/keiseiTi))
-   `babel-traverse`
    -   [#&#8203;16587](https://github.com/babel/babel/pull/16587) fix: fixed issue16583 + test ([@&#8203;nerodesu017](https://github.com/nerodesu017))

##### 🏠 Internal

-   [#&#8203;16663](https://github.com/babel/babel/pull/16663) Test eslint plugin against eslint 9 ([@&#8203;JLHwung](https://github.com/JLHwung))

### [`v7.25.0`](https://github.com/babel/babel/blob/HEAD/CHANGELOG.md#v7250-2024-07-26)

[Compare Source](https://github.com/babel/babel/compare/v7.24.8...v7.25.0)

##### 👓 Spec Compliance

-   `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-runtime-corejs3`
    -   [#&#8203;16537](https://github.com/babel/babel/pull/16537) `await using` normative updates ([@&#8203;JLHwung](https://github.com/JLHwung))
-   `babel-plugin-transform-typescript`
    -   [#&#8203;16602](https://github.com/babel/babel/pull/16602) Ensure enum members syntactically determinable to be strings do not get reverse mappings ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))

##### 🚀 New Feature

-   `babel-helper-create-class-features-plugin`, `babel-helper-function-name`, `babel-helper-plugin-utils`, `babel-helper-wrap-function`, `babel-plugin-bugfix-safari-class-field-initializer-scope`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-transform-classes`, `babel-plugin-transform-function-name`, `babel-preset-env`, `babel-traverse`, `babel-types`
    -   [#&#8203;16658](https://github.com/babel/babel/pull/16658) Move `ensureFunctionName` to `NodePath.prototype` ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helper-hoist-variables`, `babel-helper-plugin-utils`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-transform-modules-systemjs`, `babel-traverse`
    -   [#&#8203;16644](https://github.com/babel/babel/pull/16644) Move `hoistVariables` to `Scope.prototype` ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helper-create-class-features-plugin`, `babel-helper-module-transforms`, `babel-helper-plugin-utils`, `babel-helper-split-export-declaration`, `babel-plugin-transform-classes`, `babel-traverse`, `babel-types`
    -   [#&#8203;16645](https://github.com/babel/babel/pull/16645) Move `splitExportDeclaration` to `NodePath.prototype` ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helper-create-class-features-plugin`, `babel-helper-environment-visitor`, `babel-helper-module-transforms`, `babel-helper-plugin-utils`, `babel-helper-remap-async-to-generator`, `babel-helper-replace-supers`, `babel-plugin-bugfix-firefox-class-in-computed-class-key`, `babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-classes`, `babel-traverse`
    -   [#&#8203;16649](https://github.com/babel/babel/pull/16649) Move `environment-visitor` helper into `@babel/traverse` ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-core`, `babel-parser`
    -   [#&#8203;16480](https://github.com/babel/babel/pull/16480) Expose wether a module has TLA or not as `.extra.async` ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-compat-data`, `babel-plugin-bugfix-safari-class-field-initializer-scope`, `babel-preset-env`
    -   [#&#8203;16569](https://github.com/babel/babel/pull/16569) Introduce `bugfix-safari-class-field-initializer-scope` ([@&#8203;davidtaylorhq](https://github.com/davidtaylorhq))
-   `babel-plugin-transform-block-scoping`, `babel-traverse`, `babel-types`
    -   [#&#8203;16551](https://github.com/babel/babel/pull/16551) Add `NodePath#getAssignmentIdentifiers` ([@&#8203;JLHwung](https://github.com/JLHwung))
-   `babel-helper-import-to-platform-api`, `babel-plugin-proposal-json-modules`
    -   [#&#8203;16579](https://github.com/babel/babel/pull/16579) Add `uncheckedRequire` option for JSON imports to CJS ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helper-transform-fixture-test-runner`, `babel-node`
    -   [#&#8203;16642](https://github.com/babel/babel/pull/16642) Allow using custom config in `babel-node --eval` ([@&#8203;slatereax](https://github.com/slatereax))
-   `babel-compat-data`, `babel-helper-create-regexp-features-plugin`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-duplicate-named-capturing-groups-regex`, `babel-preset-env`, `babel-standalone`
    -   [#&#8203;16445](https://github.com/babel/babel/pull/16445) Add `duplicate-named-capturing-groups-regex` to `preset-env` ([@&#8203;JLHwung](https://github.com/JLHwung))

##### 🐛 Bug Fix

-   `babel-generator`
    -   [#&#8203;16678](https://github.com/babel/babel/pull/16678) Print parens around as expressions on the LHS ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-template`, `babel-types`
    -   [#&#8203;15286](https://github.com/babel/babel/pull/15286) fix: Props are lost when the template replaces the node ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))

##### 🏠 Internal

-   Other
    -   [#&#8203;16674](https://github.com/babel/babel/pull/16674) bump gulp to 5 ([@&#8203;JLHwung](https://github.com/JLHwung))
-   `babel-generator`
    -   [#&#8203;16651](https://github.com/babel/babel/pull/16651) Simplify the printing logic for `(` before ambiguous tokens ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))
-   `babel-helper-function-name`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-function-name`, `babel-preset-env`, `babel-traverse`
    -   [#&#8203;16652](https://github.com/babel/babel/pull/16652) Simplify `helper-function-name` logic ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

##### 🏃‍♀️ Performance

-   `babel-parser`, `babel-plugin-proposal-pipeline-operator`
    -   [#&#8203;16461](https://github.com/babel/babel/pull/16461) Some minor parser performance improvements for ts ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))

##### 🔬 Output optimization

-   `babel-plugin-transform-classes`
    -   [#&#8203;16670](https://github.com/babel/babel/pull/16670) Reduce redundant `assertThisInitialized` ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-helper-create-class-features-plugin`, `babel-helper-replace-supers`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-object-super`, `babel-plugin-transform-private-methods`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`
    -   [#&#8203;16374](https://github.com/babel/babel/pull/16374) Improve `super.x` output ([@&#8203;liuxingbaoyu](https://github.com/liuxingbaoyu))
-   `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`
    -   [#&#8203;16656](https://github.com/babel/babel/pull/16656) Simplify output for anonymous classes with no methods ([@&#8203;nicolo-ribaudo](https://github.com/nicolo-ribaudo))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: #212
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2024-09-02 18:36:28 +01:00
.forgejo/workflows Update forgejo actions workflow to rsync to the server on push to master/develop (#207) 2024-08-02 17:44:43 +01:00
.gitea Add Gitea templates 2023-02-24 17:33:39 +00:00
.github Create FUNDING.yml 2021-05-10 21:50:20 +01:00
.gitlab Update default.md 2021-01-15 18:15:14 +00:00
docs Add the post author to the return result (#208) 2024-08-02 17:47:47 +01:00
src Update pkg version to 2.3 2024-08-07 17:12:10 +01:00
tests Add the post author to the return result (#208) 2024-08-02 17:47:47 +01:00
.gitignore Add binary building (#151) 2024-03-01 19:51:12 +00:00
.gitlab-ci.yml Add aslant to gitlab project ci 2021-01-13 21:08:47 +00:00
.npmignore Add binary building (#151) 2024-03-01 19:51:12 +00:00
CODE_OF_CONDUCT.md hotfix/2.0.3 (#41) 2022-12-18 15:27:03 +00:00
CONTRIBUTING.md Fix documentation code breaks (#58) 2023-04-28 17:31:34 +01:00
eslint.config.mjs Update eslint (#198) 2024-07-26 18:21:28 +01:00
jest.config.cjs Setup Jest (#57) 2023-04-22 13:20:30 +01:00
jest.setup.js Setup Jest (#57) 2023-04-22 13:20:30 +01:00
LICENSE Update licence copyright to 2023 (#59) 2023-04-28 17:31:55 +01:00
package.json v2.3.0 2024-08-07 17:13:56 +01:00
readme.md Add the post author to the return result (#208) 2024-08-02 17:47:47 +01:00
renovate.json Add type/dependency label to renovate config (#197) 2024-07-26 18:19:44 +01:00
tsconfig.json Setup Jest (#57) 2023-04-22 13:20:30 +01:00
yarn.lock Update dependency @babel/traverse to v7.25.6 (#212) 2024-09-02 18:36:28 +01:00

random-bunny

Get a random image url from a subreddit of your choosing.

Install

npm install --save random-bunny

or if you're using yarn

yarn add random-bunny

Binary

The project can be downloaded as a binary for your system via the GitHub Releases or Gitea Releases page.

Usage

import randomBunny from "random-bunny";

// ... In an async function
const result = await randomBunny('rabbits', 'hot');
console.log(result);

API

randomBunny()

Returns a json string for a random post. Accepts 3 arguments: subreddit, sortby ('new', 'hot', 'top'), and limit (1-100, default 100)

The json string which gets returned consists of:

  • archived
  • author
  • downs
  • hidden
  • permalink
  • subreddit
  • subredditSubscribers
  • title
  • ups
  • url

sortBy will default to 'hot' if not given or invalid

CLI

Random bunny can also be used as a CLI. This is accessible via the executable (see git releases) or via src/cli.ts

For more details, see the documentation.

Notes

License

MIT © Vylpes