diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index b099d44..0000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * ESLint configuration.
- *
- * This config was last revised for ESLint v7
- *
- * Rules: https://eslint.org/docs/rules/
- */
-module.exports = {
- env: {
- // Browser global variables.
- browser: true,
- // Es2017 JS syntax
- es2017: true,
- },
- /*
- * Prettier must be the last item in extends.
- * It uses the npm package eslint-config-prettier.
- * https://github.com/prettier/eslint-config-prettier
- *
- * No other plugins or addons are required, instead in VSCode,
- * simply enable the Prettier and ESLint extensions.
- */
- extends: [`eslint:recommended`, `prettier`],
- // global variables
- globals: {
- module: `readonly`,
- BrowserFS: `readonly`,
- DOSee: `readonly`,
- DoseeLoader: `readonly`,
- Emulator: `readonly`,
- FileSaver: `readonly`,
- FS: `readonly`,
- Module: true,
- },
- parserOptions: {
- ecmaVersion: 2017,
- },
- rules: {
- "no-unused-vars": [`error`, { vars: `local` }],
- // Possible errors
- "no-template-curly-in-string": `error`,
- "no-unreachable-loop": `error`,
- //"no-unsafe-optional-chaining": `error`,
- // Best practices
- "array-callback-return": `error`,
- "block-scoped-var": `error`,
- //"consistent-return": `error`,
- "default-case": `error`,
- "default-case-last": `error`,
- eqeqeq: [`error`, `smart`],
- //"no-alert": `error`,
- "no-else-return": `error`,
- "no-empty-function": [`error`],
- "no-eval": `error`,
- "no-extend-native": `error`,
- "no-extra-bind": `error`,
- "no-extra-label": `error`,
- "no-floating-decimal": `error`,
- "no-implicit-coercion": `error`,
- "no-implicit-globals": `error`,
- "no-implied-eval": `error`,
- "no-invalid-this": `error`,
- "no-iterator": `error`,
- "no-labels": `error`,
- "no-lone-blocks": `error`,
- "no-loop-func": `error`,
- "no-magic-numbers": [
- `error`,
- { ignore: [0, 1, 2], ignoreArrayIndexes: true },
- ],
- "no-multi-spaces": `error`,
- "no-multi-str": `error`,
- "no-new": `error`,
- "no-new-func": `error`,
- "no-new-wrappers": `error`,
- //"no-nonoctal-decimal-escape": `error`,
- "no-octal": `error`,
- "no-octal-escape": `error`,
- "no-param-reassign": `error`,
- "no-proto": `error`,
- "no-return-assign": `error`,
- "no-return-await": `error`,
- "no-script-url": `error`,
- "no-self-compare": `error`,
- "no-sequences": `error`,
- "no-throw-literal": `error`,
- "no-unmodified-loop-condition": `error`,
- "no-useless-call": `error`,
- "no-useless-concat": `error`,
- "no-useless-return": `error`,
- "no-void": `error`,
- "no-warning-comments": `error`,
- "prefer-promise-reject-errors": `error`,
- "require-await": `error`,
- "vars-on-top": `error`,
- yoda: [`error`, `never`],
- // Strict mode
- strict: `error`,
- // Variables
- //"init-declarations": [`error`, `never`, { ignoreForLoopInit: true }],
- "no-label-var": `error`,
- "no-shadow": `error`,
- "no-undef-init": `error`,
- "no-undefined": `error`,
- //"no-use-before-define": `error`,
- // Stylistic issues
- camelcase: `error`,
- "new-cap": `error`,
- "no-array-constructor": `error`,
- "no-inline-comments": `error`,
- "no-lonely-if": `error`,
- "no-multi-assign": `error`,
- "no-negated-condition": `error`,
- "no-nested-ternary": `error`,
- "no-new-object": `error`,
- "no-tabs": [`error`, { allowIndentationTabs: true }],
- quotes: [`error`, `backtick`],
- "unicode-bom": [`error`, `never`],
- // ES2015
- "no-confusing-arrow": `error`,
- "no-duplicate-imports": `error`,
- "no-useless-computed-key": `error`,
- "no-useless-constructor": `error`,
- "no-var": `error`,
- "object-shorthand": `error`,
- "prefer-const": `error`,
- "prefer-rest-params": `error`,
- "prefer-spread": `error`,
- "prefer-template": `error`,
- "symbol-description": `error`,
- "template-curly-spacing": `error`,
- },
-};
diff --git a/.gitignore b/.gitignore
index fe62d17..f1f1ae7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,11 +2,13 @@ node_modules
.yarn
.yarnrc.yml
package-lock.json
+pnpm-lock.yaml
yarn.lock
# Hide dependencies
-build
-pub
+build/
+pub/
+tmp/
# Packs
*.tgz
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 2e3f7dc..f993589 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,4 +1,3 @@
{
- "eslint.alwaysShowStatus": true,
"editor.formatOnSave": true
}
diff --git a/docs/CHANGES.md b/docs/CHANGES.md
index 4aaded4..ad42bc3 100644
--- a/docs/CHANGES.md
+++ b/docs/CHANGES.md
@@ -2,6 +2,12 @@
## Changes and updates
+### v1.8.5
+
+- Minor update to fix internal path issues, DOSee should work with subdirectories now.
+- Removed yarn installation requirements.
+- Updated ESLint to v9.
+
### v1.8.0
- Fixed DOSee incorrectly interpreting backslashes as new commands,
diff --git a/docs/README.md b/docs/README.md
index 19f95af..d0df2f8 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -15,6 +15,8 @@ DOSee is a front-end for an [MS-DOS](https://en.wikipedia.org/wiki/MS-DOS) emula
DOSee is only a user interface and installation process for an incredible emulation ecosystem. Many remarkable people created it over many years. DOSee itself is a fork of [The Emularity](https://github.com/db48x/emularity) project started by the Internet Archive. [EM-DOSBox](https://github.com/dreamlayers/em-dosbox/), the core of this emulation, is a JavaScript port of [DOSBox](https://www.dosbox.com), the world's most popular MS-DOS emulator.
+---
+
![DOSee preview](../src/images/preview.png)
### What's new
@@ -23,45 +25,34 @@ DOSee is only a user interface and installation process for an incredible emulat
### Requirements
-- A web browser that supports JavaScript ES6 (ECMAScript 2015).
- Current Firefox, Chrome, Edge, Brave or Safari will work fine.
+- A web browser that supports service workers.
+ Current Chrome, Edge, Safari, or Firefox will work fine.
- A physical keyboard, as MS-DOS is a text-based operating system.
-- [Node.js](https://nodejs.org) plus [yarn](https://yarnpkg.com)/[npm](https://www.npmjs.com) or [Docker](https://www.docker.com/get-started)
+- [Node.js](https://nodejs.org) or [Docker](https://www.docker.com/get-started)
**DOSee runs over an HTTP server**, and it can not function over the `file:///` browser protocol.
-### Instructions, _download, build and serve_
+## Instructions, _download, build and serve_
DOSee requires a build before it can serve to a web browser.
```bash
# clone DOSee
-git clone https://github.com/bengarrett/DOSee.git
+git clone git@github.com:bengarrett/DOSee.git
cd DOSee
# install dependencies & build
-yarn # npm install
+npm install # (or the equivalent in another package manager)
# serve DOSee over port 8086
-yarn run serve # npm run serve
-```
-
-Point a web browser to http://localhost:8086
-
-### Docker instructions
-
-There is an [image at Docker Hub](https://hub.docker.com/r/bengarrett/dosee).
-```bash
-docker run --name dosee_app -i -p 8086:80 bengarrett/dosee
+npm run serve
```
Point a web browser to http://localhost:8086
-### Usage & customisations
-
[Are in the USAGE document](USAGE.md)
-### Editing the source JS or HTML
+## Editing the source JS or HTML
If you edit the source files in `src/` you will need to rebuild the application.
@@ -70,10 +61,10 @@ If you edit the source files in `src/` you will need to rebuild the application.
cd DOSee
# re-build DOSee using your edits
-yarn run install # npm run install
+npm run install
# serve the modified DOSee over port 8086
-yarn run serve # npm run serve
+npm run serve
```
Point a web browser to http://localhost:8086
diff --git a/eslint.config.mjs b/eslint.config.mjs
new file mode 100644
index 0000000..76cfa3d
--- /dev/null
+++ b/eslint.config.mjs
@@ -0,0 +1,92 @@
+// eslint.config.mjs
+// ESLint v9 flat configuration for JavaScript and JavaScript modules.
+import globals from "globals";
+import js from "@eslint/js";
+
+export default [
+ {
+ ignores: ["build/**", "src/emulator/**", "workbox-config.js"],
+ },
+ js.configs.recommended,
+ {
+ files: ["src/**/*.js"],
+ languageOptions: {
+ ecmaVersion: "latest",
+ parserOptions: {
+ ecmaFeatures: {
+ impliedStrict: true,
+ },
+ },
+ globals: {
+ ...globals.browser,
+ BrowserFS: "readonly",
+ DOSee: "readonly",
+ DoseeLoader: "readonly",
+ Emulator: "readonly",
+ FileSaver: "readonly",
+ FS: "writable",
+ Module: "writable",
+ },
+ },
+ linterOptions: {
+ noInlineConfig: false,
+ reportUnusedDisableDirectives: "error",
+ },
+ rules: {
+ "no-useless-assignment": "error",
+ "require-atomic-updates": "error",
+ "accessor-pairs": "warn",
+ "symbol-description": "warn",
+ "no-eval": "error",
+ "no-empty-function": "warn",
+ "no-empty": "warn",
+ "no-else-return": "warn",
+ "no-bitwise": "warn",
+ "no-var": "warn",
+ "no-undefined": "warn",
+ "no-undef-init": "warn",
+ "no-useless-constructor": "warn",
+ "no-useless-concat": "warn",
+ "no-useless-computed-key": "warn",
+ "no-unneeded-ternary": "warn",
+ "prefer-template": "warn",
+ "prefer-spread": "warn",
+ "prefer-rest-params": "warn",
+ "prefer-const": "warn",
+ "prefer-arrow-callback": "warn",
+ "operator-assignment": "warn",
+ "no-throw-literal": "warn",
+ "no-script-url": "warn",
+ "no-return-assign": "warn",
+ "no-proto": "warn",
+ "no-param-reassign": "warn",
+ "no-octal-escape": "warn",
+ "no-object-constructor": "warn",
+ "no-new-wrappers": "warn",
+ "no-new-func": "warn",
+ "no-new": "warn",
+ "no-nested-ternary": "warn",
+ "no-negated-condition": "warn",
+ "no-multi-assign": "warn",
+ "no-magic-numbers": [
+ "warn",
+ {
+ ignore: [-1, 0, 1, 2],
+ ignoreArrayIndexes: true,
+ ignoreDefaultValues: true,
+ ignoreClassFieldInitialValues: true,
+ enforceConst: true,
+ },
+ ],
+ "no-loop-func": "warn",
+ "no-lonely-if": "warn",
+ "no-implied-eval": "warn",
+ "no-implicit-globals": "warn",
+ "no-implicit-coercion": "warn",
+ "default-case-last": "warn",
+ "dot-notation": "warn",
+ eqeqeq: "warn",
+ "no-extend-native": "error",
+ },
+ },
+];
diff --git a/package.json b/package.json
index 4f6bfaa..0f53670 100644
--- a/package.json
+++ b/package.json
@@ -5,21 +5,22 @@
"email": "code.by.ben@gmail.com"
},
"dependencies": {
- "browserfs": "1.4.x",
- "browserfs-zipfs-extras": "1.0.x",
- "canvas-toBlob": "1.0.x",
- "copyfiles": "2.x",
+ "browserfs": "1.4.3",
+ "browserfs-zipfs-extras": "1.0.1",
+ "canvas-toBlob": "1.0.0",
+ "copyfiles": "~2.4.1",
"file-saver-fixed": "1.3.8",
- "http-server": "x",
- "mini.css": "3.x",
- "workbox-cli": "6.x"
+ "globals": "^15.3.0",
+ "http-server": "^14.1.1",
+ "mini.css": "~3.0.1",
+ "workbox-cli": "~6.6.0"
},
"description": "A DOSBox-based MS-DOS emulator for the web",
"devDependencies": {
- "eslint": "x",
- "eslint-config-prettier": "x",
- "htmlhint": "x",
- "prettier": "x"
+ "eslint": "^9.3.0",
+ "eslint-config-prettier": "^9.1.0",
+ "htmlhint": "^1.1.4",
+ "prettier": "^3.2.5"
},
"homepage": "https://github.com/bengarrett/DOSee",
"funding": {
@@ -34,11 +35,10 @@
"url": "git+https://github.com/bengarrett/DOSee.git"
},
"scripts": {
- "copy": "npx copyfiles -u 1 src/**/**/* src/**/* src/* build && npx copyup -f node_modules/workbox-sw/build/workbox-sw.js build/js && npx copyup -f node_modules/mini.css/dist/mini-default.min.css build/css && npx copyup -f node_modules/browserfs/dist/browserfs.min.js node_modules/browserfs-zipfs-extras/dist/browserfs-zipfs-extras.js node_modules/file-saver-fixed/dist/FileSaver.min.js node_modules/canvas-toBlob/canvas-toBlob.js build/js",
- "install": "npm run copy && npx workbox injectManifest workbox-config.js",
- "serve": "npx http-server build -p 8086",
+ "copy": "npx copyfiles -u 1 src/**/**/* src/**/* src/* build && npx copyup -f tmp/workbox-v6.6.0/workbox-sw.js build/js && npx copyup -f node_modules/mini.css/dist/mini-default.min.css build/css && npx copyup -f node_modules/browserfs/dist/browserfs.min.js node_modules/browserfs-zipfs-extras/dist/browserfs-zipfs-extras.js node_modules/file-saver-fixed/dist/FileSaver.min.js node_modules/canvas-toBlob/canvas-toBlob.js build/js",
+ "install": "npx workbox-cli copyLibraries tmp && npm run copy && npx workbox injectManifest workbox-config.js",
+ "serve": "npx http-server build --port 8086",
"test": "echo \"Error: no test specified\" && exit 1"
},
- "version": "1.8.0",
- "packageManager": "yarn@3.2.0"
-}
+ "version": "1.8.5"
+}
\ No newline at end of file
diff --git a/src/index.html b/src/index.html
index c978e59..9de1328 100644
--- a/src/index.html
+++ b/src/index.html
@@ -10,8 +10,8 @@
-
-
+
+
@@ -240,9 +240,9 @@
✱ 1987, Tandy 1000 ✱ 1990, EGA+AdLib ✱ 1994, Gravis - UltraSound ✱ 1996, VGA+AdLib
+✱ 1987, Tandy 1000 ✱ 1990, EGA+AdLib ✱ 1994, Gravis + UltraSound ✱ 1996, VGA+AdLib