Skip to content

Commit

Permalink
Merge pull request #438 from mocks-server/release
Browse files Browse the repository at this point in the history
Release v4.0.0
  • Loading branch information
javierbrea authored Sep 14, 2022
2 parents ab1fdb6 + be0f11e commit 6f37a97
Show file tree
Hide file tree
Showing 385 changed files with 2,113 additions and 13,044 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
/packages/*/coverage
/test/*/dist
/test/core-e2e/src/fixtures
/test/core-e2e-legacy/src/fixtures
/test/main-e2e/src/fixtures
/packages/core/test/functional/fixtures
/test/main-e2e/src/fixtures
5 changes: 5 additions & 0 deletions packages/admin-api-client-data-provider/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Removed
### BREAKING CHANGES

## [6.1.1] - 2022-09-14

### Changed
- chore(deps): Update dependencies

## [6.1.0] - 2022-08-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/admin-api-client-data-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mocks-server/admin-api-client-data-provider",
"version": "6.1.0",
"version": "6.1.1",
"description": "Client of @mocks-server/plugin-admin-api built with @data-provider",
"keywords": [
"administration",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sonar.organization=mocks-server
sonar.projectKey=mocks-server_main_admin-api-client-data-provider
sonar.projectName=admin-api-client-data-provider
sonar.projectVersion=6.1.0
sonar.projectVersion=6.1.1

sonar.javascript.file.suffixes=.js
sonar.sourceEncoding=UTF-8
Expand Down
6 changes: 5 additions & 1 deletion packages/admin-api-client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed
### Fixed
### Removed
### Breaking change

## [7.0.0] - 2022-09-14

### Removed
- feat: Remove default client methods. Class `AdminApiClient` has to be used instead.

## [6.2.0] - 2022-08-11

Expand Down
5 changes: 0 additions & 5 deletions packages/admin-api-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ apiClient.configClient({
});
```

## Release notes

* Due to backward compatibility reasons, the package also creates a default `AdminApiClient` automatically and exports all of its methods as functions available at first level. Usage of these "global" functions is discouraged, as they will be removed in next major version.
* Current major release is compatible only with `@mocks-server/main` versions upper or equal than `3.6`. Use prior releases for lower versions. If you don't want to update to the latest major version of this package yet but you want to update `@mocks-server/main`, you can also use any `5.x` version of this package with any `@mocks-server/[email protected]` version.

## Contributing

Contributors are welcome.
Expand Down
2 changes: 1 addition & 1 deletion packages/admin-api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mocks-server/admin-api-client",
"version": "6.2.0",
"version": "7.0.0",
"description": "Client of @mocks-server/plugin-admin-api",
"keywords": [
"mocks-server",
Expand Down
2 changes: 1 addition & 1 deletion packages/admin-api-client/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sonar.organization=mocks-server
sonar.projectKey=mocks-server_main_admin-api-client
sonar.projectName=admin-api-client
sonar.projectVersion=6.2.0
sonar.projectVersion=7.0.0

sonar.javascript.file.suffixes=.js
sonar.sourceEncoding=UTF-8
Expand Down
32 changes: 0 additions & 32 deletions packages/admin-api-client/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,35 +71,3 @@ export class AdminApiClient {
return this._adminApiClient.configClient(config);
}
}

const defaultClient = new AdminApiClient();

export const readAbout = defaultClient.readAbout.bind(defaultClient);

export const readConfig = defaultClient.readConfig.bind(defaultClient);

export const updateConfig = defaultClient.updateConfig.bind(defaultClient);

export const readAlerts = defaultClient.readAlerts.bind(defaultClient);

export const readAlert = defaultClient.readAlert.bind(defaultClient);

export const readCollections = defaultClient.readCollections.bind(defaultClient);

export const readCollection = defaultClient.readCollection.bind(defaultClient);

export const readRoutes = defaultClient.readRoutes.bind(defaultClient);

export const readRoute = defaultClient.readRoute.bind(defaultClient);

export const readVariants = defaultClient.readVariants.bind(defaultClient);

export const readVariant = defaultClient.readVariant.bind(defaultClient);

export const readCustomRouteVariants = defaultClient.readCustomRouteVariants.bind(defaultClient);

export const useRouteVariant = defaultClient.useRouteVariant.bind(defaultClient);

export const restoreRouteVariants = defaultClient.restoreRouteVariants.bind(defaultClient);

export const configClient = defaultClient.configClient.bind(defaultClient);
10 changes: 0 additions & 10 deletions packages/admin-api-client/test/client.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,6 @@ describe("AdminApiClient class", () => {
});

describe("when updating config", () => {
it("should update current delay using legacy option", async () => {
await apiClient.updateConfig({
mocks: {
delay: 1000,
},
});
const settings = await apiClient.readConfig();
expect(settings.mocks.delay).toEqual(1000);
});

it("should update current delay", async () => {
await apiClient.updateConfig({
mock: {
Expand Down
Loading

0 comments on commit 6f37a97

Please sign in to comment.