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

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

129 lines
3.8 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.84.3",
"discourse-hbr": "1.0.0",
"discourse-widget-hbs": "1.0.0",
"ember-route-template": "^1.0.1",
"ember-source": "~3.28.12",
"handlebars": "^4.7.8",
"pretty-text": "1.0.0"
},
"devDependencies": {
"@babel/core": "^7.23.0",
"@babel/standalone": "^7.23.1",
"@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/jquery": "^2.0.0",
"@ember/legacy-built-in-components": "^0.5.0-alpha.0",
"@ember/optional-features": "^2.0.0",
"@ember/render-modifiers": "^2.1.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^2.9.4",
Build(deps-dev): Bump the embroider group (#23728) Bumps the embroider group in /app/assets/javascripts with 4 updates: [@embroider/test-setup](https://github.com/embroider-build/embroider/tree/HEAD/packages/test-setup), [@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/test-setup` from 3.0.1 to 3.0.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/test-setup) Updates `@embroider/compat` 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/compat) Updates `@embroider/core` from 3.2.1 to 3.3.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/core) Updates `@embroider/webpack` from 3.1.5 to 3.2.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/webpack) --- updated-dependencies: - dependency-name: "@embroider/test-setup" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: embroider - 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-minor dependency-group: embroider - dependency-name: "@embroider/webpack" 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>
2023-09-30 01:00:33 +08:00
"@embroider/compat": "^3.2.2",
"@embroider/core": "^3.3.0",
"@embroider/macros": "^1.13.1",
Build(deps-dev): Bump the embroider group (#23728) Bumps the embroider group in /app/assets/javascripts with 4 updates: [@embroider/test-setup](https://github.com/embroider-build/embroider/tree/HEAD/packages/test-setup), [@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/test-setup` from 3.0.1 to 3.0.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/test-setup) Updates `@embroider/compat` 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/compat) Updates `@embroider/core` from 3.2.1 to 3.3.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/core) Updates `@embroider/webpack` from 3.1.5 to 3.2.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/webpack) --- updated-dependencies: - dependency-name: "@embroider/test-setup" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: embroider - 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-minor dependency-group: embroider - dependency-name: "@embroider/webpack" 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>
2023-09-30 01:00:33 +08:00
"@embroider/webpack": "^3.2.0",
DEV: FloatKit (#23650) This PR introduces three new concepts to Discourse codebase through an addon called "FloatKit": - menu - tooltip - toast ## Tooltips ### Component Simple cases can be express with an API similar to DButton: ```hbs <DTooltip @Label={{i18n "foo.bar"}} @ICON="check" @content="Something" /> ``` More complex cases can use blocks: ```hbs <DTooltip> <:trigger> {{d-icon "check"}} <span>{{i18n "foo.bar"}}</span> </:trigger> <:content> Something </:content> </DTooltip> ``` ### Service You can manually show a tooltip using the `tooltip` service: ```javascript const tooltipInstance = await this.tooltip.show( document.querySelector(".my-span"), options ) // and later manual close or destroy it tooltipInstance.close(); tooltipInstance.destroy(); // you can also just close any open tooltip through the service this.tooltip.close(); ``` The service also allows you to register event listeners on a trigger, it removes the need for you to manage open/close of a tooltip started through the service: ```javascript const tooltipInstance = this.tooltip.register( document.querySelector(".my-span"), options ) // when done you can destroy the instance to remove the listeners tooltipInstance.destroy(); ``` Note that the service also allows you to use a custom component as content which will receive `@data` and `@close` as args: ```javascript const tooltipInstance = await this.tooltip.show( document.querySelector(".my-span"), { component: MyComponent, data: { foo: 1 } } ) ``` ## Menus Menus are very similar to tooltips and provide the same kind of APIs: ### Component ```hbs <DMenu @ICON="plus" @Label={{i18n "foo.bar"}}> <ul> <li>Foo</li> <li>Bat</li> <li>Baz</li> </ul> </DMenu> ``` They also support blocks: ```hbs <DMenu> <:trigger> {{d-icon "plus"}} <span>{{i18n "foo.bar"}}</span> </:trigger> <:content> <ul> <li>Foo</li> <li>Bat</li> <li>Baz</li> </ul> </:content> </DMenu> ``` ### Service You can manually show a menu using the `menu` service: ```javascript const menuInstance = await this.menu.show( document.querySelector(".my-span"), options ) // and later manual close or destroy it menuInstance.close(); menuInstance.destroy(); // you can also just close any open tooltip through the service this.menu.close(); ``` The service also allows you to register event listeners on a trigger, it removes the need for you to manage open/close of a tooltip started through the service: ```javascript const menuInstance = this.menu.register( document.querySelector(".my-span"), options ) // when done you can destroy the instance to remove the listeners menuInstance.destroy(); ``` Note that the service also allows you to use a custom component as content which will receive `@data` and `@close` as args: ```javascript const menuInstance = await this.menu.show( document.querySelector(".my-span"), { component: MyComponent, data: { foo: 1 } } ) ``` ## Toasts Interacting with toasts is made only through the `toasts` service. A default component is provided (DDefaultToast) and can be used through dedicated service methods: - this.toasts.success({ ... }); - this.toasts.warning({ ... }); - this.toasts.info({ ... }); - this.toasts.error({ ... }); - this.toasts.default({ ... }); ```javascript this.toasts.success({ data: { title: "Foo", message: "Bar", actions: [ { label: "Ok", class: "btn-primary", action: (componentArgs) => { // eslint-disable-next-line no-alert alert("Closing toast:" + componentArgs.data.title); componentArgs.close(); }, } ] }, }); ``` You can also provide your own component: ```javascript this.toasts.show(MyComponent, { autoClose: false, class: "foo", data: { baz: 1 }, }) ``` Co-authored-by: Martin Brennan <mjrbrennan@gmail.com> Co-authored-by: Isaac Janzen <50783505+janzenisaac@users.noreply.github.com> Co-authored-by: David Taylor <david@taylorhq.com> Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2023-09-26 19:39:52 +08:00
"@floating-ui/dom": "^1.5.0",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@popperjs/core": "^2.11.8",
"@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.2",
"admin": "1.0.0",
"babel-import-util": "^2.0.1",
"babel-plugin-ember-template-compilation": "^2.2.0",
"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",
"discourse-plugins": "1.0.0",
"ember-auto-import": "^2.6.3",
"ember-buffered-proxy": "^2.1.1",
"ember-cached-decorator-polyfill": "^1.0.2",
"ember-cli": "~5.0.0",
"ember-cli-app-version": "^6.0.1",
"ember-cli-babel": "^8.1.0",
"ember-cli-deprecation-workflow": "^2.1.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": "^8.0.0",
"ember-functions-as-helper-polyfill": "^2.1.2",
"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": "^6.2.0",
"ember-router-service-refresh-polyfill": "^1.1.0",
"ember-template-imports": "^3.4.2",
"ember-test-selectors": "^6.0.0",
"eslint": "^8.50.0",
"eslint-plugin-qunit": "^8.0.0",
"float-kit": "1.0.0",
"html-entities": "^2.4.0",
"imports-loader": "^4.0.1",
"js-yaml": "^4.1.0",
"jsdom": "^22.1.0",
"loader.js": "^4.7.0",
"message-bus-client": "^4.3.8",
"messageformat": "0.1.5",
"pretender": "^3.4.7",
"qunit": "^2.20.0",
"qunit-dom": "^2.0.0",
"sass": "^1.68.0",
"select-kit": "1.0.0",
"sinon": "^16.0.0",
"source-map": "^0.7.4",
"terser": "^5.20.0",
"truth-helpers": "1.0.0",
"util": "^0.12.5",
"virtual-dom": "^2.1.1",
"webpack": "^5.88.2",
"wizard": "1.0.0",
"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.14"
},
"engines": {
"node": "16.* || >= 18",
"npm": "please-use-yarn",
"yarn": ">= 1.21.1"
},
"ember": {
"edition": "octane"
}
}