Skip to content

Commit

Permalink
Merge pull request #48 from gjsify/upgrade-types
Browse files Browse the repository at this point in the history
Upgrade yarn, gir types and other dependencies
  • Loading branch information
JumpLink authored Jul 12, 2024
2 parents 481b5d4 + 5ecd1f4 commit 441dc55
Show file tree
Hide file tree
Showing 17 changed files with 1,757 additions and 1,659 deletions.
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.1.1.cjs

This file was deleted.

894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.3.1.cjs

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion .yarn/sdks/prettier/bin/prettier.cjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/bin/prettier.cjs
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

Expand Down
9 changes: 8 additions & 1 deletion .yarn/sdks/prettier/index.cjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "3.2.5-sdk",
"version": "3.3.2-sdk",
"main": "./index.cjs",
"type": "commonjs",
"bin": "./bin/prettier.cjs"
Expand Down
9 changes: 8 additions & 1 deletion .yarn/sdks/typescript/bin/tsc
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsc
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

Expand Down
9 changes: 8 additions & 1 deletion .yarn/sdks/typescript/bin/tsserver
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsserver
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

Expand Down
9 changes: 8 additions & 1 deletion .yarn/sdks/typescript/lib/tsc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsc.js
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

Expand Down
26 changes: 20 additions & 6 deletions .yarn/sdks/typescript/lib/tsserver.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserver.js
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

const moduleWrapper = tsserver => {
if (!process.versions.pnp) {
return tsserver;
Expand Down Expand Up @@ -214,11 +228,11 @@ const moduleWrapper = tsserver => {
return tsserver;
};

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserver.js
require(absPnpApiPath).setup();
}
const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));
// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.
// Ref https://github.com/microsoft/TypeScript/pull/55326
if (major > 5 || (major === 5 && minor >= 5)) {
moduleWrapper(absRequire(`typescript`));
}

// Defer to the real typescript/lib/tsserver.js your application uses
Expand Down
26 changes: 20 additions & 6 deletions .yarn/sdks/typescript/lib/tsserverlibrary.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

const moduleWrapper = tsserver => {
if (!process.versions.pnp) {
return tsserver;
Expand Down Expand Up @@ -214,11 +228,11 @@ const moduleWrapper = tsserver => {
return tsserver;
};

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
require(absPnpApiPath).setup();
}
const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));
// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.
// Ref https://github.com/microsoft/TypeScript/pull/55326
if (major > 5 || (major === 5 && minor >= 5)) {
moduleWrapper(absRequire(`typescript`));
}

// Defer to the real typescript/lib/tsserverlibrary.js your application uses
Expand Down
9 changes: 8 additions & 1 deletion .yarn/sdks/typescript/lib/typescript.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion .yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "5.4.3-sdk",
"version": "5.5.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ compressionLevel: mixed

enableGlobalCache: false

yarnPath: .yarn/releases/yarn-4.1.1.cjs
yarnPath: .yarn/releases/yarn-4.3.1.cjs
14 changes: 7 additions & 7 deletions examples/hello-world/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gjsify/gnome-shell-hello-world-example",
"version": "46.0.0-beta9",
"version": "46.0.0",
"description": "Simple Gnome Shell Hello World Extension example",
"type": "module",
"main": "dist/extension.js",
Expand All @@ -15,14 +15,14 @@
"license": "MIT",
"devDependencies": {
"@tsconfig/strictest": "^2.0.5",
"adm-zip": "^0.5.12",
"esbuild": "^0.20.2",
"typescript": "5.4.5"
"adm-zip": "^0.5.14",
"esbuild": "^0.23.0",
"typescript": "5.5.3"
},
"dependencies": {
"@girs/gjs": "^4.0.0-beta.5",
"@girs/gjs": "^4.0.0-beta.6",
"@girs/gnome-shell": "workspace:^",
"@girs/gobject-2.0": "^2.80.0-4.0.0-beta.5",
"@girs/st-14": "^14.0.0-4.0.0-beta.5"
"@girs/gobject-2.0": "^2.80.3-4.0.0-beta.6",
"@girs/st-14": "^14.0.0-4.0.0-beta.6"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gnome-shell",
"version": "46.0.0-beta9",
"version": "46.0.0",
"description": "GJS TypeScript type definitions for GNOME Shell Extensions",
"main": "src/index.js",
"type": "module",
Expand Down Expand Up @@ -52,9 +52,9 @@
"url": "https://github.com/gjsify/gnome-shell/issues"
},
"homepage": "https://github.com/gjsify/gnome-shell#readme",
"packageManager": "yarn@4.1.1",
"packageManager": "yarn@4.3.1",
"devDependencies": {
"prettier": "^3.2.5",
"typescript": "5.4.5"
"prettier": "^3.3.2",
"typescript": "5.5.3"
}
}
52 changes: 26 additions & 26 deletions packages/gnome-shell/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@girs/gnome-shell",
"version": "46.0.0-beta9",
"version": "46.0.0",
"description": "GJS TypeScript type definitions for GNOME Shell Extensions",
"type": "module",
"main": "./dist/index.js",
Expand Down Expand Up @@ -972,34 +972,34 @@
"generate:types": "node ./scripts/generate-types.js"
},
"dependencies": {
"@girs/accountsservice-1.0": "^1.0.0-4.0.0-beta.5",
"@girs/adw-1": "^1.5.0-4.0.0-beta.5",
"@girs/atk-1.0": "^2.52.0-4.0.0-beta.5",
"@girs/cally-14": "^14.0.0-4.0.0-beta.5",
"@girs/clutter-14": "^14.0.0-4.0.0-beta.5",
"@girs/cogl-2.0": "^2.0.0-4.0.0-beta.5",
"@girs/gcr-4": "^4.3.0-4.0.0-beta.5",
"@girs/gdm-1.0": "^1.0.0-4.0.0-beta.5",
"@girs/gio-2.0": "^2.80.0-4.0.0-beta.5",
"@girs/gjs": "^4.0.0-beta.5",
"@girs/glib-2.0": "^2.80.0-4.0.0-beta.5",
"@girs/gnomebg-4.0": "^4.0.0-4.0.0-beta.5",
"@girs/gnomebluetooth-3.0": "^3.0.0-4.0.0-beta.5",
"@girs/gnomedesktop-4.0": "^4.0.0-4.0.0-beta.5",
"@girs/gobject-2.0": "^2.80.0-4.0.0-beta.5",
"@girs/gtk-4.0": "^4.14.3-4.0.0-beta.5",
"@girs/gvc-1.0": "^1.0.0-4.0.0-beta.5",
"@girs/meta-14": "^14.0.0-4.0.0-beta.5",
"@girs/mtk-14": "^14.0.0-4.0.0-beta.5",
"@girs/polkit-1.0": "^1.0.0-4.0.0-beta.5",
"@girs/shell-14": "^14.0.0-4.0.0-beta.5",
"@girs/shew-0": "^0.0.0-4.0.0-beta.5",
"@girs/st-14": "^14.0.0-4.0.0-beta.5",
"@girs/upowerglib-1.0": "^1.90.2-4.0.0-beta.4"
"@girs/accountsservice-1.0": "^1.0.0-4.0.0-beta.6",
"@girs/adw-1": "^1.6.0-4.0.0-beta.6",
"@girs/atk-1.0": "^2.52.0-4.0.0-beta.6",
"@girs/cally-14": "^14.0.0-4.0.0-beta.6",
"@girs/clutter-14": "^14.0.0-4.0.0-beta.6",
"@girs/cogl-2.0": "^2.0.0-4.0.0-beta.6",
"@girs/gcr-4": "^4.3.0-4.0.0-beta.6",
"@girs/gdm-1.0": "^1.0.0-4.0.0-beta.6",
"@girs/gio-2.0": "^2.80.3-4.0.0-beta.6",
"@girs/gjs": "^4.0.0-beta.6",
"@girs/glib-2.0": "^2.80.3-4.0.0-beta.6",
"@girs/gnomebg-4.0": "^4.0.0-4.0.0-beta.6",
"@girs/gnomebluetooth-3.0": "^3.0.0-4.0.0-beta.6",
"@girs/gnomedesktop-4.0": "^4.0.0-4.0.0-beta.6",
"@girs/gobject-2.0": "^2.80.3-4.0.0-beta.6",
"@girs/gtk-4.0": "^4.14.4-4.0.0-beta.6",
"@girs/gvc-1.0": "^1.0.0-4.0.0-beta.6",
"@girs/meta-14": "^14.0.0-4.0.0-beta.6",
"@girs/mtk-14": "^14.0.0-4.0.0-beta.6",
"@girs/polkit-1.0": "^1.0.0-4.0.0-beta.6",
"@girs/shell-14": "^14.0.0-4.0.0-beta.6",
"@girs/shew-0": "^0.0.0-4.0.0-beta.6",
"@girs/st-14": "^14.0.0-4.0.0-beta.6",
"@girs/upowerglib-1.0": "^0.99.1-4.0.0-beta.6"
},
"devDependencies": {
"@tsconfig/strictest": "^2.0.5",
"typescript": "5.4.5"
"typescript": "5.5.3"
},
"keywords": [
"Gir",
Expand Down
Loading

0 comments on commit 441dc55

Please sign in to comment.