Skip to content

Commit

Permalink
refactor: GNOME 45 port
Browse files Browse the repository at this point in the history
  • Loading branch information
ronanru authored Oct 12, 2023
1 parent b5accce commit 5b7afc6
Show file tree
Hide file tree
Showing 50 changed files with 3,089 additions and 2,942 deletions.
7 changes: 1 addition & 6 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
"uuid": "[email protected]",
"settings-schema": "org.gnome.shell.extensions.pop-shell",
"shell-version": [
"3.36",
"40",
"41",
"42",
"43",
"44"
"45"
]
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
13 changes: 7 additions & 6 deletions scripts/transpile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ pwd=$(pwd)

# In goes standard JS. Out comes GJS-compatible JS
transpile() {
cat "${src}" | sed -e 's#export function#function#g' \
-e 's#export var#var#g' \
-e 's#export const#var#g' \
-e 's#Object.defineProperty(exports, "__esModule", { value: true });#var exports = {};#g' \
| sed -E 's/export class (\w+)/var \1 = class \1/g' \
| sed -E "s/import \* as (\w+) from '(\w+)'/const \1 = Me.imports.\2/g" > "${dest}"
cp "${src}" "${dest}"
# cat "${src}" | sed -e 's#export function#function#g' \
# -e 's#export var#var#g' \
# -e 's#export const#var#g' \
# -e 's#Object.defineProperty(exports, "__esModule", { value: true });#var exports = {};#g' \
# | sed -E 's/export class (\w+)/var \1 = class \1/g' \
# | sed -E "s/import \* as (\w+) from '(\w+)'/const \1 = Me.imports.\2/g" > "${dest}"
}

rm -rf _build
Expand Down
4 changes: 2 additions & 2 deletions src/arena.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export class Arena<T> {
private slots: Array<null | T> = new Array();

private unused: Array<number> = new Array()
private unused: Array<number> = new Array();

truncate(n: number) {
this.slots.splice(n);
Expand Down Expand Up @@ -35,7 +35,7 @@ export class Arena<T> {
return v;
}

* values(): IterableIterator<T> {
*values(): IterableIterator<T> {
for (const v of this.slots) {
if (v !== null) yield v;
}
Expand Down
Loading

0 comments on commit 5b7afc6

Please sign in to comment.