1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

1188 Commits

Author SHA1 Message Date
renovate[bot]
907cce9c88
chore(deps): update dependency husky to v8.0.2 (#2354)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [husky](https://typicode.github.io/husky)
([source](https://togithub.com/typicode/husky)) | [`8.0.1` ->
`8.0.2`](https://renovatebot.com/diffs/npm/husky/8.0.1/8.0.2) |
[![age](https://badges.renovateapi.com/packages/npm/husky/8.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/husky/8.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/husky/8.0.2/compatibility-slim/8.0.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/husky/8.0.2/confidence-slim/8.0.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>typicode/husky</summary>

### [`v8.0.2`](https://togithub.com/typicode/husky/releases/tag/v8.0.2)

[Compare
Source](https://togithub.com/typicode/husky/compare/v8.0.1...v8.0.2)

-   docs: remove deprecated npm set-script

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzQuMTkuMCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-09 05:53:57 +00:00
renovate[bot]
aed48c0ee0
chore(deps): update dependency @swc/core to v1.3.14 (#2352)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@swc/core](https://swc.rs)
([source](https://togithub.com/swc-project/swc)) | [`1.3.11` ->
`1.3.14`](https://renovatebot.com/diffs/npm/@swc%2fcore/1.3.11/1.3.14) |
[![age](https://badges.renovateapi.com/packages/npm/@swc%2fcore/1.3.14/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@swc%2fcore/1.3.14/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@swc%2fcore/1.3.14/compatibility-slim/1.3.11)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@swc%2fcore/1.3.14/confidence-slim/1.3.11)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>swc-project/swc</summary>

###
[`v1.3.14`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#&#8203;1314---2022-11-03)

[Compare
Source](241f9f05cb...v1.3.14)

##### Bug Fixes

- **(common)** Remove `&mut` from `build_source_map_from`
([#&#8203;6276](https://togithub.com/swc-project/swc/issues/6276))
([47d7fca](47d7fcaaed))

- **(css/parser)** Fix parsing of colors
([#&#8203;6260](https://togithub.com/swc-project/swc/issues/6260))
([c3944ba](c3944ba239))

- **(css/parser)** Fix various issues
([#&#8203;6281](https://togithub.com/swc-project/swc/issues/6281))
([2813acc](2813acccc2))

- **(es/codegen)** Preserve more parens
([#&#8203;6268](https://togithub.com/swc-project/swc/issues/6268))
([c318446](c3184463f1))

- **(es/compat)** Fix `new.target` in a nested scope
([#&#8203;6296](https://togithub.com/swc-project/swc/issues/6296))
([aa18612](aa18612e62))

- **(es/compat)** Fix destructuring of an empty array
([#&#8203;6314](https://togithub.com/swc-project/swc/issues/6314))
([3bea6f7](3bea6f7248))

- **(es/helpers)** Fix `toArray`
([#&#8203;6318](https://togithub.com/swc-project/swc/issues/6318))
([e34c25e](e34c25e40d))

- **(es/lints)** Fix `const-assign` in function expressions
([#&#8203;6294](https://togithub.com/swc-project/swc/issues/6294))
([a27392a](a27392a251))

- **(es/minifier)** Don't ignore nullish coalescing
([#&#8203;6272](https://togithub.com/swc-project/swc/issues/6272))
([8c1ac68](8c1ac686cb))

- **(es/minifier)** Don't inline regex for IIFEs
([#&#8203;6283](https://togithub.com/swc-project/swc/issues/6283))
([4eab2ed](4eab2ed2fc))

- **(es/minifier)** Fix infinite loop
([#&#8203;6300](https://togithub.com/swc-project/swc/issues/6300))
([655f674](655f6744c5))

- **(es/minifier)** Don't drop an inlined parameter as a duplicate
([#&#8203;6293](https://togithub.com/swc-project/swc/issues/6293))
([dd797f7](dd797f7f15))

- **(es/resolver)** Change order for switch cases
([#&#8203;6317](https://togithub.com/swc-project/swc/issues/6317))
([2737aea](2737aea312))

- **(es/typescript)** Fix stack overflow
([#&#8203;6250](https://togithub.com/swc-project/swc/issues/6250))
([28ec6e8](28ec6e8fc7))

- **(html/minifier)** Merge style blocks
([#&#8203;6264](https://togithub.com/swc-project/swc/issues/6264))
([028951c](028951c36c))

##### Features

- **(css/parser)** Improve error reporting
([#&#8203;6274](https://togithub.com/swc-project/swc/issues/6274))
([956d574](956d574683))

- **(es)** Support trailing commas in `.swcrc`
([#&#8203;6289](https://togithub.com/swc-project/swc/issues/6289))
([244b0af](244b0af30d))

- **(es/minfiier)** Compute more with sequential inliner
([#&#8203;6169](https://togithub.com/swc-project/swc/issues/6169))
([743a1aa](743a1aab4f))

- **(es/minifier)** Implement trivial optimizations
([#&#8203;6256](https://togithub.com/swc-project/swc/issues/6256))
([5d52ae9](5d52ae971e))

- **(html/minifier)** Handle `crossorigin`
([#&#8203;6261](https://togithub.com/swc-project/swc/issues/6261))
([782da5c](782da5c83a))

- **(html/minifier)** Merge `script` tags
([#&#8203;6273](https://togithub.com/swc-project/swc/issues/6273))
([02f8d31](02f8d31ef3))

##### Miscellaneous Tasks

- **(ci)** Enforce clippy for all targets
([#&#8203;6299](https://togithub.com/swc-project/swc/issues/6299))
([0967e8f](0967e8f06d))

- **(ci)** Fix publish action
([2737143](27371431a9))

- **(ci)** Fix publish action
([13b4d31](13b4d317a5))

- **(common)** Switch to `new_debug_unreachable`
([#&#8203;6265](https://togithub.com/swc-project/swc/issues/6265))
([2f61332](2f61332177))

##### Performance

- **(html/parser)** Refactor
([#&#8203;6313](https://togithub.com/swc-project/swc/issues/6313))
([3a90657](3a9065799d))

##### Refactor

- **(css/parser)** Refactor more
([#&#8203;6251](https://togithub.com/swc-project/swc/issues/6251))
([a0e4684](a0e4684476))

- **(css/parser)** Refactor even more
([#&#8203;6288](https://togithub.com/swc-project/swc/issues/6288))
([6cafeb2](6cafeb2bcc))

- **(es)** Accept custom instance of `Comments`
([#&#8203;6290](https://togithub.com/swc-project/swc/issues/6290))
([1024a55](1024a552cf))

- **(html/parser)** Refactor
([#&#8203;6267](https://togithub.com/swc-project/swc/issues/6267))
([c255cfd](c255cfd716))

##### Testing

- **(css/minifier)** Fix fixture tester
([#&#8203;6222](https://togithub.com/swc-project/swc/issues/6222))
([cd1319d](cd1319d9be))

- **(css/parser)** Add tests for refactoring
([#&#8203;6262](https://togithub.com/swc-project/swc/issues/6262))
([4c293f9](4c293f965b))

- **(es)** Enable tests for fixed issues
([#&#8203;6311](https://togithub.com/swc-project/swc/issues/6311))
([5b02e24](5b02e2450d))

- **(es/compat)** Add execution tests
([#&#8203;6312](https://togithub.com/swc-project/swc/issues/6312))
([0f9d930](0f9d930f73))

- **(es/minifier)** Add a test for `??` operator
([#&#8203;6282](https://togithub.com/swc-project/swc/issues/6282))
([0376da7](0376da73c6))

###
[`v1.3.13`](https://togithub.com/swc-project/swc/compare/v1.3.11...241f9f05cbb67fc531e8f9c8e4a142521754b9a8)

[Compare
Source](https://togithub.com/swc-project/swc/compare/v1.3.11...241f9f05cbb67fc531e8f9c8e4a142521754b9a8)

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzQuMTkuMCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-09 02:43:42 +00:00
sjaanus
a267f13a7d
4.18.0-beta.0 2022-11-04 11:02:47 +02:00
Ivar Conradi Østhus
ae0006b839
fix: require minimatch 3.0.5 or higher 2022-11-03 14:43:36 +01:00
sjaanus
98cda9258d
4.17.0-beta.11 2022-11-02 08:47:37 +02:00
sjaanus
95779754fb
4.17.0-beta.10 2022-10-31 11:55:16 +02:00
Simon Hornby
9201f4f08f
4.17.0-beta.9 (#2298) 2022-10-31 09:35:00 +02:00
renovate[bot]
c4b18a2e45
chore(deps): update typescript-eslint monorepo to v5.41.0 (#2283)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-29 00:20:06 +00:00
sjaanus
28880adc2d
4.17.0-beta.8 2022-10-28 11:29:01 +03:00
renovate[bot]
26994cedc6
chore(deps): update dependency supertest to v6.3.1 (#2268)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-28 03:10:06 +00:00
renovate[bot]
5f59333ef9
chore(deps): update dependency superagent to v8.0.3 (#2263)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-27 15:26:41 +00:00
sjaanus
77f2f55aed
4.17.0-beta.7 2022-10-27 15:51:46 +03:00
sjaanus
922ec7126f
4.17.0-beta.6 2022-10-27 10:57:53 +03:00
renovate[bot]
09bf93f9dd
chore(deps): update dependency @types/semver to v7.3.13 (#2267)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-27 06:44:24 +00:00
renovate[bot]
e73e5cf76d
chore(deps): update dependency @swc/core to v1.3.11 (#2265)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-27 00:09:25 +00:00
renovate[bot]
7a39407a97
chore(deps): update dependency jest to v29.2.2 (#2262)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-26 17:03:43 +00:00
Gastón Fournier
3c412eddcf
chore: Use last version of @unleash/express-openapi (#2260)
* Use the last version

https://www.npmjs.com/package/@unleash/express-openapi?activeTab=versions no changes from v0.2.1-beta.0
2022-10-26 14:19:56 +02:00
sjaanus
2304ea1d1e
4.17.0-beta.5 2022-10-26 14:43:26 +03:00
sjaanus
a579245f2a
4.17.0-beta.4 2022-10-26 13:30:29 +03:00
renovate[bot]
d8df7e5815
fix(deps): update dependency unleash-client to v3.16.0 (#2235)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: sjaanus <sellinjaanus@gmail.com>
2022-10-26 10:23:33 +02:00
Ivar Conradi Østhus
cf4fc2303b
Feat/stats service (#2211)
Introduces an instance stats service exposing usage metrics of the Unleash installation.
2022-10-25 13:10:27 +02:00
sjaanus
1bdd516fc7
4.17.0-beta.3 2022-10-24 20:10:54 +03:00
sjaanus
56e9af3434
4.17.0-beta.2 2022-10-24 10:42:33 +03:00
renovate[bot]
549d317db7
chore(deps): update typescript-eslint monorepo to v5.40.1 (#2229)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-22 13:18:52 +00:00
renovate[bot]
ca4c030178
chore(deps): update jest monorepo (#2227)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-22 05:24:11 +00:00
renovate[bot]
fc32c0b4d4
chore(deps): update dependency eslint to v8.26.0 (#2226)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-22 02:48:59 +00:00
renovate[bot]
6181597014
chore(deps): update dependency @swc/core to v1.3.10 (#2223)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-21 16:24:24 +00:00
renovate[bot]
de43064f19
chore(deps): update dependency fast-check to v3.3.0 (#2220)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-21 13:26:18 +00:00
renovate[bot]
a1dc8339aa
chore(deps): update dependency @babel/core to v7.19.6 (#2216)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-21 04:41:39 +00:00
Ivar Conradi Østhus
d0ea49b92b
fix: add heroku postbuild step - second attempt 2022-10-18 21:28:31 +02:00
Ivar Conradi Østhus
4e1b371f8d
fix: add heroku postbuild step 2022-10-18 21:24:12 +02:00
renovate[bot]
7524dad7e8
chore(deps): update dependency @swc/core to v1.3.9 (#2196)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-17 18:20:19 +00:00
Christopher Kolstad
c4d68110fc
4.17.0-beta.1 2022-10-17 09:16:20 +02:00
renovate[bot]
62eac864f3
chore(deps): update dependency supertest to v6.3.0 (#2184)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-12 19:08:01 +00:00
renovate[bot]
8f02b4ddd7
chore(deps): update dependency @swc/core to v1.3.7 (#2181)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-12 09:23:43 +00:00
renovate[bot]
34f7fb9c5b
chore(deps): update dependency openapi-enforcer to v1.22.0 (#2179)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-12 03:17:23 +00:00
renovate[bot]
9adc55757c
chore(deps): update dependency fast-check to v3.2.0 (#2177)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-11 21:31:33 +00:00
renovate[bot]
815d2fbf28
chore(deps): update dependency eslint to v8.25.0 (#2174)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-11 18:57:35 +00:00
Fredrik Oseberg
2a3ab795ae 4.17.0-beta.0 2022-10-11 09:37:11 +02:00
renovate[bot]
bb8b70e3f0
chore(deps): update dependency @swc/core to v1.3.6 (#2161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-10 19:44:16 +00:00
renovate[bot]
5535a1769d
chore(deps): update dependency @babel/core to v7.19.3 (#2160)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-10 08:13:08 +00:00
renovate[bot]
9477babb3f
chore(deps): update dependency typescript to v4.8.4 (#2154)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-07 17:54:29 +00:00
renovate[bot]
996f7ebd80
chore(deps): update dependency fast-check to v3.1.4 (#2149)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-07 08:29:36 +00:00
renovate[bot]
b0a3229f0e
chore(deps): update dependency @types/nodemailer to v6.4.6 (#2143)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-06 20:59:44 +00:00
renovate[bot]
48ba2135c2
chore(deps): update dependency @types/express to v4.17.14 (#2142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-06 06:39:54 +00:00
renovate[bot]
b7b8e14e4e
chore(deps): update dependency @swc/jest to v0.2.23 (#2141)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-06 03:58:52 +00:00
sjaanus
9473ffd4f2 4.16.0 2022-10-03 13:26:08 +03:00
Gard Rimestad
17d1d2288c
fix: make unit test target work (#2082)
This makes `yarn test:unit` work
2022-09-26 12:30:10 +02:00
sjaanus
1426d5be33
Added login endpoint rate limit (#2074)
* Added login rate limit

* Make more pretty

* Make more pretty

* Fix

* Remove double after all
2022-09-26 10:58:58 +03:00
Thomas Heartman
97c2b3c089
openapi: improve validation testing (#2058)
## What

This PR adds an extra layer of OpenAPI validation testing to what we already have. It also fixes any issues that make the new tests fail.

## Why

While the current OpenAPI validation takes care of _some_ things, there's also things it misses, as shown by #2055. By adding the OpenAPI Enforcer package, we should hopefully be able to catch more of these errors in the future. The enforcer _does_ flag the issue in #2055 as an error.

## How

By adding the OpenAPI Enforcer package and making whatever changes it picks up on.

By adding location headers to all our 201 endpoints. I also had to change some signatures on `create` store methods so that they actually return something (a lot of them just returned `void`).

## Discussion points

### Code changes

Some of the code changes may not be necessary or we may want to change more code to align with what changes have been done. It may be worth standardizing on a pattern for `*store.create` methods, so that they always return an identifier or the stored object, for instance.

### On relative URIs

The 201 location headers use relative URIs to point to the created resources. This seemed to be the easiest way to me, as we don't need to worry about figuring out what the absolute URL of the instance is (though we could probably just concat it to the request URI?). The algorithm for determining relative URIs is described in [RFC 3986 section 5](https://www.rfc-editor.org/rfc/rfc3986#section-5).

There's also some places where I'm not sure we _can_ provide accurate location url. I think they're supposed to point _directly at_ whatever the resource is, but for some resources (such as api tokens), you can only get it as part of a collection. From [RFC 9110 on the location field](https://httpwg.org/specs/rfc9110.html#field.location) (emphasis mine):

> the Location header field in a [201 (Created)](https://httpwg.org/specs/rfc9110.html#status.201) response is supposed to provide a URI that is **specific** to the created resource.

A link to a collection is not specific. I'm not sure what best to do about this.

### Inline comments

I've added a number of inline PR comments that I'd love to get some feedback on too. Have a look and let me know what you think!

### Unfinished business

I've added some juicy comments to some of the files here. They contain non-blocking issues that I'm tracking (via github issues). We should resolve them in the future, but right now they can stay as they are. 

## Commits

* Feat: add openapi-enforcer + tests; fix _some_ issues

* Test: allow non-standard string formats

* validation: fix _some_ 201 created location header endpoints

* #1391: fix remaining 201 location headers missing

* Refactor: use the ajv options object instead of add* methods

* #1391: flag validation errors and warnings as test failures

* #1391: modify patch schema to specify either object or array

We don't provide many patch endpoints, so we _could_ create separate
patch operation objects for each one. I think that makes sense to do
as part of the larger cleanup. For now, I think it's worth to simply
turn it into one of these. While it's not entirely accurate, it's
better than what we had before.

* Refactor: make tests easier to read

* #1391: use enum for valid token types

This was previously only a description. This may seem like a breaking
change because OpenAPI would previously accept any string. However,
Joi also performs validation on this, so invalid values wouldn't work
previously either.

* #1391: Comment out default parameter values for now

This isn't the _right_ way, but it's the pragmatic solution. It's not
a big deal and this works as a stopgap solution.

* #1391:  add todo note for api token schema fixes

* #1391: update snapshot

* Revert "#1391: modify patch schema to specify either object or array"

This reverts commit 0dd5d0faa1.

Turns out we need to allow much more than just objects and arrays.
I'll leave this as is for now.

* Chore(#1391): update comment explaining api token schema TODO

* #1391: modify some test code and add comment

* #1391: update tests and spec to allow 'any' type in schema

* Chore: remove comment

* #1391: add tests for context field stores

* #1391: add location header for public signup links

* #1391: fix query parameter description.

There was indeed a bug in the package, and this has been addressed
now, so we can go back to describing the params properly.
2022-09-23 15:02:09 +02:00