discourse/app/assets/javascripts/discourse/package.json

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

135 lines
4.0 KiB
JSON
Raw Normal View History

{
"name": "discourse",
"version": "0.0.0",
"private": true,
"description": "A platform for community discussion. Free, open, simple.",
"license": "GPL-2.0-only",
"author": "Discourse",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember serve",
"test": "ember test",
"postinstall": "../run-patch-package"
},
"dependencies": {
"@glimmer/syntax": "^0.91.1",
"@highlightjs/cdn-assets": "^11.9.0",
"discourse-hbr": "1.0.0",
"discourse-widget-hbs": "1.0.0",
"ember-route-template": "^1.0.3",
"ember-source": "~5.5.0",
"handlebars": "^4.7.8",
"highlight.js": "^11.9.0",
"jspreadsheet-ce": "^4.13.4",
"morphlex": "^0.0.15",
"pretty-text": "1.0.0"
},
"devDependencies": {
"@babel/core": "^7.24.3",
"@babel/standalone": "^7.24.3",
"@colors/colors": "^1.6.0",
"@discourse/backburner.js": "^2.7.1-0",
"@discourse/itsatrap": "^2.0.10",
"@ember-compat/tracked-built-ins": "^0.9.1",
"@ember/legacy-built-in-components": "^0.5.0",
"@ember/optional-features": "^2.1.0",
"@ember/render-modifiers": "^2.1.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^3.3.0",
Build(deps-dev): Bump the embroider group with 3 updates (#26083) Bumps the embroider group with 3 updates: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat), [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core) and [@embroider/macros](https://github.com/embroider-build/embroider/tree/HEAD/packages/macros). Updates `@embroider/compat` from 3.4.5 to 3.4.6 - [Release notes](https://github.com/embroider-build/embroider/releases) - [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md) - [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat) Updates `@embroider/core` from 3.4.5 to 3.4.6 - [Release notes](https://github.com/embroider-build/embroider/releases) - [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md) - [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/core) Updates `@embroider/macros` from 1.14.0 to 1.15.0 - [Release notes](https://github.com/embroider-build/embroider/releases) - [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md) - [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/macros) --- updated-dependencies: - dependency-name: "@embroider/compat" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: embroider - dependency-name: "@embroider/core" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: embroider - dependency-name: "@embroider/macros" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: embroider ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-08 01:38:14 +08:00
"@embroider/compat": "^3.4.6",
"@embroider/core": "^3.4.6",
"@embroider/macros": "^1.13.1",
Enable Embroider/Webpack code spliting for Wizard (#24919) (extracted from #23678) * Move Wizard back into main app, remove Wizard addon * Remove Wizard-related resolver or build hacks * Install and enable `@embroider/router` * Add "wizard" to `splitAtRoutes` In a fully optimized Embroider app, route-based code splitting more or less Just Work™ – install `@embroider/router`, subclass from it, configure which routes you want to split and that's about it. However, our app is not "fully optimized", by which I mean we are not able to turn on all the `static*` flags. In Embroider, "static" means "statically analyzable". Specifically it means that all inter-dependencies between modules (files) are explicitly expressed as `import`s, as opposed to `{{i18n ...}}` magically means "look for the default export in app/helpers/i18n.js" or something even more dynamic with the resolver. Without turning on those flags, Embroider behaves conservatively, slurps up all `app` files eagerly into the primary bundle/chunks. So, while you _could_ turn on route-based code splitting, there won't be much to split. The commits leading up to this involves a bunch of refactors and cleanups that 1) works perfectly fine in the classic build, 2) are good and useful in their own right, but also 3) re-arranged things such that most dependencies are now explicit. With those in place, I was able to move all the wizard code into the "app/static" folder. Embroider does not eagerly pull things from this folder into any bundle, unless something explicitly "asks" for them via `imports`. Conversely, things from this folder are not registered with the resolver and are not added to the `loader.js` registry. In conjunction with route-based code splitting, we now have the ability to split out islands of on-demand functionalities from the main app bundle. When you split a route in Embroider, it automatically creates a bundle/entrypoint with the relevant routes/templates/controllers matching that route prefix. Anything they import will be added to the bundle as well, assuming they are not already in the main app bundle, which is where the "app/static" folder comes into play. The "app/static" folder name is not special. It is configured in ember-cli-build.js. Alternatively, we could have left everything in their normal locations, and add more fine-grained paths to the `staticAppPaths` array. I just thought it would be easy to manage and scale, and less error-prone to do it this way. Note that putting things in `app/static` does not guarantee that it would not be part of the main app bundle. For example, if we were to add an `import ... from "app/static/wizard/...";` in a main bundle file (say, `app.js`), then that chunk of the module graph would be pulled in. (Consider using `await import(...)`?) Overtime, we can build better tooling (e.g. lint rules and babel macros to make things less repetitive) as we expand the use of this pattern, but this is a start. Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
2023-12-20 21:15:06 +08:00
"@embroider/router": "^2.1.4",
Build(deps-dev): Bump the embroider group in /app/assets/javascripts with 3 updates (#25528) * Build(deps-dev): Bump the embroider group Bumps the embroider group in /app/assets/javascripts with 3 updates: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat), [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core) and [@embroider/webpack](https://github.com/embroider-build/embroider/tree/HEAD/packages/webpack). Updates `@embroider/compat` from 3.4.3 to 3.4.4 - [Release notes](https://github.com/embroider-build/embroider/releases) - [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md) - [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat) Updates `@embroider/core` from 3.4.3 to 3.4.4 - [Release notes](https://github.com/embroider-build/embroider/releases) - [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md) - [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/core) Updates `@embroider/webpack` from 3.2.1 to 3.2.2 - [Release notes](https://github.com/embroider-build/embroider/releases) - [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md) - [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/webpack) --- updated-dependencies: - dependency-name: "@embroider/compat" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: embroider - dependency-name: "@embroider/core" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: embroider - dependency-name: "@embroider/webpack" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: embroider ... Signed-off-by: dependabot[bot] <support@github.com> * Update lockfiles for ember version flag --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: discoursebuild <build@discourse.org>
2024-02-02 06:08:33 +08:00
"@embroider/webpack": "^3.2.2",
"@floating-ui/dom": "^1.6.3",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@popperjs/core": "^2.11.8",
"@types/jquery": "^3.5.29",
Build(deps-dev): Bump the types group in /app/assets/javascripts with 20 updates (#25287) * Build(deps-dev): Bump the types group Bumps the types group in /app/assets/javascripts with 20 updates: | Package | From | To | | --- | --- | --- | | [@types/ember](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember) | `4.0.10` | `4.0.11` | | [@types/ember__application](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__application) | `4.0.10` | `4.0.11` | | [@types/ember__array](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__array) | `4.0.9` | `4.0.10` | | [@types/ember__component](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__component) | `4.0.21` | `4.0.22` | | [@types/ember__controller](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__controller) | `4.0.11` | `4.0.12` | | [@types/ember__debug](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__debug) | `4.0.7` | `4.0.8` | | [@types/ember__destroyable](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__destroyable) | `4.0.4` | `4.0.5` | | [@types/ember__engine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__engine) | `4.0.10` | `4.0.11` | | [@types/ember__error](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__error) | `4.0.5` | `4.0.6` | | [@types/ember__object](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__object) | `4.0.11` | `4.0.12` | | [@types/ember__polyfills](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__polyfills) | `4.0.5` | `4.0.6` | | [@types/ember__routing](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__routing) | `4.0.19` | `4.0.20` | | [@types/ember__runloop](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__runloop) | `4.0.8` | `4.0.9` | | [@types/ember__service](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__service) | `4.0.8` | `4.0.9` | | [@types/ember__string](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__string) | `3.0.13` | `3.0.14` | | [@types/ember__template](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__template) | `4.0.5` | `4.0.6` | | [@types/ember__test](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__test) | `4.0.5` | `4.0.6` | | [@types/ember__utils](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__utils) | `4.0.6` | `4.0.7` | | [@types/qunit](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/qunit) | `2.19.9` | `2.19.10` | | [@types/rsvp](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/rsvp) | `4.0.8` | `4.0.9` | Updates `@types/ember` from 4.0.10 to 4.0.11 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember) Updates `@types/ember__application` from 4.0.10 to 4.0.11 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__application) Updates `@types/ember__array` from 4.0.9 to 4.0.10 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__array) Updates `@types/ember__component` from 4.0.21 to 4.0.22 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__component) Updates `@types/ember__controller` from 4.0.11 to 4.0.12 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__controller) Updates `@types/ember__debug` from 4.0.7 to 4.0.8 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__debug) Updates `@types/ember__destroyable` from 4.0.4 to 4.0.5 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__destroyable) Updates `@types/ember__engine` from 4.0.10 to 4.0.11 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__engine) Updates `@types/ember__error` from 4.0.5 to 4.0.6 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__error) Updates `@types/ember__object` from 4.0.11 to 4.0.12 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__object) Updates `@types/ember__polyfills` from 4.0.5 to 4.0.6 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__polyfills) Updates `@types/ember__routing` from 4.0.19 to 4.0.20 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Changelog](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ember__routing/history-location.d.ts) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__routing) Updates `@types/ember__runloop` from 4.0.8 to 4.0.9 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__runloop) Updates `@types/ember__service` from 4.0.8 to 4.0.9 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__service) Updates `@types/ember__string` from 3.0.13 to 3.0.14 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__string) Updates `@types/ember__template` from 4.0.5 to 4.0.6 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__template) Updates `@types/ember__test` from 4.0.5 to 4.0.6 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__test) Updates `@types/ember__utils` from 4.0.6 to 4.0.7 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__utils) Updates `@types/qunit` from 2.19.9 to 2.19.10 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/qunit) Updates `@types/rsvp` from 4.0.8 to 4.0.9 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/rsvp) --- updated-dependencies: - dependency-name: "@types/ember" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__application" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__array" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__component" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__controller" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__debug" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__destroyable" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__engine" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__error" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__object" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__polyfills" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__routing" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__runloop" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__service" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__string" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__template" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__test" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/ember__utils" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/qunit" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types - dependency-name: "@types/rsvp" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: types ... Signed-off-by: dependabot[bot] <support@github.com> * Update lockfiles for ember version flag --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: discoursebuild <build@discourse.org>
2024-01-17 06:43:19 +08:00
"@types/qunit": "^2.19.10",
"@types/rsvp": "^4.0.9",
"@uppy/aws-s3": "3.0.6",
"@uppy/aws-s3-multipart": "3.1.3",
"@uppy/core": "3.0.4",
"@uppy/drop-target": "2.0.1",
"@uppy/utils": "5.4.3",
"@uppy/xhr-upload": "3.1.1",
"a11y-dialog": "8.0.4",
"admin": "1.0.0",
"autosize": "^6.0.1",
"babel-import-util": "^2.0.1",
"babel-plugin-ember-template-compilation": "^2.2.1",
"bootstrap": "3.4.1",
"bootstrap-json": "1.0.0",
"broccoli-asset-rev": "^3.0.0",
"deepmerge": "^4.3.1",
"deprecation-silencer": "1.0.0",
"dialog-holder": "1.0.0",
"discourse-common": "1.0.0",
DEV: convert I18n pseudo package into real package (discourse-i18n) (#23867) Currently, `window.I18n` is defined in an old school hand written script, inlined into locale/*.js by the Rails asset pipeline, and then the global variable is shimmed into a pseudo AMD module later in `module-shims.js`. This approach has some problems – for one thing, when we add a new V2 addon (e.g. in #23859), Embroider/Webpack is stricter about its dependencies and won't let you `import from "I18n";` when `"I18n"` isn't listed as one of its `dependencies` or `peerDependencies`. This moves `I18n` into a real package – `discourse-i18n`. (I was originally planning to keep the `I18n` name since it's a private package anyway, but NPM packages are supposed to have lower case names and that may cause problems with other tools.) This package defines and exports a regular class, but also defines the default global instance for backwards compatibility. We should use the exported class in tests to make one-off instances without mutating the global instance and having to clean it up after the test run. However, I did not attempt that refactor in this PR. Since `discourse-i18n` is now included by the app, the locale scripts needs to be loaded after the app chunks. Since no "real" work happens until later on when we kick things off in the boot script, the order in which the script tags appear shouldn't be a problem. Alternatively, we can rework the locale bundles to be more lazy like everything else, and require/import them into the app. I avoided renaming the imports in this commit since that would be quite noisy and drowns out the actual changes here. Instead, I used a Webpack alias to redirect the current `"I18n"` import to the new package for the time being. In a separate commit later on, I'll rename all the imports in oneshot and remove the alias. As always, plugins and the legacy bundles (admin/wizard) still relies on the runtime AMD shims regardless. For the most part, I avoided refactoring the actual I18n code too much other than making it a class, and some light stuff like `var` into `let`. However, now that it is in a reasonable format to work with (no longer inside the global script context!) it may also be a good opportunity to refactor and make clear what is intended to be public API vs internal implementation details. Speaking of, I took the librety to make `PLACEHOLDER`, `SEPARATOR` and `I18nMissingInterpolationArgument` actual constants since it seemed pretty clear to me those were just previously stashed on to the `I18n` global to avoid polluting the global namespace, rather than something we expect the consumers to set/replace.
2023-10-12 21:44:01 +08:00
"discourse-i18n": "1.0.0",
"discourse-markdown-it": "1.0.0",
"discourse-plugins": "1.0.0",
"ember-auto-import": "^2.7.2",
"ember-buffered-proxy": "^2.1.1",
"ember-cached-decorator-polyfill": "^1.0.2",
"ember-cli": "~5.7.0",
"ember-cli-app-version": "^6.0.1",
"ember-cli-babel": "^8.2.0",
"ember-cli-deprecation-workflow": "^2.2.0",
"ember-cli-htmlbars": "^6.3.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-progress-ci": "1.0.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-decorators": "^6.1.1",
"ember-exam": "^9.0.0",
"ember-load-initializers": "^2.1.1",
"ember-modifier": "^4.1.0",
Upgrade ember-on-resize-modifier (#23045) The previous version of ember-on-resize-modifier depended on ember-modifier@^3.2.7 while discourse had ember-modifier@^4.1.0. As far as Yarn is concerned, it can accomplish this with: node_modules ... ember-modifier 4.1.0 ... ember-on-resize-modifier 1.1.0 ... ember-modifier 3.2.7 ... ... This does NOT work! In a classic build everything is compiled down to AMD modules and at runtime there can only be one uniquely named "ember-modifier" module. When we have duplicates, depending on activation ordering, one of them will randomly win. In practice, it seems like ember-modifier 3.2.7 had "won" in the current build, and we are shipping it to production, you can find these modules in vendor.js like: ```js ;define("ember-modifier/-private/class/modifier", /* ... */, function(/* ... */) { /* the 3.2.7 version with deprecations, etc */ }) /* ... */ ;define("ember-modifier/index", /* ... */) ``` However, ember-auto-import also "found" the 4.1.0 version and in one of the chunk.app.js: ```js d('ember-modifier', /* ... */, function() { return __webpack_require__(/*! ember-modifier */ 227); }); ``` ...and in one of the chunk.vendors.js... ```js /* 227 */ /*!****************************************************!*\ !*** ../node_modules/ember-modifier/dist/index.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* ...the 4.1.0 version... */ }), ``` So, in practice: * We are brining both copies into the production build * The 3.2.7 modules are available in the AMD loader as "ember-modifier/..." * But 4.1.0 modules are available in the AMD loader as "ember-modifier" * Because mostly it's consumed as `import ... from "ember-modifier";`, the latter end up actually winning * Because the newer code is compatible enough, and the deprecated features are unused, it seems to work ok..? But in the Embroider build, ember-auto-import doesn't emit those shims anymore. It does process most of the core modules through Webpack so the imports get correctly wired up to the 4.1.0 as expected, as they no longer go through/need the runtime AMD loader.js. The older 3.2.7 copy is _still_ shipped in the vendor bundle and registered the same, but not "stomped over" by the EAI shims anymore. Our manual shims (#22703, merged yesterday) are more "polite" and check `require.has(...)` before defining the module, and since `require.has(...)` check for the `/index` alias and returns `true`, our shim does not stomp the 3.2.7 modules either. So then, when our "auxilary bundles" (admin, plugins, etc) tries to import `"ember-modifier", they get the 3.2.7 version.
2023-08-10 17:28:39 +08:00
"ember-on-resize-modifier": "^2.0.2",
"ember-production-deprecations": "1.0.0",
"ember-qunit": "^8.0.2",
"ember-template-imports": "^4.1.0",
"ember-test-selectors": "^6.0.0",
"float-kit": "1.0.0",
"html-entities": "^2.5.2",
"imports-loader": "^5.0.0",
"jquery": "^3.7.1",
"js-yaml": "^4.1.0",
"loader.js": "^4.7.0",
"message-bus-client": "^4.3.8",
"messageformat": "0.1.5",
"pretender": "^3.4.7",
"qunit": "^2.20.1",
"qunit-dom": "^3.0.0",
"sass": "^1.72.0",
"select-kit": "1.0.0",
"sinon": "^17.0.1",
"source-map": "^0.7.4",
"terser": "^5.30.2",
"truth-helpers": "1.0.0",
"util": "^0.12.5",
"virtual-dom": "^2.1.1",
"webpack": "^5.91.0",
"webpack-stats-plugin": "^1.1.3",
"workbox-cacheable-response": "^7.0.0",
"workbox-core": "^7.0.0",
"workbox-expiration": "^7.0.0",
"workbox-routing": "^7.0.0",
"workbox-strategies": "^7.0.0",
DEV: move xss dependency into core (#23094) This resolves the issue in #23064. This issue arises because we need to produce the trees for the auxilary bundles in `ember-cli-build.js` to pass these trees as argument to `app.toTree()`. In order to produce these trees, the code internally need to set up babel, which deep-clones the addons' babel configs. When using `@embroider/macros`, the addon's babel config includes a `MacrosConfig` object which is not supposed to be touched until the configs are "finalized". In a classic build, the finalization step happens when `app.toTree()` is called. In Embroider, this happens somewhere deeper inside `CompatApp`. We need to produce these auxilary bundle trees before we call `app.toTree()` or before constructing `CompatApp` because they need to be passed as arguments to these functions. So this poses a tricky chicken-and-egg timing issue. It was difficult to find a workaround for this that works for both the classic and Embroider build pipeline. Of all the internal addons that uses the auxilary bundle pattern, this only affets `pretty-text` as it is (for now, at least) the only addon that uses `@embroider/macros`. Taking a step back, the only reason (for now, at least) it was introduced was for the loader shim for the `xss` package. This package is actually used inside the lazily loaded markdown-it bundle. However, we didn't have a better way to include the dep into the lazy bundle directly, so it ends up going into the main addon tree, and, inturns, the discourse core bundle. In core's main loader shim manifest, we already have an entry for `xss`. This was perhaps a mistake at the time, but it doesn't make a difference – as mentioned above, `xss` needs to be included into the main bundle anyway. So, for now, the simpliest solution is to avoid `@embroider/macros` in these internal addons for the time being. Ideally we would soon absorb these back into core as lazily loaded (`import()`-ed) code managed by Webpack when we fully switch over to Embroider.
2023-08-15 23:13:26 +08:00
"workbox-sw": "^7.0.0",
"xss": "^1.0.15"
},
"engines": {
"node": ">= 18",
"npm": "please-use-yarn",
"yarn": ">= 1.21.1"
},
"ember": {
"edition": "octane"
}
}