Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
238 commits
Select commit Hold shift + click to select a range
a8d0284
Catch undefined EJS_Runtime as a start error
ethanaobrien Dec 10, 2024
c0ae2e2
Fix default webgl2 option
ethanaobrien Dec 10, 2024
c5645a7
Organize settings menu
ethanaobrien Dec 10, 2024
0f9030c
Fix emulatorjs exit event
ethanaobrien Dec 10, 2024
b865862
Add beta to version number
ethanaobrien Dec 10, 2024
d3fd718
Add ability to ship retroarch.cfg configurable values
ethanaobrien Dec 10, 2024
ad530da
Do not set this.settings[value] until after the initial load
ethanaobrien Dec 10, 2024
b274748
Fix setting settings when game errored
ethanaobrien Dec 12, 2024
627fba2
Add call to mount file systems before loading game assets
ethanaobrien Dec 13, 2024
5d54014
Read state from memory instead of saving to disk
ethanaobrien Dec 14, 2024
b4a06ce
Use this.enableMouseLock
ethanaobrien Dec 14, 2024
e13522e
Add another check on response data
ethanaobrien Dec 15, 2024
b3da327
Fix error when loading ppsspp assets
ethanaobrien Dec 17, 2024
97f5b4b
Redo getCore function
ethanaobrien Dec 20, 2024
cae8e2f
Check if core requires webgl2/threads. Refactor downloadFile function…
ethanaobrien Dec 20, 2024
6fc50e2
Add ability to switch between cores in settings menu
ethanaobrien Dec 21, 2024
60680e7
Add ability to disable or enable threads if sharedarraybuffer is defined
ethanaobrien Dec 21, 2024
65a3aad
psp control scheme
ethanaobrien Dec 21, 2024
39c9ec9
Fix volume slider color in firefox
ethanaobrien Dec 21, 2024
35639bb
Fix SharedArrayBuffer check & video rotation without reload (#923)
allancoding Dec 21, 2024
a4e4aef
Fix detection of method to use to fetch url in downloadFile function
ethanaobrien Dec 21, 2024
8d42d53
Version 4.2.0 changelog
ethanaobrien Dec 21, 2024
cac45c9
Use pinned ejs_version when fetching cores/version
gantoine Dec 21, 2024
6ab560d
remove legacy button (#927)
allancoding Dec 24, 2024
ea19b8d
Emphasize in the console, that fetching the core from the CDN is mean…
ethanaobrien Dec 24, 2024
4798d3b
Merge pull request #924 from gantoine/use-pinned-eja-version-fetch
ethanaobrien Dec 29, 2024
6ee9f55
Move warning for failsafe message
ethanaobrien Dec 29, 2024
3acb06a
Combine game patch,parent,and bios download functions
ethanaobrien Dec 29, 2024
be29680
Always pull from stable for update checks
ethanaobrien Dec 29, 2024
cf4b680
Fix setting/getting core setting
ethanaobrien Dec 29, 2024
4ae4d5c
Get/save core settings based off of the game filename instead of the …
ethanaobrien Dec 29, 2024
27374b5
Fix down input on gamepad
ethanaobrien Jan 4, 2025
0784774
Fix video rotation & add Arcade Core
allancoding Jan 5, 2025
f28ca94
Merge pull request #934 from allancoding/main
ethanaobrien Jan 5, 2025
23e0018
Add Module.getSavExt function
ethanaobrien Jan 5, 2025
f0a7901
Fix syntax
ethanaobrien Jan 5, 2025
fc521d2
Add a call to restart on the exit event
ethanaobrien Jan 5, 2025
b1d6694
Move virtual gamepad to a sub-menu
ethanaobrien Jan 5, 2025
69c826a
Update af-FR.json
t3chnob0y Jan 6, 2025
fbd83f0
Merge pull request #935 from t3chnob0y/main
ethanaobrien Jan 6, 2025
3d8c812
Hide save files buttons if not supported
ethanaobrien Jan 6, 2025
8650617
Check for existance of the generic core before running includes
ethanaobrien Jan 7, 2025
3fbc803
Correct core organization
ethanaobrien Jan 7, 2025
a8dc84b
Write bios/patch/parent files to the same folder as the start filename
ethanaobrien Jan 7, 2025
6f73e63
Fix rar decompression
ethanaobrien Jan 7, 2025
13362ef
4.2.1
ethanaobrien Jan 7, 2025
32c524f
Update translate readme
ethanaobrien Jan 8, 2025
b3c5547
Prioritize gameName for local storage identifier
ethanaobrien Jan 8, 2025
bb51c13
Add missing 4.2.1 change
ethanaobrien Jan 8, 2025
67109a7
update github workflows
allancoding Jan 12, 2025
e9d2681
update docs
allancoding Jan 12, 2025
7d49864
Merge pull request #939 from allancoding/main
ethanaobrien Jan 12, 2025
f483acb
Interpolate background image URL and wrap it in quotes to ensure prop…
kellenmace Feb 10, 2025
06e597e
Merge pull request #949 from kellenmace/bugfix/background-image-paren…
ethanaobrien Feb 10, 2025
a599065
Save default options to this.settings array
ethanaobrien Feb 21, 2025
4904649
Merge pull request #954 from pjft/patch-1
pjft Mar 9, 2025
9f1fafa
Add New Contributors & Update Workflows
allancoding Mar 11, 2025
ff9ea4c
Fix Stable Workflow
allancoding Mar 12, 2025
40323a8
Need to unlink screenshot before saving (#976)
gantoine Mar 28, 2025
c608c3a
Add events for save files being updated
ethanaobrien Mar 31, 2025
b3c1be1
Fix reference error
ethanaobrien Apr 2, 2025
ec42fce
Add hook for save database loaded
ethanaobrien Apr 6, 2025
03cab1d
Add save interval option
ethanaobrien Apr 6, 2025
0ee5cc9
Add ability to hide some, but not all settings
ethanaobrien Apr 6, 2025
8df1acf
Fix up save state interval logic
ethanaobrien Apr 6, 2025
9aab1c5
Add ability to pull system language
ethanaobrien Apr 6, 2025
8b5d605
Correct placement of saveDatabaseLoaded invoke call
ethanaobrien Apr 6, 2025
0b6c5f1
Update ja-JA.json
noel-forester Apr 6, 2025
78a227e
Update ja-JA.json (#982)
ethanaobrien Apr 10, 2025
03be36b
Dropdown for gamepad selection
ethanaobrien Apr 14, 2025
02e2b16
Push by @jurcaalexandrucristian
ethanaobrien Apr 14, 2025
d48118b
Fix gamepadIndex in gamepadEvent function
ethanaobrien Apr 14, 2025
e664481
refactor minify script
allancoding Apr 16, 2025
501d7da
Merge pull request #988 from allancoding/minify
ethanaobrien Apr 21, 2025
8dbf1cf
How to disable the formatter in VSCode (#994)
michael-j-green Apr 22, 2025
bd26e75
Add build script (#989)
allancoding Apr 23, 2025
443a6f8
Correct n64 virtual gamepad mapping
ethanaobrien Apr 28, 2025
e28e350
Update localizations (#987)
allancoding Apr 28, 2025
2dd1a3d
Add context menu and fix virtualGamepad button
allancoding Apr 28, 2025
1b655b9
Enhance toolbar customisation options (#992)
michael-j-green Apr 29, 2025
45cc488
Add update script (#990)
allancoding Apr 29, 2025
19867d4
Revert "Add context menu and fix virtualGamepad button"
ethanaobrien Apr 29, 2025
12ae664
Update af-FR.json (#1000)
t3chnob0y Apr 30, 2025
ebed7ba
Add newline workflow (#1002)
ethanaobrien Apr 30, 2025
6acede6
Add demo autoload (#1004)
allancoding May 2, 2025
3794c08
Update docs & formating (#991)
allancoding May 7, 2025
d1408b4
Change retroarch.cfg path
ethanaobrien May 11, 2025
b8061ea
Add joystickInput for button inputs
ethanaobrien May 12, 2025
908bccd
Cleanup gamepad dropdown
ethanaobrien May 12, 2025
a1efedf
Fix case where 2 gamepads are disconnected at once
ethanaobrien May 12, 2025
f70e897
Remove this.listeners property
ethanaobrien May 13, 2025
1207d0a
Update ko-KO.json (#1015)
SooHyuck May 15, 2025
3081339
Add newline
ethanaobrien May 15, 2025
ce15c9b
Fix key
ethanaobrien May 16, 2025
a1ee816
Virtual Gamepad Fix (#1001)
allancoding May 25, 2025
b4195d9
Mouse Fix & Controls CSS (#1009)
allancoding May 25, 2025
4e97254
pass parent element to module
ethanaobrien May 25, 2025
ae5841e
Append beta to version number
ethanaobrien May 28, 2025
10cc794
Add dosbox
ethanaobrien Jun 4, 2025
e1920c9
Cleanup menubarBehavior option
ethanaobrien Jun 4, 2025
af2e20c
Add ability to toggle direct keyboard input with settings option
ethanaobrien Jun 4, 2025
f8b09fe
Check for beta when fetching from cdn
ethanaobrien Jun 4, 2025
c22e5ff
Redo settings menu scrolling
ethanaobrien Jun 4, 2025
db31a03
Cleanup about menu css
ethanaobrien Jun 4, 2025
0bd9707
Update copyright date
ethanaobrien Jun 4, 2025
ecd96f8
Correct usage of defaultCoreOpts in setupSettingsMenu
ethanaobrien Jun 4, 2025
8a306a7
Fix keyboardInput default option
ethanaobrien Jun 4, 2025
1d8e572
Check core opts for useKeyboard
ethanaobrien Jun 4, 2025
6b050e0
Set ejs_parent_option_div max height to inherit
ethanaobrien Jun 4, 2025
c847c91
Add ability to enable/disable mouse lock
ethanaobrien Jun 4, 2025
acaf525
Fix other popup menus
ethanaobrien Jun 5, 2025
317b254
Fix root settings in options menu
ethanaobrien Jun 5, 2025
bd20ae9
Cleanup consistency with about menu tabs
ethanaobrien Jun 5, 2025
43e9d26
Fix gamepad dropdown text not being centered
ethanaobrien Jun 5, 2025
3b835d5
Properly handle failed save states
ethanaobrien Jun 7, 2025
4d447b8
Don't discard unknown axis indexes
ethanaobrien Jun 7, 2025
9c8ae86
Write settings to the core settings file before loading the core
ethanaobrien Jun 7, 2025
6389dfb
Add option to disable alt key
ethanaobrien Jun 7, 2025
02e6b27
Properly return an empty string
ethanaobrien Jun 7, 2025
7d4f80a
Update af-FR.json (#1025)
t3chnob0y Jun 8, 2025
b5a05d1
Check default options when getting core settings
ethanaobrien Jun 9, 2025
60e6ab3
Cleanup famicom controls
ethanaobrien Jun 9, 2025
977dd04
Resolve #1018
ethanaobrien Jun 9, 2025
48e8adb
Fix const assignment error
ethanaobrien Jun 10, 2025
e3977bc
Fix axis inputs for extra axis
ethanaobrien Jun 10, 2025
0131c16
Rework access of this.settings, don't call simulateInput for keyboard…
ethanaobrien Jun 11, 2025
b811a84
Add missing translation file
ethanaobrien Jun 14, 2025
a796c4a
4.2.2
ethanaobrien Jun 14, 2025
88d4a05
Capture Overhaul (#1011)
allancoding Jun 18, 2025
75ff025
Resolve issue with invalid button names (#1035)
michael-j-green Jun 25, 2025
cfe6ada
Fix Error Screen (#1005)
allancoding Jun 25, 2025
84a1fc1
Localization and logging fix (#1038)
incredibleIdea Jul 3, 2025
b0601b6
Remove canvas resize call as this is now handled by the backend
ethanaobrien Jul 3, 2025
505f11b
Style: replace some string concatenation with template literal (#1040)
incredibleIdea Jul 5, 2025
c7d6a49
Playing with canvas sizes
ethanaobrien Jul 5, 2025
f679b26
Add sizes to parent element
ethanaobrien Jul 5, 2025
e150dc0
4.2.3
ethanaobrien Jul 5, 2025
6161d7f
Update Project Scripts
allancoding Jul 6, 2025
820a9fa
fix adding newlines after updating dependencies
allancoding Jul 7, 2025
8a7088a
Update af-FR.json (#1043)
t3chnob0y Jul 7, 2025
e77610e
Fix for broken custom buttons (#1042)
michael-j-green Jul 7, 2025
2052d68
Language Revamp (#1036)
allancoding Jul 7, 2025
4c161ab
Update ko.json (#1044)
UzuCore Jul 8, 2025
0f9954a
Fix for context menu (#1045)
michael-j-green Jul 13, 2025
756990b
Redo saves
ethanaobrien Aug 7, 2025
55fbd5e
Update ja.json (#1058)
Aug 16, 2025
5bf1787
handle subfolders in path (#1059)
daguile Aug 16, 2025
b5a719b
Add jsdoc comments to compression.js (#1062)
gantoine Aug 17, 2025
a0f4db7
fix silly error (#1063)
daguile Aug 18, 2025
e4feb3c
Improve multi-disc handling for dosbox-pure (#1064)
daguile Aug 20, 2025
23337cf
Added netplay over WebRTC (#1053)
S-Coding23 Aug 24, 2025
7197fc9
Network errors should be thrown
ethanaobrien Aug 27, 2025
ceeecf2
Remove Matrix server invitation
allancoding Aug 29, 2025
ce7472d
test workflows
allancoding Aug 31, 2025
ad9586d
Fix screenshot return in EJS_onSaveState (#1092)
michael-j-green Sep 16, 2025
5a60623
fix loadExternalFilesFixed a bug in the `loadExternalFiles` function …
lxyongit Sep 17, 2025
21726dc
Add/Update SVG logos (#1078)
milktoastrat Sep 17, 2025
ca6c0a9
Add event for when a game save is updated (#1094)
cryptonaus Sep 18, 2025
8eab8f6
Support a fixed save flushing interval (#1095)
cryptonaus Sep 18, 2025
8184ba8
Change some of the contents of ja.json (#1102)
paln21 Oct 7, 2025
46520de
Refactor checkCompression to use async operations with IndexedDB cach…
michael-j-green Oct 12, 2025
957cc87
Handle errors in hashData to disable caching on failure
michael-j-green Oct 12, 2025
54d7dfb
Improve ROM loading UX (#1105)
298A-E9E3 Oct 13, 2025
c0480f8
beforeunload event listener update (#1107)
duanyu5871 Oct 16, 2025
91e8d6b
Add bsnes/genesisplusgxwide
ethanaobrien Oct 19, 2025
18e3a4c
Redo start name detection
ethanaobrien Oct 19, 2025
8c750dd
Add beta bootup batch file
ethanaobrien Oct 20, 2025
5fdaaff
Fix Issue #1112 (PSX Control Labels Are Incorrect) (#1115)
joethun Oct 20, 2025
dfe9498
Fix Issue #1039 (Save state text is inconsistent) (#1116)
joethun Oct 20, 2025
9aa8fbc
Implement caching system with IndexedDB support and add getAll method…
michael-j-green Oct 30, 2025
98ff7a1
Added missing newlines at the ends of new files.
michael-j-green Oct 30, 2025
cf8e15b
Added automatic core detection for Sega Mega Drive games (#1123)
298A-E9E3 Oct 31, 2025
5680535
Fix Sega Genesis control scheme (#1124) (#1125)
mikhailv Oct 31, 2025
6310e25
Enable debug logging and move documentation
michael-j-green Nov 19, 2025
b80b287
Seperated cache blob storage from metadata to optimise memory usage
michael-j-green Nov 20, 2025
c13bd53
Remove test ROM cache HTML file to streamline project structure
michael-j-green Nov 20, 2025
2a6d65f
Undo VSCode's aggressive reformatting
michael-j-green Nov 20, 2025
77a3ff9
Add utility functions for hashing and integrate into cache management
michael-j-green Nov 20, 2025
27ebcb5
Fix missing newline at end of file in utils.js
michael-j-green Nov 20, 2025
e74fb40
Add cache configuration options to configure caching behavior
michael-j-green Nov 20, 2025
cbb7228
Implement startup cleanup for cache retrieval in EJS_Cache
michael-j-green Nov 20, 2025
d47a9ae
Remove cache cleanup timeout in favour of cleaning on first pull from…
michael-j-green Nov 20, 2025
cdbb6a2
Refactor EJS_STORAGE methods to simplify database calls
michael-j-green Nov 21, 2025
56bb003
Refactor EJS_Cache to store all cache data in a single database, but …
michael-j-green Nov 21, 2025
406b2ed
Enhance EJS_STORAGE and EJS_Cache to support optional indexing for im…
michael-j-green Nov 22, 2025
146f6e3
Implement EJS_Download class for enhanced file downloading and cachin…
michael-j-green Nov 22, 2025
fe769bb
Initialize EJS_Cache instance in EJS_Download for improved caching ma…
michael-j-green Dec 15, 2025
4fafc76
Refactor file download handling in EmulatorJS and EJSCompression
michael-j-green Dec 15, 2025
f01f10b
Merge branch 'main' into fail-early-when-core-requirements-not-met
michael-j-green Dec 15, 2025
41d5f94
Enhance file download handling and caching logic in EJS_GameManager a…
michael-j-green Dec 16, 2025
d587c20
Refactor code structure for improved readability and maintainability
michael-j-green Dec 16, 2025
e2703b4
Refactor code structure for improved readability and maintainability
michael-j-green Dec 17, 2025
d6b6952
Remove accidentally included ROM file that was used for testing.
michael-j-green Dec 17, 2025
5ff7245
Remove legacy download methods
michael-j-green Dec 17, 2025
a82665e
Small logging update
michael-j-green Dec 17, 2025
7e59f78
Minor updates
michael-j-green Dec 17, 2025
d74a11a
Added missing trailing newline
michael-j-green Dec 17, 2025
478a384
Removed unneeded platforms
michael-j-green Dec 17, 2025
d81fd3c
Add ESLint configuration and related files; update .gitignore and pac…
michael-j-green Dec 17, 2025
3ab9763
Update ESLint workflow to use npm install and ensure newline at end o…
michael-j-green Dec 17, 2025
200fa5a
Refactor storage methods to public access and enhance HTML structure
michael-j-green Dec 17, 2025
21b83ca
Refactor scripts to meet ES2020 compliance.
michael-j-green Dec 17, 2025
780ad31
fix(deps): update @node-minify packages to v10.1.1 (#1150)
zenpower Jan 3, 2026
ae9cd11
Add intv
ethanaobrien Jan 4, 2026
b440392
Update dependencies and fix minify script
ethanaobrien Jan 4, 2026
d9909fe
Add directory listing method and enhance configuration handling
michael-j-green Jan 5, 2026
60baa72
- added support for autofire for all controls
zees-dev Jan 17, 2026
b18b855
localisation
zees-dev Jan 17, 2026
3d82485
Validate Content-Length header before parsing in EJS_Download class
michael-j-green Jan 17, 2026
8cf9114
Optimize data concatenation in EJS_Download by using Blob to reduce i…
michael-j-green Jan 17, 2026
9408a61
Refactor progress event handlers to use arrow functions for consistency
michael-j-green Jan 17, 2026
2abe524
Enhance EJS_Download to handle non-http(s) URLs and delegate URL-base…
michael-j-green Jan 17, 2026
a0035ee
Refactor downloadFiles method to improve structure and clarity by sep…
michael-j-green Jan 17, 2026
5a0d576
Merge remote-tracking branch 'origin/main' into fail-early-when-core-…
michael-j-green Jan 17, 2026
20de927
Update data/src/cache.js
michael-j-green Jan 17, 2026
e85c0da
Update data/src/cache.js
michael-j-green Jan 17, 2026
b6e190d
Update index.html
michael-j-green Jan 17, 2026
6270742
Update build.js
michael-j-green Jan 17, 2026
e90f286
spread syntax improvement
zees-dev Jan 17, 2026
b3d486c
combine similar if/else blocks for keyboard autofire
zees-dev Jan 17, 2026
815e446
move autofire interval to settings menu
zees-dev Jan 17, 2026
67351a5
handle initial input normally, then check autofire
zees-dev Jan 17, 2026
91dcb94
check emulation state inside autofire interval
zees-dev Jan 17, 2026
90fec70
minor fixes/updates to autu fire interval
zees-dev Jan 17, 2026
004ec35
removed default fire interval from global config
zees-dev Jan 17, 2026
22f5187
bugfix: use persisted autofire interval upon reload
zees-dev Jan 17, 2026
531a605
Remove useless comment
michael-j-green Jan 17, 2026
e55b149
Remove redundant downloadGameFiles method by moving it's content to d…
michael-j-green Jan 18, 2026
50cb990
Fix nightly folder
ethanaobrien Feb 2, 2026
f6c3b6c
Refactor cache configuration initialization to ensure defaults are se…
michael-j-green Feb 15, 2026
be3bee3
Add advanced options for cache configuration in the UI
michael-j-green Feb 15, 2026
20d48e1
Add directory skipping logic in listDir to avoid system paths
michael-j-green Feb 16, 2026
c7cc100
Remove call to command.exe
ethanaobrien Feb 20, 2026
bb7b21e
Switch these things
ethanaobrien Feb 20, 2026
20b1c21
chore: adding khmer support translation (#1172)
Novsochetra Feb 25, 2026
0199b46
Update Turkish Translation (#1171)
Notenlish Feb 25, 2026
9cd9749
Merge pull request #1106 from EmulatorJS/fail-early-when-core-require…
ethanaobrien Feb 27, 2026
45d8bc6
Merge pull request #1161 from zees-dev/feat/controls-autofire-support
ethanaobrien Feb 27, 2026
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
text=auto eol=lf
26 changes: 26 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: ESLint

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
eslint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run ESLint
run: npx eslint .
30 changes: 27 additions & 3 deletions .github/workflows/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,32 @@ jobs:
runs-on: emulatorjs-server
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run Script
uses: actions/checkout@v4
- name: Set Permissions
run: |
cd /mnt/HDD/public
./.latest.sh
chmod -R 775 .EmulatorJS/
- name: Update Latest
run: |
cd /mnt/HDD/public/.EmulatorJS/
git fetch --all
git reset --hard origin/main
git pull
- name: Minify Files
run: |
cd /mnt/HDD/public/.EmulatorJS/
npm i
npm run minify
- name: Zip Minified Files
run: |
cd /mnt/HDD/public/.EmulatorJS/data/
zip emulator.min.zip emulator.min.js emulator.min.css
- name: Clean Up Minify
run: |
cd /mnt/HDD/public/.EmulatorJS/
rm -f "minify/package-lock.json"
rm -rf "minify/node_modules/" "./node_modules"
- name: Copy to nightly folder
run: |
cd /mnt/HDD/public/
rsync -auv --exclude .EmulatorJS/data/cores/ .EmulatorJS/ nightly/
42 changes: 42 additions & 0 deletions .github/workflows/newlines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Check for Newline at End of Files

on:
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
check-newlines:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Check for missing newlines
run: |
files=$(git ls-files)

newline_error=0

for file in $files; do
if file --mime "$file" | grep -q "binary"; then
#echo "Skipping binary file: $file"
continue
fi

last_char=$(tail -c 1 "$file" | xxd -p)
if [[ "$last_char" != "0a" ]]; then
echo "File $file does not end with a newline!"
newline_error=1
fi
done

if [[ $newline_error -eq 1 ]]; then
echo "One or more files do not end with a newline."
exit 1
else
echo "All files end with a newline."
fi
53 changes: 50 additions & 3 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,59 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Get latest release tag (if workflow_dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
LATEST_TAG=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name')
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
- name: Download cores
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_NAME=${{ github.event.release.tag_name || env.LATEST_TAG }}
TRIMMED_TAG=${TAG_NAME#v}
echo "TRIMMED_TAG=$TRIMMED_TAG" >> $GITHUB_ENV
gh release download "$TAG_NAME" \
--repo ${{ github.repository }} \
--pattern "$TRIMMED_TAG.7z"
- name: Extract cores
run: |
7z x -y "$TRIMMED_TAG.7z" "data/cores/*" -o./
rm "$TRIMMED_TAG.7z"
- run: npm i
- run: npm ci
- run: npm publish --access public
- name: Make @emulatorjs/emulatorjs
run: |
node build.js --npm=emulatorjs
npm ci
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get cores list
run: |
echo "CORES=$(node build.js --npm=get-cores | jq -r '. | join(" ")')" >> $GITHUB_ENV
- name: Setup cores
run: |
node build.js --npm=cores
- name: Publish each core
run: |
cd data/cores
for core in $CORES; do
echo "Processing core: $core"
cd $core
npm publish --access public
cd ..
done
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Make @emulatorjs/cores
run: |
cd data/cores
npm i
npm ci
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
57 changes: 54 additions & 3 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,59 @@ jobs:
runs-on: emulatorjs-server
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run Script
uses: actions/checkout@v4
- name: Set Variables
run: |
cd /mnt/HDD/public/
wget -q "https://api.github.com/repos/EmulatorJS/EmulatorJS/releases/latest" -O .tmp.json
version=$(jq -r '.tag_name' .tmp.json)
download_url=$(jq -r '.assets[0].browser_download_url' .tmp.json)
name=$(jq -r '.assets[0].name' .tmp.json)
old_version=$(jq -r '.github' versions.json)
v_version="$version"
if [[ $version == v* ]]; then
version="${version:1}"
fi
rm .tmp.json
echo "VERSION=$version" >> $GITHUB_ENV
echo "DOWNLOAD_URL=$download_url" >> $GITHUB_ENV
echo "NAME=$name" >> $GITHUB_ENV
echo "OLD_VERSION=$old_version" >> $GITHUB_ENV
echo "V_VERSION=$v_version" >> $GITHUB_ENV
- name: Download Stable
run: |
cd /mnt/HDD/public/
mkdir -p ".stable"
wget -q "$DOWNLOAD_URL" -O ".stable/$NAME"
- name: Extract Stable
run: |
cd /mnt/HDD/public/.stable/
7z x "$NAME"
- name: Move Versions
run: |
cd /mnt/HDD/public/
mv ".stable/$NAME" releases/
mv "$OLD_VERSION" "$VERSION"
mv stable "$OLD_VERSION"
mv .stable stable
jq --arg version "$VERSION" '.github = $version' versions.json | sponge versions.json
- name: Set Permissions
run: |
cd /mnt/HDD/public
./.stable.sh
chmod -R 775 stable/
- name: Update Stable Cores
run: |
rsync -a --delete /mnt/HDD/public/stable/data/cores/ /mnt/HDD/public/.EmulatorJS/data/cores/
- name: Zip Stable
run: |
cd /mnt/HDD/public/stable/data/
zip emulator.min.zip emulator.min.js emulator.min.css
- name: Update Version
run: |
cd /mnt/HDD/public/
jq --arg old_version "$OLD_VERSION" '.versions += {($old_version): ($old_version + "/")}' versions.json | sponge versions.json
- name: Clean Up
run: |
cd /mnt/HDD/public/
rm -f "$OLD_VERSION/data/emulator.min.zip"
rm -rf "$OLD_VERSION/node_modules/"
18 changes: 13 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
**/node_modules/
*.db
data/minify/package-lock.json
node_modules/
package-lock.json
yarn.lock
roms/
data/emulator.min.js
data/emulator.min.css
data/cores
data/cores/*
!data/cores/README.md
!data/cores/core-README.md
!data/cores/package.json
!data/cores/.npmignore
.DS_Store
.vscode/*
.hintrc
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
*.tgz
dist/
jsdoc/
16 changes: 16 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.git
dist/
node_modules/
package-lock.json
.github/
*.tgz
update.js
build.js
data/localization/translate.html
data/cores/*
!data/cores/README.md
!data/cores/package.json
minify/
.npmignore
.gitignore
roms/
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"diffEditor.ignoreTrimWhitespace": false,
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"editor.formatOnSaveMode": "modifications",
"eslint.enable": true,
"eslint.lintTask.enable": true
}
Loading