diff --git a/app/assets/javascripts/admin/package.json b/app/assets/javascripts/admin/package.json index 747676f6014..cd7dbbde053 100644 --- a/app/assets/javascripts/admin/package.json +++ b/app/assets/javascripts/admin/package.json @@ -16,7 +16,6 @@ "dependencies": { "@babel/core": "^7.26.0", "@ember/string": "^4.0.0", - "discourse-common": "workspace:1.0.0", "ember-cli-babel": "^8.2.0", "ember-cli-htmlbars": "^6.3.0", "ember-template-imports": "^4.2.0" diff --git a/app/assets/javascripts/discourse-common/.npmrc b/app/assets/javascripts/discourse-common/.npmrc deleted file mode 100644 index c42da845b44..00000000000 --- a/app/assets/javascripts/discourse-common/.npmrc +++ /dev/null @@ -1 +0,0 @@ -engine-strict = true diff --git a/app/assets/javascripts/discourse-common/addon/.gitkeep b/app/assets/javascripts/discourse-common/addon/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/app/assets/javascripts/discourse-common/app/.gitkeep b/app/assets/javascripts/discourse-common/app/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/app/assets/javascripts/discourse-common/ember-cli-build.js b/app/assets/javascripts/discourse-common/ember-cli-build.js deleted file mode 100644 index da57a67830a..00000000000 --- a/app/assets/javascripts/discourse-common/ember-cli-build.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -const EmberAddon = require("ember-cli/lib/broccoli/ember-addon"); - -module.exports = function (defaults) { - const app = new EmberAddon(defaults, { - autoImport: { - publicAssetURL: "", - }, - }); - - /* - This build file specifies the options for the dummy test app of this - addon, located in `/tests/dummy` - This build file does *not* influence how the addon or the app using it - behave. You most likely want to be modifying `./index.js` or app's build file - */ - - const { maybeEmbroider } = require("@embroider/test-setup"); - return maybeEmbroider(app, { - skipBabel: [ - { - package: "qunit", - }, - ], - }); -}; diff --git a/app/assets/javascripts/discourse-common/index.js b/app/assets/javascripts/discourse-common/index.js deleted file mode 100644 index 7e8b0dfda18..00000000000 --- a/app/assets/javascripts/discourse-common/index.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -const commonBabelConfig = require("../discourse/lib/common-babel-config"); - -module.exports = { - name: require("./package").name, - options: { - autoImport: { - alias: { - handlebars: "handlebars/dist/cjs/handlebars.js", - }, - }, - - ...commonBabelConfig(), - }, - - isDevelopingAddon() { - return true; - }, -}; diff --git a/app/assets/javascripts/discourse-common/package.json b/app/assets/javascripts/discourse-common/package.json deleted file mode 100644 index d5ac3283179..00000000000 --- a/app/assets/javascripts/discourse-common/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "discourse-common", - "version": "1.0.0", - "description": "Shared code between discourse apps", - "author": "Discourse", - "license": "GPL-2.0-only", - "keywords": [ - "ember-addon" - ], - "scripts": { - "build": "ember build", - "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", - "start": "ember serve" - }, - "dependencies": { - "@babel/core": "^7.26.0", - "@ember/string": "^4.0.0", - "discourse-i18n": "workspace:1.0.0", - "ember-auto-import": "^2.10.0", - "ember-cli-babel": "^8.2.0", - "ember-cli-htmlbars": "^6.3.0", - "ember-resolver": "^13.1.0", - "handlebars": "^4.7.8", - "truth-helpers": "workspace:1.0.0" - }, - "devDependencies": { - "@ember/optional-features": "^2.2.0", - "@embroider/test-setup": "^4.0.0", - "@glimmer/component": "^1.1.2", - "@types/jquery": "^3.5.32", - "@types/qunit": "^2.19.12", - "@types/rsvp": "^4.0.9", - "broccoli-asset-rev": "^3.0.0", - "ember-cli": "~6.1.0", - "ember-cli-inject-live-reload": "^2.1.0", - "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.2", - "ember-disable-prototype-extensions": "^1.1.3", - "ember-load-initializers": "^3.0.1", - "ember-source": "~5.12.0", - "ember-source-channel-url": "^3.0.0", - "loader.js": "^4.7.0", - "webpack": "^5.97.1" - }, - "engines": { - "node": ">= 18", - "npm": "please-use-pnpm", - "yarn": "please-use-pnpm", - "pnpm": ">= 9" - }, - "ember": { - "edition": "default" - } -} diff --git a/app/assets/javascripts/discourse-markdown-it/package.json b/app/assets/javascripts/discourse-markdown-it/package.json index ef36cb759f3..30ad8632ee3 100644 --- a/app/assets/javascripts/discourse-markdown-it/package.json +++ b/app/assets/javascripts/discourse-markdown-it/package.json @@ -19,7 +19,6 @@ ], "dependencies": { "@embroider/addon-shim": "^1.9.0", - "discourse-common": "workspace:1.0.0", "discourse-i18n": "workspace:1.0.0", "ember-auto-import": "^2.10.0", "markdown-it": "14.0.0", diff --git a/app/assets/javascripts/discourse/package.json b/app/assets/javascripts/discourse/package.json index c83605f53cf..e62dfc2b8af 100644 --- a/app/assets/javascripts/discourse/package.json +++ b/app/assets/javascripts/discourse/package.json @@ -77,7 +77,6 @@ "deepmerge": "^4.3.1", "deprecation-silencer": "workspace:1.0.0", "dialog-holder": "workspace:1.0.0", - "discourse-common": "workspace:1.0.0", "discourse-i18n": "workspace:1.0.0", "discourse-markdown-it": "workspace:1.0.0", "discourse-plugins": "workspace:1.0.0", diff --git a/app/assets/javascripts/discourse/tests/unit/lib/case-converter-test.js b/app/assets/javascripts/discourse/tests/unit/lib/case-converter-test.js index 214927d42ed..9feeaa3a593 100644 --- a/app/assets/javascripts/discourse/tests/unit/lib/case-converter-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/case-converter-test.js @@ -6,7 +6,7 @@ import { snakeCaseToCamelCase, } from "discourse/lib/case-converter"; -module("Unit | discourse-common | case-converter", function (hooks) { +module("Unit | lib | case-converter", function (hooks) { setupTest(hooks); test("camelCaseToSnakeCase", function (assert) { diff --git a/app/assets/javascripts/pretty-text/package.json b/app/assets/javascripts/pretty-text/package.json index e570c99855b..dfc9ba922cc 100644 --- a/app/assets/javascripts/pretty-text/package.json +++ b/app/assets/javascripts/pretty-text/package.json @@ -15,7 +15,6 @@ }, "dependencies": { "@babel/core": "^7.26.0", - "discourse-common": "workspace:1.0.0", "discourse-i18n": "workspace:1.0.0", "ember-auto-import": "^2.10.0", "ember-cli-babel": "^8.2.0", diff --git a/app/assets/javascripts/theme-transpiler/package.json b/app/assets/javascripts/theme-transpiler/package.json index 14accfd884b..19c618492bc 100644 --- a/app/assets/javascripts/theme-transpiler/package.json +++ b/app/assets/javascripts/theme-transpiler/package.json @@ -13,7 +13,6 @@ "content-tag": "^3.1.0", "decorator-transforms": "^2.3.0", "discourse": "workspace:0.0.0", - "discourse-common": "workspace:1.0.0", "discourse-widget-hbs": "workspace:1.0.0", "ember-cli-htmlbars": "^6.3.0", "ember-source": "~5.12.0", diff --git a/jsconfig.json b/jsconfig.json index b0d4eab5072..dee4fbf63e1 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -12,9 +12,6 @@ "discourse/tests/*": [ "./app/assets/javascripts/discourse/tests/*" ], - "discourse-common/*": [ - "./app/assets/javascripts/discourse-common/addon/*" - ], "admin/*": [ "./app/assets/javascripts/admin/addon/*" ], @@ -86,7 +83,6 @@ "include": [ "./app/assets/javascripts/discourse/app", "./app/assets/javascripts/discourse/tests", - "./app/assets/javascripts/discourse-common/addon", "./app/assets/javascripts/admin/addon", "./app/assets/javascripts/pretty-text/addon", "./app/assets/javascripts/select-kit/addon", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87f7c4c57ca..585f4c54999 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -139,9 +139,6 @@ importers: '@ember/string': specifier: ^4.0.0 version: 4.0.0 - discourse-common: - specifier: workspace:1.0.0 - version: link:../discourse-common ember-cli-babel: specifier: ^8.2.0 version: 8.2.0(@babel/core@7.26.0) @@ -447,9 +444,6 @@ importers: dialog-holder: specifier: workspace:1.0.0 version: link:../dialog-holder - discourse-common: - specifier: workspace:1.0.0 - version: link:../discourse-common discourse-i18n: specifier: workspace:1.0.0 version: link:../discourse-i18n @@ -595,88 +589,6 @@ importers: specifier: ^1.0.15 version: 1.0.15 - app/assets/javascripts/discourse-common: - dependencies: - '@babel/core': - specifier: ^7.26.0 - version: 7.26.0(supports-color@8.1.1) - '@ember/string': - specifier: ^4.0.0 - version: 4.0.0 - discourse-i18n: - specifier: workspace:1.0.0 - version: link:../discourse-i18n - ember-auto-import: - specifier: ^2.10.0 - version: 2.10.0(@glint/template@1.5.1)(webpack@5.97.1(@swc/core@1.10.7)(esbuild@0.24.2)) - ember-cli-babel: - specifier: ^8.2.0 - version: 8.2.0(@babel/core@7.26.0) - ember-cli-htmlbars: - specifier: ^6.3.0 - version: 6.3.0 - ember-resolver: - specifier: ^13.1.0 - version: 13.1.0(ember-source@5.12.0(patch_hash=xx7mvsb7nmshqkkqhmf45r3hse)(@glimmer/component@1.1.2(@babel/core@7.26.0))(@glint/template@1.5.1)(rsvp@4.8.5)(webpack@5.97.1(@swc/core@1.10.7)(esbuild@0.24.2))) - handlebars: - specifier: ^4.7.8 - version: 4.7.8 - truth-helpers: - specifier: workspace:1.0.0 - version: link:../truth-helpers - devDependencies: - '@ember/optional-features': - specifier: ^2.2.0 - version: 2.2.0 - '@embroider/test-setup': - specifier: ^4.0.0 - version: 4.0.0(@embroider/compat@3.8.0(@embroider/core@3.5.0(@glint/template@1.5.1))(@glint/template@1.5.1))(@embroider/core@3.5.0(@glint/template@1.5.1))(@embroider/webpack@4.0.9(@embroider/core@3.5.0(@glint/template@1.5.1))(webpack@5.97.1(@swc/core@1.10.7)(esbuild@0.24.2))) - '@glimmer/component': - specifier: ^1.1.2 - version: 1.1.2(@babel/core@7.26.0) - '@types/jquery': - specifier: ^3.5.32 - version: 3.5.32 - '@types/qunit': - specifier: ^2.19.12 - version: 2.19.12 - '@types/rsvp': - specifier: ^4.0.9 - version: 4.0.9 - broccoli-asset-rev: - specifier: ^3.0.0 - version: 3.0.0 - ember-cli: - specifier: ~6.1.0 - version: 6.1.0(handlebars@4.7.8)(underscore@1.13.6) - ember-cli-inject-live-reload: - specifier: ^2.1.0 - version: 2.1.0 - ember-cli-sri: - specifier: ^2.1.1 - version: 2.1.1 - ember-cli-terser: - specifier: ^4.0.2 - version: 4.0.2 - ember-disable-prototype-extensions: - specifier: ^1.1.3 - version: 1.1.3 - ember-load-initializers: - specifier: ^3.0.1 - version: 3.0.1(ember-source@5.12.0(patch_hash=xx7mvsb7nmshqkkqhmf45r3hse)(@glimmer/component@1.1.2(@babel/core@7.26.0))(@glint/template@1.5.1)(rsvp@4.8.5)(webpack@5.97.1(@swc/core@1.10.7)(esbuild@0.24.2))) - ember-source: - specifier: ~5.12.0 - version: 5.12.0(patch_hash=xx7mvsb7nmshqkkqhmf45r3hse)(@glimmer/component@1.1.2(@babel/core@7.26.0))(@glint/template@1.5.1)(rsvp@4.8.5)(webpack@5.97.1(@swc/core@1.10.7)(esbuild@0.24.2)) - ember-source-channel-url: - specifier: ^3.0.0 - version: 3.0.0(encoding@0.1.13) - loader.js: - specifier: ^4.7.0 - version: 4.7.0 - webpack: - specifier: ^5.97.1 - version: 5.97.1(@swc/core@1.10.7)(esbuild@0.24.2) - app/assets/javascripts/discourse-hbr: dependencies: handlebars: @@ -697,9 +609,6 @@ importers: '@embroider/addon-shim': specifier: ^1.9.0 version: 1.9.0 - discourse-common: - specifier: workspace:1.0.0 - version: link:../discourse-common discourse-i18n: specifier: workspace:1.0.0 version: link:../discourse-i18n @@ -903,9 +812,6 @@ importers: '@babel/core': specifier: ^7.26.0 version: 7.26.0(supports-color@8.1.1) - discourse-common: - specifier: workspace:1.0.0 - version: link:../discourse-common discourse-i18n: specifier: workspace:1.0.0 version: link:../discourse-i18n @@ -1076,9 +982,6 @@ importers: discourse: specifier: workspace:0.0.0 version: link:../discourse - discourse-common: - specifier: workspace:1.0.0 - version: link:../discourse-common discourse-widget-hbs: specifier: workspace:1.0.0 version: link:../discourse-widget-hbs diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index ac7a3d37433..9f1de2b5d1d 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -4,7 +4,6 @@ packages: - "app/assets/javascripts/deprecation-silencer" - "app/assets/javascripts/dialog-holder" - "app/assets/javascripts/discourse" -- "app/assets/javascripts/discourse-common" - "app/assets/javascripts/discourse-hbr" - "app/assets/javascripts/discourse-i18n" - "app/assets/javascripts/discourse-markdown-it" diff --git a/script/build_jsconfig.rb b/script/build_jsconfig.rb index 4bc2e717173..f01b4e2fe59 100644 --- a/script/build_jsconfig.rb +++ b/script/build_jsconfig.rb @@ -8,7 +8,6 @@ Dir.chdir("#{__dir__}/..") # rubocop:disable Discourse/NoChdir because this is n CORE_NAMESPACES = { "discourse/*" => ["app/assets/javascripts/discourse/app"], "discourse/tests/*" => ["app/assets/javascripts/discourse/tests"], - "discourse-common/*" => ["app/assets/javascripts/discourse-common/addon"], "admin/*" => ["app/assets/javascripts/admin/addon"], "pretty-text/*" => ["app/assets/javascripts/pretty-text/addon"], "select-kit/*" => ["app/assets/javascripts/select-kit/addon"],