Skip to content

Commit

Permalink
Merge pull request #1150 from serlo/refactor-authorization
Browse files Browse the repository at this point in the history
chore(authorization): Remove dependency of @serlo/api
  • Loading branch information
kulla authored Nov 30, 2023
2 parents 5a678ef + d25d265 commit 8e417ea
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [v0.59.1](https://github.com/serlo/api.serlo.org/compare/v0.59.0..v0.59.1) - November 30, 2023

### Internal

- `@serlo/authorization`: Remove dependency of `@ſerlo/api`

## [v0.59.0](https://github.com/serlo/api.serlo.org/compare/v0.58.1..v0.59.0) - November 30, 2023

### Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"packages/*"
],
"npmClient": "yarn",
"version": "0.59.0",
"version": "0.59.1",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
5 changes: 1 addition & 4 deletions packages/authorization/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serlo/authorization",
"version": "0.59.0",
"version": "0.59.1",
"repository": "serlo/api.serlo.org",
"license": "Apache-2.0",
"author": "Serlo Education e.V.",
Expand All @@ -10,9 +10,6 @@
"scripts": {
"build": "tsdx build --tsconfig tsconfig.prod.json"
},
"dependencies": {
"@serlo/api": "^0.59.0"
},
"publishConfig": {
"access": "public"
}
Expand Down
11 changes: 9 additions & 2 deletions packages/authorization/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Instance } from '@serlo/api'

export enum Scope {
Serlo = 'serlo.org',
Serlo_De = 'serlo.org:de',
Expand All @@ -10,6 +8,15 @@ export enum Scope {
Serlo_Ta = 'serlo.org:ta',
}

enum Instance {
De = 'de',
En = 'en',
Es = 'es',
Fr = 'fr',
Hi = 'hi',
Ta = 'ta',
}

export function formatScope(scope: string): Scope {
if (scope === 'Serlo') return Scope.Serlo
const scopeIdentifier = scope.split('_')[1].toLowerCase()
Expand Down
4 changes: 2 additions & 2 deletions packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serlo/api.serlo.org",
"version": "0.59.0",
"version": "0.59.1",
"private": true,
"repository": "serlo/api.serlo.org",
"license": "Apache-2.0",
Expand Down Expand Up @@ -32,7 +32,7 @@
"@nmshd/connector-sdk": "^2.2.4",
"@ory/client": "^1.4.3",
"@sentry/node": "^7.82.0",
"@serlo/authorization": "^0.59.0",
"@serlo/authorization": "^0.59.1",
"@types/basic-auth": "^1.1.6",
"@types/bull-arena": "^3.0.10",
"@types/graphql-modules": "^0.59.0",
Expand Down
5 changes: 5 additions & 0 deletions scripts/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1645,6 +1645,11 @@ async function exec(): Promise<void> {
'Use esbuild for the docker container',
],
},
{
tagName: 'v0.59.1',
date: '2023-11-30',
internal: ['`@serlo/authorization`: Remove dependency of `@ſerlo/api`'],
},
],
})

Expand Down
8 changes: 3 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4096,7 +4096,7 @@ __metadata:
"@nmshd/connector-sdk": ^2.2.4
"@ory/client": ^1.4.3
"@sentry/node": ^7.82.0
"@serlo/authorization": ^0.59.0
"@serlo/authorization": ^0.59.1
"@types/basic-auth": ^1.1.6
"@types/bull-arena": ^3.0.10
"@types/graphql-modules": ^0.59.0
Expand Down Expand Up @@ -4138,7 +4138,7 @@ __metadata:
languageName: unknown
linkType: soft

"@serlo/api@^0.59.0, @serlo/api@workspace:packages/types":
"@serlo/api@workspace:packages/types":
version: 0.0.0-use.local
resolution: "@serlo/api@workspace:packages/types"
dependencies:
Expand All @@ -4149,11 +4149,9 @@ __metadata:
languageName: unknown
linkType: soft

"@serlo/authorization@^0.59.0, @serlo/authorization@workspace:packages/authorization":
"@serlo/authorization@^0.59.1, @serlo/authorization@workspace:packages/authorization":
version: 0.0.0-use.local
resolution: "@serlo/authorization@workspace:packages/authorization"
dependencies:
"@serlo/api": ^0.59.0
languageName: unknown
linkType: soft

Expand Down

0 comments on commit 8e417ea

Please sign in to comment.