Skip to content

Commit

Permalink
Cleanup type generation configs
Browse files Browse the repository at this point in the history
  • Loading branch information
JumpLink committed Feb 25, 2024
1 parent 34805ee commit 1995beb
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 97 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ jobs:
run: sudo apt-get --yes install build-essential gobject-introspection libgirepository1.0-dev libcairo2 libcairo2-dev
- run: yarn install
- run: yarn run build
- run: NODE_OPTIONS=--max_old_space_size=9216 yarn run build:types:all
- run: NODE_OPTIONS=--max_old_space_size=9216 yarn run validate:types:all
- run: NODE_OPTIONS=--max_old_space_size=9216 yarn run build:types:local
- run: NODE_OPTIONS=--max_old_space_size=9216 yarn run validate:types:local
5 changes: 4 additions & 1 deletion .ts-for-gir.all.rc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ export default {
ignore: [
'Colorhug-1.0', // Duplicate of ColorHug-1.0
'GUPnP-DLNA-1.0', // Same namespace as GUPnP-1.0.gir, is this a bug or should we merge the type definitions?
]
'GstBase-1.0', // Unable to resolve type: BaseSink from GstBase in ClutterGst 1.0
'ClutterGst-1.0', // Depends on GstBase-1.0
'GstAudio-0.10', // Depends on GstBase-1.0
],
}
6 changes: 0 additions & 6 deletions .ts-for-gir.gcalc.rc.js

This file was deleted.

8 changes: 0 additions & 8 deletions .ts-for-gir.gio.rc.js

This file was deleted.

5 changes: 0 additions & 5 deletions .ts-for-gir.gtk2.rc.js

This file was deleted.

6 changes: 0 additions & 6 deletions .ts-for-gir.gtk3+gtk4.rc.js

This file was deleted.

5 changes: 0 additions & 5 deletions .ts-for-gir.gtk3.rc.js

This file was deleted.

6 changes: 3 additions & 3 deletions .ts-for-gir.gtk4.rc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import allLocalConfig from './.ts-for-gir.all.rc.js';

export default {
...allLocalConfig,
modules: ['Gtk-4.0', 'Adw-1.0'],
girDirectories: ['./vala-girs/gir-1.0'],
ignore: [],
ignoreVersionConflicts: true,
}
5 changes: 0 additions & 5 deletions .ts-for-gir.modemmanager1.rc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .ts-for-gir.packages-all.rc.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export default {
ignore: [
'Colorhug-1.0', // Duplicate of ColorHug-1.0
'GUPnP-DLNA-1.0', // Same namespace as GUPnP-1.0.gir, is this a bug or should we merge the type definitions?
'GstBase-1.0', // Unable to resolve type: BaseSink from GstBase in ClutterGst 1.0
'ClutterGst-1.0', // Depends on GstBase-1.0
'GstAudio-0.10', // Depends on GstBase-1.0
],
ignoreVersionConflicts: true,
promisify: true,
Expand Down
2 changes: 1 addition & 1 deletion .ts-for-gir.packages-gtk4.rc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import allPackagesConfig from './.ts-for-gir.packages-all.rc.js';

export default {
...allPackagesConfig,
modules: ['Gtk-4.0']
modules: ['Gtk-4.0', 'Adw-1.0']
}
5 changes: 0 additions & 5 deletions .ts-for-gir.rygelcore2.rc.js

This file was deleted.

5 changes: 0 additions & 5 deletions .ts-for-gir.timezonemap1.rc.js

This file was deleted.

5 changes: 0 additions & 5 deletions .ts-for-gir.vda1.rc.js

This file was deleted.

5 changes: 0 additions & 5 deletions .ts-for-gir.vte4.rc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"sourceMaps": true,
},
{
"name": "build:types:all",
"name": "build:types:local",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}/packages/cli",
Expand Down
8 changes: 3 additions & 5 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ yarn run build
Generate example type definitions:

```bash
yarn run test:girs:gjs:gtk4
yarn run test:girs:local:gtk4
```

## Gir XML Format
Expand Down Expand Up @@ -105,7 +105,7 @@ npm install -g yarn
To validate all your generated type definition files in this project run

```bash
yarn run validate:types:all
yarn run validate:types:local
```

To validate only your type definition files for GJS
Expand Down Expand Up @@ -141,9 +141,7 @@ git submodule update --init
Now you can run the test with

```bash
yarn run test:girs:gjs
yarn run test:girs:node
# or yarn run test:girs:all
yarn run test:girs:local
```

# FAQ
Expand Down
37 changes: 8 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,9 @@
"publish:app:latest": "yarn workspaces foreach -v --all --parallel --no-private --include '@ts-for-gir/*' npm publish --tolerate-republish --tag latest --access public",
"publish:types:next": "yarn workspaces foreach -v --all --parallel --no-private --include '@girs/*' npm publish --tolerate-republish --tag next --access public",
"publish:types:latest": "yarn workspaces foreach -v --all --parallel --no-private --include '@girs/*' npm publish --tolerate-republish --tag latest --access public",
"test": "yarn build:all && yarn test:girs:all && yarn validate:examples && yarn start:cli-examples:all",
"test:girs:all": "yarn clear:types && yarn build:types:all && yarn validate:types:all",
"test:girs:gjs": "yarn clear:types && yarn build:types && yarn validate:types:all",
"test:girs:gjs:vda1": "yarn clear:types && yarn build:types:vda1 && yarn validate:types:all",
"test:girs:gjs:gtk2": "yarn clear:types && yarn build:types:gtk2 && yarn validate:types:all",
"test:girs:gjs:gtk3": "yarn clear:types && yarn build:types:gtk3 && yarn validate:types:all",
"test:girs:gjs:gtk4": "yarn clear:types && yarn build:types:gtk4 && yarn validate:types:all",
"test:girs:gjs:gtk3+gtk4": "yarn clear:types && yarn build:types:gtk3+gtk4 && yarn validate:types:all",
"test:girs:gjs:gio": "yarn clear:types && yarn build:types:gio && yarn validate:types:all",
"test:girs:gjs:vte4": "yarn clear:types && yarn build:types:vte4 && yarn validate:types:all",
"test:girs:gjs:modemmanager1": "yarn clear:types && yarn build:types:modemmanager1 && yarn validate:types:all",
"test:girs:gjs:timezonemap1": "yarn clear:types && yarn build:types:timezonemap1 && yarn validate:types:all",
"test:girs:gjs:rygelcore2": "yarn clear:types && yarn build:types:rygelcore2 && yarn validate:types:all",
"test:girs:gjs:gcalc": "yarn clear:types && yarn build:types:gcalc && yarn validate:types:all",
"test": "yarn build:all && yarn test:girs:local && yarn validate:examples && yarn start:cli-examples:all",
"test:girs:local": "yarn clear:types && yarn build:types:local && yarn validate:types:local",
"test:girs:local:gtk4": "yarn clear:types && yarn build:types:local:gtk4 && yarn validate:types:local",
"build": "yarn build:parser && yarn build:lib && yarn build:generators && yarn build:cli",
"build:parser": "yarn workspace @gi.ts/parser run build",
"build:cli": "yarn workspace @ts-for-gir/cli run build",
Expand All @@ -44,25 +33,15 @@
"build:all": "yarn build && yarn build:examples",
"start:cli-examples:all": "yarn start:cli-examples:gjs",
"start:cli-examples:gjs": "yarn workspace ts-for-gir-glib-2-spawn-command-example run start && yarn workspace ts-for-gir-gio-2-cat-promisify-packages run start",
"build:types:packages:all": "NODE_OPTIONS=--max-old-space-size=25600 yarn ts-for-gir generate --configName='.ts-for-gir.packages-all.rc.js' && yarn install",
"build:types:packages": "NODE_OPTIONS=--max-old-space-size=25600 yarn ts-for-gir generate --configName='.ts-for-gir.packages-all.rc.js' && yarn install",
"build:types:packages:gtk4": "NODE_OPTIONS=--max-old-space-size=25600 yarn ts-for-gir generate --configName='.ts-for-gir.packages-gtk4.rc.js' && yarn install",
"build:types:all": "yarn ts-for-gir generate --configName='.ts-for-gir.all.rc.js'",
"build:types:vda1": "yarn ts-for-gir generate --configName='.ts-for-gir.vda1.rc.js'",
"build:types:gtk2": "yarn ts-for-gir generate --configName='.ts-for-gir.gtk2.rc.js'",
"build:types:gtk3": "yarn ts-for-gir generate --configName='.ts-for-gir.gtk3.rc.js'",
"build:types:gtk4": "yarn ts-for-gir generate --configName='.ts-for-gir.gtk4.rc.js'",
"build:types:gtk3+gtk4": "yarn ts-for-gir generate --configName='.ts-for-gir.gtk3+gtk4.rc.js'",
"build:types:gio": "yarn ts-for-gir generate --configName='.ts-for-gir.gio.rc.js'",
"build:types:vte4": "yarn ts-for-gir generate --configName='.ts-for-gir.vte4.rc.js'",
"build:types:modemmanager1": "yarn ts-for-gir generate --configName='.ts-for-gir.modemmanager1.rc.js'",
"build:types:timezonemap1": "yarn ts-for-gir generate --configName='.ts-for-gir.timezonemap1.rc.js'",
"build:types:rygelcore2": "yarn ts-for-gir generate --configName='.ts-for-gir.rygelcore2.rc.js'",
"build:types:gcalc": "yarn ts-for-gir generate --configName='.ts-for-gir.gcalc.rc.js'",
"build:types": "yarn build:types:all",
"build:types:local": "yarn ts-for-gir generate --configName='.ts-for-gir.all.rc.js'",
"build:types:local:gtk4": "yarn ts-for-gir generate --configName='.ts-for-gir.gtk4.rc.js'",
"build:types": "yarn build:types:local",
"validate": "yarn workspaces foreach -v --all --parallel run validate",
"validate:types": "yarn workspaces foreach -v --all --parallel run validate:types",
"validate:examples": "yarn workspaces foreach -v --all --parallel run validate:app",
"validate:types:all": "NODE_OPTIONS=--max_old_space_size=9216 tsc --project tsconfig.json",
"validate:types:local": "NODE_OPTIONS=--max_old_space_size=9216 tsc --project tsconfig.json",
"clear": "yarn clear:build && yarn clear:types",
"clear:build": "yarn workspaces foreach -v --include '@ts-for-gir/*' run clear:build",
"clear:types": "rimraf ./@types",
Expand Down

0 comments on commit 1995beb

Please sign in to comment.