Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions extensions/suspend/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@
"scripts": {
"dev": "webpack --mode development --watch",
"build": "webpack --mode production",
"format": "prettier --write src",
"analyze": "cross-env ANALYZER=true yarn run build",
"format-check": "prettier --check src"
"format": "prettier --write src",
"format-check": "prettier --check src",
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
"check-typings-coverage": "typescript-coverage-report"
},
"devDependencies": {
"@flarum/prettier-config": "^1.0.0",
"flarum-tsconfig": "^1.0.0",
"flarum-webpack-config": "^2.0.0",
"prettier": "^2.5.1",
"webpack": "^5.76.0",
"webpack-cli": "^4.9.1"
"webpack-cli": "^4.9.1",
"typescript-coverage-report": "^0.6.1"
}
}
2 changes: 1 addition & 1 deletion extensions/suspend/js/src/forum/extend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Model from 'flarum/common/Model';
export default [
new Extend.Model(User)
.attribute<boolean>('canSuspend')
.attribute<Date, string | null | undefined>('suspendedUntil', Model.transformDate)
.attribute<Date | null, string | null>('suspendedUntil', Model.transformDate)
.attribute<string | null | undefined>('suspendReason')
.attribute<string | null | undefined>('suspendMessage'),
];
Loading