From 0bcec278898dd96ad5dfa82998ce1a3290d26081 Mon Sep 17 00:00:00 2001
From: gchoqueux <gerald.choqueux@ign.fr>
Date: Wed, 4 Dec 2024 15:48:39 +0100
Subject: [PATCH] chore: publish temp

---
 .github/workflows/integration.yml     | 10 +++++-----
 config/babel-register/babel-hooks.mjs |  3 +++
 package-lock.json                     | 18 +++++++++---------
 packages/Geographic/package.json      |  2 +-
 packages/Main/package.json            |  4 ++--
 packages/Widgets/package.json         |  2 +-
 6 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index 095f5a2d3e..216c69d78e 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -83,7 +83,7 @@ jobs:
     strategy:
       matrix:
         include:
-          - package: "@itowns/geographic"
+          - package: "@gchoqueux/geographic"
             path: "Geographic"
           - package: "itowns"
             path: "Main"
@@ -239,7 +239,7 @@ jobs:
           cp -R buildDocs itowns/docs
 
       # When deploying a release, we copy itowns bundles in dev folder to be published on
-      # iTowns/itowns.github.io. This is because we can't publish both a release version
+      # gchoqueux/itowns.github.io. This is because we can't publish both a release version
       # (in itowns/ folder) and a @next version (in itowns/dev folder) at the same time.
       - name: add dev bundle if release
         if: ${{ startsWith(github.event.head_commit.message, 'release v' ) }}
@@ -253,7 +253,7 @@ jobs:
         uses: peaceiris/actions-gh-pages@v3
         with:
           deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
-          external_repository: iTowns/itowns.github.io
+          external_repository: gchoqueux/itowns.github.io
           publish_dir: ./itowns
           destination_dir: ./itowns
           publish_branch: master
@@ -263,12 +263,12 @@ jobs:
       - name: Deploy Dev to itowns.github.io
         # Prevent deploying @next version when a release is done. Doing so would cause an issue,
         # since it is not possible to use the same deploy key to simultaneously deploy two different
-        # folders on iTowns/itowns.github.io (the release bundle on previous step and this one.
+        # folders on gchoqueux/itowns.github.io (the release bundle on previous step and this one.
         if: ${{ !startsWith(github.event.head_commit.message, 'release v' ) }}
         uses: peaceiris/actions-gh-pages@v3
         with:
           deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
-          external_repository: iTowns/itowns.github.io
+          external_repository: gchoqueux/itowns.github.io
           publish_dir: ./itowns
           destination_dir: ./itowns/dev
           publish_branch: master
diff --git a/config/babel-register/babel-hooks.mjs b/config/babel-register/babel-hooks.mjs
index 58443a4929..02e1e73ec1 100644
--- a/config/babel-register/babel-hooks.mjs
+++ b/config/babel-register/babel-hooks.mjs
@@ -71,6 +71,9 @@ async function transpile(source, context) {
  * the Node.js default resolve hook after the last user-supplied resolve hook
  */
 export async function resolve(specifier, context, nextResolve) {
+    if (specifier == '@itowns/geographic') {
+        specifier = '@gchoqueux/geographic';
+    }
     // Try to resolve the path of an imported module.
     // If the resolver failed, retry substituting the extension with '.ts'.
     try {
diff --git a/package-lock.json b/package-lock.json
index 9050648145..bbc2a8d788 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2635,6 +2635,10 @@
         "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
       }
     },
+    "node_modules/@gchoqueux/geographic": {
+      "resolved": "packages/Geographic",
+      "link": true
+    },
     "node_modules/@humanwhocodes/config-array": {
       "version": "0.13.0",
       "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
@@ -2813,10 +2817,6 @@
         "node": ">=8"
       }
     },
-    "node_modules/@itowns/geographic": {
-      "resolved": "packages/Geographic",
-      "link": true
-    },
     "node_modules/@jest/schemas": {
       "version": "29.6.3",
       "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
@@ -15814,7 +15814,7 @@
       }
     },
     "packages/Geodesy": {
-      "name": "@itowns/geographic",
+      "name": "@gchoqueux/geographic",
       "version": "2.44.2",
       "extraneous": true,
       "license": "(CECILL-B OR MIT)",
@@ -15824,7 +15824,7 @@
       }
     },
     "packages/Geographic": {
-      "name": "@itowns/geographic",
+      "name": "@gchoqueux/geographic",
       "version": "2.44.2",
       "license": "(CECILL-B OR MIT)",
       "peerDependencies": {
@@ -15838,7 +15838,7 @@
       "hasInstallScript": true,
       "license": "(CECILL-B OR MIT)",
       "dependencies": {
-        "@itowns/geographic": "^2.44.2",
+        "@gchoqueux/geographic": "^2.44.2",
         "@mapbox/mapbox-gl-style-spec": "^13.28.0",
         "@mapbox/vector-tile": "^2.0.3",
         "@tmcw/togeojson": "^5.8.1",
@@ -15866,7 +15866,7 @@
       "extraneous": true,
       "license": "(CECILL-B OR MIT)",
       "dependencies": {
-        "@itowns/geographic": "^2.44.2",
+        "@gchoqueux/geographic": "^2.44.2",
         "itowns": "^2.44.2"
       }
     },
@@ -15874,7 +15874,7 @@
       "version": "2.44.2",
       "license": "(CECILL-B OR MIT)",
       "dependencies": {
-        "@itowns/geographic": "^2.44.2",
+        "@gchoqueux/geographic": "^2.44.2",
         "itowns": "^2.44.2"
       }
     }
diff --git a/packages/Geographic/package.json b/packages/Geographic/package.json
index 86df9b4fc3..6429c86619 100644
--- a/packages/Geographic/package.json
+++ b/packages/Geographic/package.json
@@ -1,5 +1,5 @@
 {
-  "name": "@itowns/geographic",
+  "name": "@gchoqueux/geographic",
   "version": "2.44.2",
   "description": "Geodesy",
   "type": "module",
diff --git a/packages/Main/package.json b/packages/Main/package.json
index eb35d75358..6390f72240 100644
--- a/packages/Main/package.json
+++ b/packages/Main/package.json
@@ -20,7 +20,7 @@
     "prepublishOnly": "npx copyfiles -u 1 \"../../examples/**/*\" ./examples/ && npx copyfiles -u 1 \"../../docs/**/*\" ./docs/ && npx copyfiles -u 1 \"../../dist/**/*\" ./dist/ ",
     "postpublish": "node clean.cjs",
     "publish-next": "npm version prerelease --preid next && npm run update-package",
-    "update-package": "npm remove @itowns/geographic && npm install @itowns/geographic@$npm_package_version --save"
+    "update-package": "npm remove @gchoqueux/geographic && npm install @gchoqueux/geographic@$npm_package_version --save"
   },
   "c8": {
     "exclude": [
@@ -47,7 +47,7 @@
     "url": "https://github.com/iTowns/itowns/issues"
   },
   "dependencies": {
-    "@itowns/geographic": "^2.44.2",
+    "@gchoqueux/geographic": "^2.44.2",
     "@mapbox/mapbox-gl-style-spec": "^13.28.0",
     "@mapbox/vector-tile": "^2.0.3",
     "@tmcw/togeojson": "^5.8.1",
diff --git a/packages/Widgets/package.json b/packages/Widgets/package.json
index 694a8554ba..7a439e7c39 100644
--- a/packages/Widgets/package.json
+++ b/packages/Widgets/package.json
@@ -29,7 +29,7 @@
     "url": "https://github.com/itowns/itowns/issues"
   },
   "dependencies": {
-    "@itowns/geographic": "^2.44.2",
+    "@gchoqueux/geographic": "^2.44.2",
     "itowns": "^2.44.2"
   },
   "homepage": "https://itowns.github.io/"