Skip to content

Commit

Permalink
fix: Issues with broken build, trying to fix by fixing dependencies a…
Browse files Browse the repository at this point in the history
…nd mistakes in new config code (#116)

* fix: save conversion

* chore(deps): removed svelte dependency

 using vanilla version of jsoneditor instead

* release: v3.2.6-alpha.1

* fix: mistake in save migration code

* release: v3.2.6-alpha.2
  • Loading branch information
liana-p committed Jul 5, 2023
1 parent 8e48c62 commit f90bd3f
Show file tree
Hide file tree
Showing 16 changed files with 90 additions and 403 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## [3.2.6-alpha.2](https://github.com/liana-p/narrat-engine/compare/v3.2.6-alpha.1...v3.2.6-alpha.2) (2023-07-05)


### Bug Fixes

* mistake in save migration code ([6de08af](https://github.com/liana-p/narrat-engine/commit/6de08af8cf83178bbc2447435a11f9daba54b9c2))



## [3.2.6-alpha.1](https://github.com/liana-p/narrat-engine/compare/v3.2.3...v3.2.6-alpha.1) (2023-07-05)


### Bug Fixes

* save conversion ([7abe832](https://github.com/liana-p/narrat-engine/commit/7abe832c2e0680f67d9b70c4789fd4f742d2b852))



## [3.2.3](https://github.com/liana-p/narrat-engine/compare/v3.2.2...v3.2.3) (2023-07-05)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "narrat-monorepo",
"version": "3.2.3",
"version": "3.2.6-alpha.2",
"private": true,
"type": "module",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-narrat-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-narrat-plugin",
"version": "3.2.3",
"version": "3.2.6-alpha.2",
"type": "module",
"description": "A tool to automatically create a narrat plugin",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-narrat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-narrat",
"version": "3.2.3",
"version": "3.2.6-alpha.2",
"type": "module",
"description": "A tool to automatically create a narrat game",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/narrat-2d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "dist/narrat-plugin-counter.es.js",
"module": "dist/narrat-plugin-counter.es.js",
"types": "dist/plugin.d.ts",
"version": "3.2.3",
"version": "3.2.6-alpha.2",
"repository": {
"type": "git",
"url": "[email protected]:liana-p/narrat-engine.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/narrat-plugin-counter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "dist/narrat-plugin-counter.es.js",
"module": "dist/narrat-plugin-counter.es.js",
"types": "dist/plugin.d.ts",
"version": "3.2.3",
"version": "3.2.6-alpha.2",
"repository": {
"type": "git",
"url": "[email protected]:liana-p/narrat-engine.git",
Expand Down
5 changes: 2 additions & 3 deletions packages/narrat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "narrat",
"version": "3.2.3",
"version": "3.2.6-alpha.2",
"description": "narrat narrative engine",
"main": "dist/narrat.umd.js",
"module": "dist/narrat.es.js",
Expand Down Expand Up @@ -67,8 +67,7 @@
"fuse.js": "^6.6.2",
"howler": "^2.2.3",
"js-yaml": "^4.1.0",
"svelte-jsoneditor": "^0.3.58",
"vue3-mq": "^3.0.0"
"vanilla-jsoneditor": "^0.17.8"
},
"devDependencies": {
"@pinia/testing": "^0.0.16",
Expand Down
1 change: 0 additions & 1 deletion packages/narrat/src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export default defineComponent({
$refs: {
dialogContainer: HTMLInputElement,
},
inject: ['mq'],
components: {
DebugMenu,
NotificationToast,
Expand Down
2 changes: 1 addition & 1 deletion packages/narrat/src/components/debug/debug-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ import { getPlayTime, toHHMMSS } from '@/utils/time-helpers';
import { computed, defineComponent } from 'vue';
import Modal from '../utils/modal-window.vue';
import Fuse from 'fuse.js';
import { JSONEditor } from 'svelte-jsoneditor/dist/jsoneditor.js';
import { JSONEditor } from 'vanilla-jsoneditor';
import { Parser } from '@/types/parser';
import { useSkills } from '@/stores/skills';
import { useMain } from '@/stores/main-store';
Expand Down
9 changes: 0 additions & 9 deletions packages/narrat/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'virtual:windi-devtools';

import './css/main.css';

import { Vue3Mq } from 'vue3-mq';
import { createApp } from 'vue';
import GameApp from './app.vue';
import { AppOptions, AppOptionsInput } from './types/app-types';
Expand Down Expand Up @@ -69,14 +68,6 @@ export async function startApp(optionsInput: AppOptionsInput) {
addMenuButtonsFromPlugins();
useStartMenu().addButtonsFromPlugins();
useMain().setOptions(options);
app.use(Vue3Mq, {
breakpoints: {
// default breakpoints - customize this
s: 0,
m: 800,
l: 1200,
},
});
registerBaseCommands(vm);
logManager.setupDebugger(options.debug!);
console.log(
Expand Down
2 changes: 2 additions & 0 deletions packages/narrat/src/types/game-save.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ScreenObjectsStoreSave } from '@/stores/screen-objects-store';
import { VMSave } from '@/stores/vm-store';
import { AchievementsSave } from '@/stores/achievements-store';
import { GameUserSettingsSave } from '@/stores/settings-store';
import { ConfigStoreSave } from '@/stores/config-store';

export interface SaveSlot {
slotType: 'manual' | 'auto';
Expand All @@ -32,6 +33,7 @@ export type GameSave = {
metadata: SaveSlotMetadata;
screenObjects: ScreenObjectsStoreSave;
settings: GameUserSettingsSave;
config: ConfigStoreSave;
};

export type GlobalGameSave = {
Expand Down
4 changes: 0 additions & 4 deletions packages/narrat/src/types/state.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/narrat/src/types/vue3-mq/index.d.ts

This file was deleted.

13 changes: 12 additions & 1 deletion packages/narrat/src/utils/save-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@/types/game-save';
import { error, warning } from './error-handling';
import { randomId } from './randomId';
export const CURRENT_SAVE_VERSION = '2.17.0';
export const CURRENT_SAVE_VERSION = '3.2.3';

export function saveFileName(): string {
return `NARRAT_SAVE_${getConfig().saveFileName}`;
Expand Down Expand Up @@ -99,6 +99,17 @@ function migrateSaveFile(saveFile: SaveFile) {
});
saveFile.version = '2.17.0';
}
if (saveFile.version === '2.17.0') {
saveFile.slots.forEach((slot) => {
if (slot && slot.saveData) {
slot.saveData.config = {
gameCharacter: 'game',
playerCharacter: 'player',
};
}
});
saveFile.version = '3.2.3';
}
}

function createDefaultSaveFile() {
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-narrat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"author": "Liana Pigeot",
"license": "MIT",
"version": "3.2.3",
"version": "3.2.6-alpha.2",
"main": "src/plugin.js",
"scripts": {}
}
Loading

0 comments on commit f90bd3f

Please sign in to comment.