Skip to content

Commit

Permalink
feat: make session class macroable
Browse files Browse the repository at this point in the history
Closes: #84
  • Loading branch information
thetutlage committed Apr 15, 2024
1 parent 51d5e22 commit 1d85cee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

export * as errors from './src/errors.js'
export { configure } from './configure.js'
export { Session } from './src/session.js'
export { stubsRoot } from './stubs/main.js'
export { defineConfig, stores } from './src/define_config.js'
export { ReadOnlyValuesStore, ValuesStore } from './src/values_store.js'
export { Session } from './src/session.js'
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"typescript": "^5.4.5"
},
"dependencies": {
"@poppinss/macroable": "^1.0.2",
"@poppinss/utils": "^6.7.3"
},
"peerDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

import type { I18n } from '@adonisjs/i18n'
import Macroable from '@poppinss/macroable'
import lodash from '@poppinss/utils/lodash'
import { cuid } from '@adonisjs/core/helpers'
import type { HttpContext } from '@adonisjs/core/http'
Expand All @@ -32,7 +33,7 @@ import type {
* A session instance is isolated between requests but
* uses a centralized persistence store and
*/
export class Session {
export class Session extends Macroable {
#store: SessionStoreContract

Check failure on line 37 in src/session.ts

View workflow job for this annotation

GitHub Actions / test_linux (20.10.0)

Unreachable code

Check failure on line 37 in src/session.ts

View workflow job for this annotation

GitHub Actions / test_linux (21.x)

Unreachable code

Check failure on line 37 in src/session.ts

View workflow job for this annotation

GitHub Actions / test_windows (20.10.0)

Unreachable code

Check failure on line 37 in src/session.ts

View workflow job for this annotation

GitHub Actions / lint / lint

Unreachable code
#emitter: EmitterService
#ctx: HttpContext
Expand Down

0 comments on commit 1d85cee

Please sign in to comment.