diff --git a/.mocharc.json b/.mocharc.json index 867402688c..fc7fee2154 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -1,6 +1,6 @@ { "extension": ["ts","js","cjs","mjs"], - "require": "ts-node/register", + "require": ["ts-node/register", "tsconfig-paths/register"], "slow": 1000, "timeout": 30000, "exit": true diff --git a/gulpfile.ts b/gulpfile.ts index 771a5c0e32..bcd50890e2 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -4,7 +4,6 @@ import * as fs from 'fs'; import * as gulp from 'gulp'; -import * as ts from 'gulp-typescript'; import * as rimraf from 'rimraf'; import * as replace from 'gulp-replace'; const terser = require('gulp-terser'); @@ -13,16 +12,6 @@ const cssnano = require('gulp-cssnano'); const locales: { [x: string]: any } = require('./locales'); const meta = require('./package.json'); -gulp.task('build:ts', () => { - const tsProject = ts.createProject('./src/tsconfig.json'); - - return tsProject - .src() - .pipe(tsProject()) - .on('error', () => {}) - .pipe(gulp.dest('./built/')); -}); - gulp.task('build:copy:views', () => gulp.src('./src/server/web/views/**/*').pipe(gulp.dest('./built/server/web/views')) ); @@ -78,7 +67,6 @@ gulp.task('cleanall', gulp.parallel('clean', cb => )); gulp.task('build', gulp.parallel( - 'build:ts', 'build:copy', )); diff --git a/package.json b/package.json index 0f40837a6f..ba41f0ddf5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "misskey", "author": "syuilo ", - "version": "12.75.0", + "version": "12.75.1", "codename": "indigo", "repository": { "type": "git", @@ -15,11 +15,13 @@ "ormconfig": "node ./built/ormconfig.js", "migrate": "ts-node ./node_modules/typeorm/cli.js migration:run", "migrateandstart": "npm run migrate && npm run start", - "build": "npm run build-webpack && npm run build-gulp", + "build": "npm run build-webpack && npm run build-ts && npm run build-gulp", "build-webpack": "webpack", + "build-ts": "tsc -p src/tsconfig.json || echo done. && tsc-alias -p src/tsconfig.json", "build-gulp": "gulp build", "watch": "concurrently \"npm:watch-*\"", "watch-webpack": "webpack --watch", + "watch-ts": "tsc -w -p src/tsconfig.json && tsc-alias -w -p src/tsconfig.json", "watch-gulp": "gulp watch", "clean": "gulp clean", "cleanall": "gulp cleanall", @@ -148,7 +150,6 @@ "gulp-replace": "1.0.0", "gulp-terser": "2.0.1", "gulp-tslint": "8.1.4", - "gulp-typescript": "6.0.0-alpha.1", "hard-source-webpack-plugin": "0.13.1", "html-minifier": "4.0.0", "http-proxy-agent": "4.0.1", @@ -234,12 +235,13 @@ "tmp": "0.2.1", "ts-loader": "8.0.18", "ts-node": "9.1.1", + "tsc-alias": "1.2.8", + "tsconfig-paths": "3.9.0", "tslint": "6.1.3", "tslint-sonarts": "1.9.0", "typeorm": "0.2.31", "typescript": "4.2.3", "ulid": "2.3.0", - "url-loader": "4.1.1", "uuid": "8.3.2", "v-debounce": "0.1.2", "vanilla-tilt": "1.7.0", @@ -252,7 +254,7 @@ "vue-style-loader": "4.1.3", "vuedraggable": "4.0.1", "web-push": "3.4.4", - "webpack": "5.26.3", + "webpack": "5.27.2", "webpack-cli": "4.5.0", "websocket": "1.0.33", "ws": "7.4.4", diff --git a/src/@types/meta.json.d.ts b/src/@types/meta.json.d.ts deleted file mode 100644 index ab812682b6..0000000000 --- a/src/@types/meta.json.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module '*/meta.json' { - const version: string; -} diff --git a/src/argv.ts b/src/argv.ts index a92338f867..9c69a450db 100644 --- a/src/argv.ts +++ b/src/argv.ts @@ -1,5 +1,5 @@ import * as program from 'commander'; -import config from './config'; +import config from '@/config'; program .version(config.version) diff --git a/src/boot/master.ts b/src/boot/master.ts index aded102912..ef8692b308 100644 --- a/src/boot/master.ts +++ b/src/boot/master.ts @@ -6,13 +6,13 @@ import * as isRoot from 'is-root'; import { getConnection } from 'typeorm'; import Logger from '../services/logger'; -import loadConfig from '../config/load'; -import { Config } from '../config/types'; +import loadConfig from '@/config/load'; +import { Config } from '@/config/types'; import { lessThan } from '../prelude/array'; import { program } from '../argv'; -import { showMachineInfo } from '../misc/show-machine-info'; +import { showMachineInfo } from '@/misc/show-machine-info'; import { initDb } from '../db/postgre'; -import * as meta from '../meta.json'; +const meta = require('../meta.json'); const logger = new Logger('core', 'cyan'); const bootLogger = logger.createSubLogger('boot', 'magenta', false); diff --git a/src/client/account.ts b/src/client/account.ts index e5b451cf14..6f06ee0f32 100644 --- a/src/client/account.ts +++ b/src/client/account.ts @@ -1,7 +1,7 @@ import { reactive } from 'vue'; -import { apiUrl } from '@/config'; -import { waiting } from '@/os'; -import { unisonReload } from '@/scripts/unison-reload'; +import { apiUrl } from '@client/config'; +import { waiting } from '@client/os'; +import { unisonReload } from '@client/scripts/unison-reload'; // TODO: 他のタブと永続化されたstateを同期 diff --git a/src/client/components/abuse-report-window.vue b/src/client/components/abuse-report-window.vue index 98578ee44f..7dbb9657bd 100644 --- a/src/client/components/abuse-report-window.vue +++ b/src/client/components/abuse-report-window.vue @@ -29,10 +29,10 @@ diff --git a/src/client/components/ui/info.vue b/src/client/components/ui/info.vue index 5c71b14a0a..12b3dbcfd1 100644 --- a/src/client/components/ui/info.vue +++ b/src/client/components/ui/info.vue @@ -9,7 +9,7 @@ diff --git a/src/client/pages/about-misskey.vue b/src/client/pages/about-misskey.vue index a52678e3cd..2d1da88fa1 100644 --- a/src/client/pages/about-misskey.vue +++ b/src/client/pages/about-misskey.vue @@ -55,14 +55,14 @@ import { defineComponent } from 'vue'; import { faInfoCircle, faCode, faLanguage, faHandHoldingMedical, } from '@fortawesome/free-solid-svg-icons'; import VanillaTilt from 'vanilla-tilt'; -import { version } from '@/config'; -import FormLink from '@/components/form/link.vue'; -import FormBase from '@/components/form/base.vue'; -import FormGroup from '@/components/form/group.vue'; -import FormKeyValueView from '@/components/form/key-value-view.vue'; -import MkLink from '@/components/link.vue'; -import { physics } from '@/scripts/physics.ts'; -import * as os from '@/os'; +import { version } from '@client/config'; +import FormLink from '@client/components/form/link.vue'; +import FormBase from '@client/components/form/base.vue'; +import FormGroup from '@client/components/form/group.vue'; +import FormKeyValueView from '@client/components/form/key-value-view.vue'; +import MkLink from '@client/components/link.vue'; +import { physics } from '@client/scripts/physics.ts'; +import * as os from '@client/os'; const patrons = [ 'Satsuki Yanagi', diff --git a/src/client/pages/about.vue b/src/client/pages/about.vue index 6ec74bc962..911fc0bc62 100644 --- a/src/client/pages/about.vue +++ b/src/client/pages/about.vue @@ -41,13 +41,13 @@