diff --git a/package.json b/package.json index 4d3afa7c..ccceb151 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dist" ], "scripts": { - "clean": "rm -rf dist node_modules test-app-3.x/node_modules", + "clean": "rm -rf dist node_modules test-app-3.x/node_modules test-app-4.x/node_modules test-app-5.x/node_modules", "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", "lint:hbs": "ember-template-lint .", "lint:js": "eslint .", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6927c744..152e6a9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -325,6 +325,153 @@ importers: specifier: ^5.65.0 version: 5.92.1 + test-app-4.x: + devDependencies: + '@babel/core': + specifier: ^7.24.7 + version: 7.24.7 + '@babel/eslint-parser': + specifier: ^7.24.7 + version: 7.24.7(@babel/core@7.24.7)(eslint@8.57.0) + '@babel/plugin-proposal-decorators': + specifier: ^7.24.7 + version: 7.24.7(@babel/core@7.24.7) + '@ember/optional-features': + specifier: ^2.1.0 + version: 2.1.0 + '@ember/string': + specifier: ^3.1.1 + version: 3.1.1 + '@ember/test-helpers': + specifier: ^3.3.0 + version: 3.3.0(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1))(webpack@5.92.1) + '@embroider/test-setup': + specifier: ^3.0.1 + version: 3.0.3(@embroider/compat@3.5.5(@embroider/core@3.4.14))(@embroider/core@3.4.14)(@embroider/webpack@4.0.4(@embroider/core@3.4.14)(webpack@5.92.1)) + '@glimmer/component': + specifier: ^1.1.2 + version: 1.1.2(@babel/core@7.24.7) + '@glimmer/tracking': + specifier: ^1.1.2 + version: 1.1.2 + broccoli-asset-rev: + specifier: ^3.0.0 + version: 3.0.0 + concurrently: + specifier: ^8.2.2 + version: 8.2.2 + ember-auto-import: + specifier: ^2.7.3 + version: 2.7.4(webpack@5.92.1) + ember-cli: + specifier: ~4.12.3 + version: 4.12.3(babel-core@6.26.3)(handlebars@4.7.8)(underscore@1.13.6) + ember-cli-app-version: + specifier: ^6.0.1 + version: 6.0.1(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1)) + ember-cli-babel: + specifier: ^8.2.0 + version: 8.2.0(@babel/core@7.24.7) + ember-cli-clean-css: + specifier: ^3.0.0 + version: 3.0.0 + ember-cli-dependency-checker: + specifier: ^3.3.2 + version: 3.3.2(ember-cli@4.12.3(babel-core@6.26.3)(handlebars@4.7.8)(underscore@1.13.6)) + ember-cli-htmlbars: + specifier: ^6.3.0 + version: 6.3.0 + 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-fetch: + specifier: ^8.1.2 + version: 8.1.2(encoding@0.1.13) + ember-load-initializers: + specifier: ^2.1.2 + version: 2.1.2(@babel/core@7.24.7) + ember-modifier: + specifier: ^4.1.0 + version: 4.1.0(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1)) + ember-moment: + specifier: workspace:* + version: link:.. + ember-page-title: + specifier: ^8.2.3 + version: 8.2.3(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1)) + ember-qunit: + specifier: ^8.0.2 + version: 8.1.0(@ember/test-helpers@3.3.0(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1))(webpack@5.92.1))(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1))(qunit@2.21.0) + ember-resolver: + specifier: ^11.0.1 + version: 11.0.1(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1)) + ember-source: + specifier: ~4.12.4 + version: 4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1) + ember-source-channel-url: + specifier: ^3.0.0 + version: 3.0.0(encoding@0.1.13) + ember-template-lint: + specifier: ^5.13.0 + version: 5.13.0 + ember-try: + specifier: ^3.0.0 + version: 3.0.0(encoding@0.1.13) + eslint: + specifier: ^8.57.0 + version: 8.57.0 + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@8.57.0) + eslint-plugin-ember: + specifier: ^11.12.0 + version: 11.12.0(eslint@8.57.0) + eslint-plugin-n: + specifier: ^16.6.2 + version: 16.6.2(eslint@8.57.0) + eslint-plugin-prettier: + specifier: ^5.1.3 + version: 5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.2) + eslint-plugin-qunit: + specifier: ^8.1.1 + version: 8.1.1(eslint@8.57.0) + loader.js: + specifier: ^4.7.0 + version: 4.7.0 + moment-timezone: + specifier: ^0.5.45 + version: 0.5.45 + prettier: + specifier: ^3.3.1 + version: 3.3.2 + qunit: + specifier: ^2.21.0 + version: 2.21.0 + qunit-dom: + specifier: ^2.0.0 + version: 2.0.0 + stylelint: + specifier: ^15.11.0 + version: 15.11.0 + stylelint-config-standard: + specifier: ^34.0.0 + version: 34.0.0(stylelint@15.11.0) + stylelint-prettier: + specifier: ^4.1.0 + version: 4.1.0(prettier@3.3.2)(stylelint@15.11.0) + tracked-built-ins: + specifier: ^3.3.0 + version: 3.3.0 + webpack: + specifier: ^5.91.0 + version: 5.92.1 + test-app-5.x: devDependencies: '@babel/core': @@ -390,9 +537,6 @@ importers: ember-cli-terser: specifier: ^4.0.2 version: 4.0.2 - ember-data: - specifier: ~5.3.3 - version: 5.3.8(@ember/string@3.1.1)(@ember/test-helpers@3.3.0(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1))(webpack@5.92.1))(@ember/test-waiters@3.1.0)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1))(qunit@2.21.0) ember-fetch: specifier: ^8.1.2 version: 8.1.2(encoding@0.1.13) @@ -1173,121 +1317,9 @@ packages: peerDependencies: postcss-selector-parser: ^6.0.13 - '@ember-data/adapter@5.3.8': - resolution: {integrity: sha512-mlyGQyiNv3C5SN0jRqVboixnSW/h0r1g7wsCus35p51zKYtq7HGyp3EaEQZOt+4dRS0wNfDx4Z95PPbH/rmH0Q==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@ember-data/legacy-compat': 5.3.8 - '@ember-data/request-utils': 5.3.8 - '@ember-data/store': 5.3.8 - '@warp-drive/core-types': 0.0.0-beta.11 - - '@ember-data/debug@5.3.8': - resolution: {integrity: sha512-cqats3thXCd5UJbswF/ZGDFJPqBZ7tgHZjDGWa8NuRuDn7YgB3PqAz+I4CjxPkQokOPeYzk/0JvNvTOlp4IjuA==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@ember-data/model': 5.3.8 - '@ember-data/request-utils': 5.3.8 - '@ember-data/store': 5.3.8 - '@warp-drive/core-types': 0.0.0-beta.11 - - '@ember-data/graph@5.3.8': - resolution: {integrity: sha512-JNaR41QlA4R1mXJKbI2S2+Zdy3ysoArAQmfnHouDXWezQD6NpgKgmfLmCqxtdHkAVQ8ttnAMx/S/A2fPTVaeyw==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@ember-data/store': 5.3.8 - '@warp-drive/core-types': 0.0.0-beta.11 - - '@ember-data/json-api@5.3.8': - resolution: {integrity: sha512-n0Woiu4oEiJmqfLa5xM9fbhY7+nntncdgWrJfYO1IMEcuO0fbmZVLPye1wTjUIog7uwmjD1uP0u63MnKyqOSeA==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@ember-data/graph': 5.3.8 - '@ember-data/request-utils': 5.3.8 - '@ember-data/store': 5.3.8 - '@warp-drive/core-types': 0.0.0-beta.11 - - '@ember-data/legacy-compat@5.3.8': - resolution: {integrity: sha512-b043cU5k+gT+E2YT4ujHoea/81gmYrZTu6Yvt5n87YoCP0p5UxJWji11BTYfJAYN0sf1QAl+OkxI1BX7Ed1Q0g==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@ember-data/graph': 5.3.8 - '@ember-data/json-api': 5.3.8 - '@ember-data/request': 5.3.8 - '@ember-data/request-utils': 5.3.8 - '@ember-data/store': 5.3.8 - '@ember/test-waiters': ^3.1.0 - '@warp-drive/core-types': 0.0.0-beta.11 - peerDependenciesMeta: - '@ember-data/graph': - optional: true - '@ember-data/json-api': - optional: true - - '@ember-data/model@5.3.8': - resolution: {integrity: sha512-vg7hIzQmDXCDapUZc6kawKE2IAD9A4RowQBmBD7gR7TWtzinmoSygHYHjZpVdAEV4JE3EI1gjbyQesRLoAub1A==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@ember-data/graph': 5.3.8 - '@ember-data/json-api': 5.3.8 - '@ember-data/legacy-compat': 5.3.8 - '@ember-data/request-utils': 5.3.8 - '@ember-data/store': 5.3.8 - '@ember-data/tracking': 5.3.8 - '@warp-drive/core-types': 0.0.0-beta.11 - peerDependenciesMeta: - '@ember-data/graph': - optional: true - '@ember-data/json-api': - optional: true - - '@ember-data/request-utils@5.3.8': - resolution: {integrity: sha512-cMcSoxRLv7mhHABeFWLivZhp7k9Lp0UZB+KPNrnbCXZ7T+b4C/BhQvbpTXYJwj7V/m47dlPzM/c0I2cfdmhzNg==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@ember/string': 3.1.1 - '@warp-drive/core-types': 0.0.0-beta.11 - ember-inflector: 4.0.2 - peerDependenciesMeta: - '@ember/string': - optional: true - ember-inflector: - optional: true - - '@ember-data/request@5.3.8': - resolution: {integrity: sha512-urAzDc+MvpmIzr2olMphG9DhwKrdYJOyywhT+fHnzCvezQoMgoBpkr40uCM2IX4Ge0+a9MklcSViA6kpLq2izQ==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@warp-drive/core-types': 0.0.0-beta.11 - '@ember-data/rfc395-data@0.0.4': resolution: {integrity: sha512-tGRdvgC9/QMQSuSuJV45xoyhI0Pzjm7A9o/MVVA3HakXIImJbbzx/k/6dO9CUEQXIyS2y0fW6C1XaYOG7rY0FQ==} - '@ember-data/serializer@5.3.8': - resolution: {integrity: sha512-EjESckhiZTDtdetihMeup/PXU/pbOTAK8o2SsYGGICwVNpcguH3su9NhoCJQ97/5XL+X5I4KCMm7V8/Lode8vw==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@ember-data/legacy-compat': 5.3.8 - '@ember-data/request-utils': 5.3.8 - '@ember-data/store': 5.3.8 - '@warp-drive/core-types': 0.0.0-beta.11 - - '@ember-data/store@5.3.8': - resolution: {integrity: sha512-ZxqHgiKZrqXdetlriv4VOPjqrEre2rqaLFWOHkjjKqzsp2AkmGkcrh/DS6i9Y4/5F9hYxb9lxyyJqOW7sr57yQ==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@ember-data/request': 5.3.8 - '@ember-data/request-utils': 5.3.8 - '@ember-data/tracking': 5.3.8 - '@warp-drive/core-types': 0.0.0-beta.11 - - '@ember-data/tracking@5.3.8': - resolution: {integrity: sha512-1zbz1yDgx8HDditG3DHnl8xsvBAwguT/WcBRZRj5kEtDVELwCY1N+cCtxMRPVgunKgP2UCVJPfnXkgqYvEsG4Q==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@warp-drive/core-types': 0.0.0-beta.11 - ember-source: '>= 3.28.12' - '@ember-template-lint/todo-utils@10.0.0': resolution: {integrity: sha512-US8VKnetBOl8KfKz+rXGsosz6rIETNwSz2F2frM8hIoJfF/d6ME1Iz1K7tPYZEE6SoKqZFlBs5XZPSmzRnabjA==} engines: {node: 10.* || 12.* || >= 14} @@ -1559,6 +1591,9 @@ packages: '@glimmer/vm-babel-plugins@0.80.3': resolution: {integrity: sha512-9ej6xlm5MzHBJ5am2l0dbbn8Z0wJoYoMpM8FcrGMlUP6SPMLWxvxpMsApgQo8u6dvZRCjR3/bw3fdf7GOy0AFw==} + '@glimmer/vm-babel-plugins@0.84.2': + resolution: {integrity: sha512-HS2dEbJ3CgXn56wk/5QdudM7rE3vtNMvPIoG7Rrg+GhkGMNxBCIRxOeEF2g520j9rwlA2LAZFpc7MCDMFbTjNA==} + '@glimmer/vm-babel-plugins@0.92.0': resolution: {integrity: sha512-s/jPlTykZb3YzzOCVmGyMP8NihonHM+eY5WBQl+MOCXe2KdGkTAxFgnuGYzHTtJ/JzCRa/YRXQhJhncJSg6L2A==} engines: {node: '>=16'} @@ -1933,14 +1968,6 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@warp-drive/build-config@0.0.0-beta.6': - resolution: {integrity: sha512-ANSjWRV5kSJyIIO+5rRv7/lqfwYazQ9wDpi4vr1rjGogsmVteRCnflV5qYqt9W9T4JXRjSimjSfKwCgEwl+jUA==} - engines: {node: '>= 18.20.3'} - - '@warp-drive/core-types@0.0.0-beta.11': - resolution: {integrity: sha512-GHQE+woaGdRDGj6VG3Qt0uGBNog1zq5XO2Ccce35cYPpM3FOCOdmqB4Wt0miD1bBdbAuWQZmmQOIYAMSMCOdZQ==} - engines: {node: '>= 18.20.3'} - '@webassemblyjs/ast@1.12.1': resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} @@ -3928,9 +3955,6 @@ packages: resolution: {integrity: sha512-Ej77K+YhCZImotoi/CU2cfsoZaswoPlGaM5TB3LvjvPDlVPRhxUHO2RsaUVC5lsGeRLRiHCOxVtoJ6GyqexzFA==} engines: {node: 10.* || 12.* || >= 14} - ember-cli-test-info@1.0.0: - resolution: {integrity: sha512-dEVTIpmUfCzweC97NGf6p7L6XKBwV2GmSM4elmzKvkttEp5P7AvGA9uGyN4GqFq+RwhW+2b0I2qlX00w+skm+A==} - ember-cli-test-loader@3.1.0: resolution: {integrity: sha512-0aocZV9SIoOHiU3hrH3IuLR6busWhTX6UVXgd490hmJkIymmOXNH2+jJoC7Ebkeo3PiOfAdjqhb765QDlHSJOw==} engines: {node: 10.* || >= 12} @@ -3986,6 +4010,11 @@ packages: engines: {node: '>= 12'} hasBin: true + ember-cli@4.12.3: + resolution: {integrity: sha512-Ilap7fVGx0+sF6y5O1id+xVPYlc2cJ8OAG6faEQPyvbaCCUsCZnAEr7EMA+5qg0kNqjawIIHJTgnQesdbaDwtg==} + engines: {node: '>= 14'} + hasBin: true + ember-cli@5.10.0-beta.0: resolution: {integrity: sha512-FZhZxUs9TTTP0Yk5tEvZ4hjRaHGUNxWuOfd1N11lM9XkXzTP5IM+2M2Ns5mMpVGzfhzX60JkLuRcIm1nMNsl7A==} engines: {node: '>= 18'} @@ -4000,21 +4029,6 @@ packages: resolution: {integrity: sha512-BtkjulweiXo9c3yVWrtexw2dTmBrvavD/xixNC6TKOBdrixUwU+6nuOO9dufDWsMxoid7MvtmDpzc9+mE8PdaA==} engines: {node: 10.* || >= 12.*} - ember-data@5.3.8: - resolution: {integrity: sha512-ZFd0dxTCkX5OHe/Xdfpglg+3OELsd0xNFziogoKV0JPLzyXmasn/8vAeHeUta9rAJDYH8lix3/1t6iIeY+DzYQ==} - engines: {node: '>= 18.20.3'} - peerDependencies: - '@ember/test-helpers': ^3.3.0 - '@ember/test-waiters': ^3.1.0 - qunit: ^2.18.0 - peerDependenciesMeta: - '@ember/test-helpers': - optional: true - '@ember/test-waiters': - optional: true - qunit: - optional: true - ember-destroyable-polyfill@2.0.3: resolution: {integrity: sha512-TovtNqCumzyAiW0/OisSkkVK93xnVF4NRU6+FN0ubpfwEOpRrmM2RqDwXI6YAChCgSHON1cz0DfQStpA1Gjuuw==} engines: {node: 10.* || >= 12} @@ -4122,6 +4136,12 @@ packages: resolution: {integrity: sha512-HGrBpY6TN+MAi7F6BS8XYtNFG6vtbKE9ttPcyj0Ps+76kP7isCHyN0hk8ecKciLq7JYDqiPDNWjdIXAn2JfhZA==} engines: {node: 10.* || >= 12.*} + ember-source@4.12.4: + resolution: {integrity: sha512-HUlNAY+qr/Jm4c/5E11n5w6IvLY7Rr4DxmFv/0LZ3R5LqDSubM1jEmny5zDjOfadMa4pawoCmFFWXVeJEXwppg==} + engines: {node: '>= 14.*'} + peerDependencies: + '@glimmer/component': ^1.1.2 + ember-source@5.10.0-alpha.4: resolution: {integrity: sha512-BZHuFrvQvL/FvCtQEo7rZXLQdbRhNPuclO8WYaSJJQGOAdPGMoX6jPC3PEqvzux1jYzd6Wg6IHxoFtRu9skY7Q==} engines: {node: '>= 16.*'} @@ -5325,10 +5345,6 @@ packages: resolution: {integrity: sha512-wzkZHqpb4eGrOKBl34xy3umnYHx8Si5R1U4fwmdxLo5gdH6mEK8gclckTj/qWqy4Je0bsDYe/qazZYuO7xe3XQ==} engines: {node: '>=14.0.0'} - inflection@3.0.0: - resolution: {integrity: sha512-1zEJU1l19SgJlmwqsEyFTbScw/tkMHFenUo//Y0i+XEP83gDFdMvPizAD/WGcE+l1ku12PcTVHQhO6g5E0UCMw==} - engines: {node: '>=18.0.0'} - inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. @@ -5354,6 +5370,10 @@ packages: resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} engines: {node: '>=8.0.0'} + inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} + engines: {node: '>=12.0.0'} + inquirer@9.2.23: resolution: {integrity: sha512-kod5s+FBPIDM2xiy9fu+6wdU/SkK5le5GS9lh4FEBjBHqiMgD9lLFbCbuqFNAjNL2ZOy9Wd9F694IOzN9pZHBA==} engines: {node: '>=18'} @@ -8365,6 +8385,10 @@ packages: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true + uuid@9.0.1: + resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} + hasBin: true + v8-compile-cache@2.4.0: resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} @@ -10176,224 +10200,95 @@ snapshots: dependencies: postcss-selector-parser: 6.1.0 - '@ember-data/adapter@5.3.8(@ember-data/legacy-compat@5.3.8(kxjtz5whh7zco27l2dp4yt4lsa))(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11)': + '@ember-data/rfc395-data@0.0.4': {} + + '@ember-template-lint/todo-utils@10.0.0': dependencies: - '@ember-data/legacy-compat': 5.3.8(kxjtz5whh7zco27l2dp4yt4lsa) - '@ember-data/request-utils': 5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/store': 5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11) - '@ember/edition-utils': 1.2.0 - '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 - ember-cli-path-utils: 1.0.0 - ember-cli-string-utils: 1.1.0 - ember-cli-test-info: 1.0.0 + '@types/eslint': 7.29.0 + fs-extra: 9.1.0 + slash: 3.0.0 + tslib: 2.6.3 + + '@ember/edition-utils@1.2.0': {} + + '@ember/optional-features@2.1.0': + dependencies: + chalk: 4.1.2 + ember-cli-version-checker: 5.1.2 + glob: 7.2.3 + inquirer: 7.3.3 + mkdirp: 1.0.4 + silent-error: 1.1.1 transitivePeerDependencies: - - '@glint/template' - supports-color - '@ember-data/debug@5.3.8(@ember-data/model@5.3.8(5zp7jzwp7kvduzcfpvskyipsfy))(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11)': + '@ember/string@3.1.1': dependencies: - '@ember-data/model': 5.3.8(5zp7jzwp7kvduzcfpvskyipsfy) - '@ember-data/request-utils': 5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/store': 5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11) - '@ember/edition-utils': 1.2.0 - '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 + ember-cli-babel: 7.26.11 transitivePeerDependencies: - - '@glint/template' - supports-color - '@ember-data/graph@5.3.8(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11)': + '@ember/test-helpers@2.9.4(@babel/core@7.24.7)(ember-source@3.28.12(@babel/core@7.24.7))': dependencies: - '@ember-data/store': 5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11) + '@ember/test-waiters': 3.1.0 '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 + '@embroider/util': 1.13.1(ember-source@3.28.12(@babel/core@7.24.7)) + broccoli-debug: 0.6.5 + broccoli-funnel: 3.0.8 + ember-cli-babel: 7.26.11 + ember-cli-htmlbars: 6.3.0 + ember-destroyable-polyfill: 2.0.3(@babel/core@7.24.7) + ember-source: 3.28.12(@babel/core@7.24.7) transitivePeerDependencies: + - '@babel/core' + - '@glint/environment-ember-loose' - '@glint/template' - supports-color - '@ember-data/json-api@5.3.8(@ember-data/graph@5.3.8(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11)': + '@ember/test-helpers@3.3.0(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1))(webpack@5.92.1)': dependencies: - '@ember-data/graph': 5.3.8(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/request-utils': 5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/store': 5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11) + '@ember/test-waiters': 3.1.0 '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 + '@simple-dom/interface': 1.4.0 + broccoli-debug: 0.6.5 + broccoli-funnel: 3.0.8 + dom-element-descriptors: 0.5.0 + ember-auto-import: 2.7.4(webpack@5.92.1) + ember-cli-babel: 7.26.11 + ember-cli-htmlbars: 6.3.0 + ember-source: 4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1) transitivePeerDependencies: - '@glint/template' - supports-color + - webpack - '@ember-data/legacy-compat@5.3.8(kxjtz5whh7zco27l2dp4yt4lsa)': + '@ember/test-helpers@3.3.0(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1))(webpack@5.92.1)': dependencies: - '@ember-data/request': 5.3.8(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/request-utils': 5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/store': 5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11) '@ember/test-waiters': 3.1.0 '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 - optionalDependencies: - '@ember-data/graph': 5.3.8(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/json-api': 5.3.8(@ember-data/graph@5.3.8(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11) + '@simple-dom/interface': 1.4.0 + broccoli-debug: 0.6.5 + broccoli-funnel: 3.0.8 + dom-element-descriptors: 0.5.0 + ember-auto-import: 2.7.4(webpack@5.92.1) + ember-cli-babel: 7.26.11 + ember-cli-htmlbars: 6.3.0 + ember-source: 5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1) transitivePeerDependencies: - '@glint/template' - supports-color + - webpack - '@ember-data/model@5.3.8(5zp7jzwp7kvduzcfpvskyipsfy)': + '@ember/test-waiters@3.1.0': dependencies: - '@ember-data/legacy-compat': 5.3.8(kxjtz5whh7zco27l2dp4yt4lsa) - '@ember-data/request-utils': 5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/store': 5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/tracking': 5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)) - '@ember/edition-utils': 1.2.0 - '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 - ember-cli-string-utils: 1.1.0 - ember-cli-test-info: 1.0.0 - inflection: 3.0.0 - optionalDependencies: - '@ember-data/graph': 5.3.8(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/json-api': 5.3.8(@ember-data/graph@5.3.8(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11) + calculate-cache-key-for-tree: 2.0.0 + ember-cli-babel: 7.26.11 + ember-cli-version-checker: 5.1.2 + semver: 7.6.2 transitivePeerDependencies: - - '@glint/template' - supports-color - '@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11)': - dependencies: - '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 - optionalDependencies: - '@ember/string': 3.1.1 - transitivePeerDependencies: - - '@glint/template' - - supports-color - - '@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11)': - dependencies: - '@ember/test-waiters': 3.1.0 - '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 - transitivePeerDependencies: - - '@glint/template' - - supports-color - - '@ember-data/rfc395-data@0.0.4': {} - - '@ember-data/serializer@5.3.8(@ember-data/legacy-compat@5.3.8(kxjtz5whh7zco27l2dp4yt4lsa))(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11)': - dependencies: - '@ember-data/legacy-compat': 5.3.8(kxjtz5whh7zco27l2dp4yt4lsa) - '@ember-data/request-utils': 5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/store': 5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11) - '@ember/edition-utils': 1.2.0 - '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 - ember-cli-path-utils: 1.0.0 - ember-cli-string-utils: 1.1.0 - ember-cli-test-info: 1.0.0 - transitivePeerDependencies: - - '@glint/template' - - supports-color - - '@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11)': - dependencies: - '@ember-data/request': 5.3.8(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/request-utils': 5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/tracking': 5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)) - '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 - transitivePeerDependencies: - - '@glint/template' - - supports-color - - '@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1))': - dependencies: - '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 - ember-source: 5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1) - transitivePeerDependencies: - - '@glint/template' - - supports-color - - '@ember-template-lint/todo-utils@10.0.0': - dependencies: - '@types/eslint': 7.29.0 - fs-extra: 9.1.0 - slash: 3.0.0 - tslib: 2.6.3 - - '@ember/edition-utils@1.2.0': {} - - '@ember/optional-features@2.1.0': - dependencies: - chalk: 4.1.2 - ember-cli-version-checker: 5.1.2 - glob: 7.2.3 - inquirer: 7.3.3 - mkdirp: 1.0.4 - silent-error: 1.1.1 - transitivePeerDependencies: - - supports-color - - '@ember/string@3.1.1': - dependencies: - ember-cli-babel: 7.26.11 - transitivePeerDependencies: - - supports-color - - '@ember/test-helpers@2.9.4(@babel/core@7.24.7)(ember-source@3.28.12(@babel/core@7.24.7))': - dependencies: - '@ember/test-waiters': 3.1.0 - '@embroider/macros': 1.16.5 - '@embroider/util': 1.13.1(ember-source@3.28.12(@babel/core@7.24.7)) - broccoli-debug: 0.6.5 - broccoli-funnel: 3.0.8 - ember-cli-babel: 7.26.11 - ember-cli-htmlbars: 6.3.0 - ember-destroyable-polyfill: 2.0.3(@babel/core@7.24.7) - ember-source: 3.28.12(@babel/core@7.24.7) - transitivePeerDependencies: - - '@babel/core' - - '@glint/environment-ember-loose' - - '@glint/template' - - supports-color - - '@ember/test-helpers@3.3.0(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1))(webpack@5.92.1)': - dependencies: - '@ember/test-waiters': 3.1.0 - '@embroider/macros': 1.16.5 - '@simple-dom/interface': 1.4.0 - broccoli-debug: 0.6.5 - broccoli-funnel: 3.0.8 - dom-element-descriptors: 0.5.0 - ember-auto-import: 2.7.4(webpack@5.92.1) - ember-cli-babel: 7.26.11 - ember-cli-htmlbars: 6.3.0 - ember-source: 5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1) - transitivePeerDependencies: - - '@glint/template' - - supports-color - - webpack - - '@ember/test-waiters@3.1.0': - dependencies: - calculate-cache-key-for-tree: 2.0.0 - ember-cli-babel: 7.26.11 - ember-cli-version-checker: 5.1.2 - semver: 7.6.2 - transitivePeerDependencies: - - supports-color - - '@embroider/addon-dev@0.50.2(rollup@2.79.1)': + '@embroider/addon-dev@0.50.2(rollup@2.79.1)': dependencies: '@embroider/shared-internals': 0.50.2 '@rollup/pluginutils': 4.2.1 @@ -10893,6 +10788,12 @@ snapshots: transitivePeerDependencies: - '@babel/core' + '@glimmer/vm-babel-plugins@0.84.2(@babel/core@7.24.7)': + dependencies: + babel-plugin-debug-macros: 0.3.4(@babel/core@7.24.7) + transitivePeerDependencies: + - '@babel/core' + '@glimmer/vm-babel-plugins@0.92.0(@babel/core@7.24.7)': dependencies: babel-plugin-debug-macros: 0.3.4(@babel/core@7.24.7) @@ -11337,25 +11238,6 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@warp-drive/build-config@0.0.0-beta.6': - dependencies: - '@embroider/addon-shim': 1.8.9 - '@embroider/macros': 1.16.5 - babel-import-util: 2.1.1 - broccoli-funnel: 3.0.8 - semver: 7.6.2 - transitivePeerDependencies: - - '@glint/template' - - supports-color - - '@warp-drive/core-types@0.0.0-beta.11': - dependencies: - '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - transitivePeerDependencies: - - '@glint/template' - - supports-color - '@webassemblyjs/ast@1.12.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.6 @@ -14020,6 +13902,14 @@ snapshots: - supports-color - webpack + ember-cli-app-version@6.0.1(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1)): + dependencies: + ember-cli-babel: 7.26.11 + ember-source: 4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1) + git-repo-info: 2.1.1 + transitivePeerDependencies: + - supports-color + ember-cli-app-version@6.0.1(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)): dependencies: ember-cli-babel: 7.26.11 @@ -14125,6 +14015,17 @@ snapshots: transitivePeerDependencies: - supports-color + ember-cli-dependency-checker@3.3.2(ember-cli@4.12.3(babel-core@6.26.3)(handlebars@4.7.8)(underscore@1.13.6)): + dependencies: + chalk: 2.4.2 + ember-cli: 4.12.3(babel-core@6.26.3)(handlebars@4.7.8)(underscore@1.13.6) + find-yarn-workspace-root: 1.2.1 + is-git-url: 1.0.0 + resolve: 1.22.8 + semver: 5.7.2 + transitivePeerDependencies: + - supports-color + ember-cli-dependency-checker@3.3.2(ember-cli@5.9.0(babel-core@6.26.3)(handlebars@4.7.8)(underscore@1.13.6)): dependencies: chalk: 2.4.2 @@ -14225,10 +14126,6 @@ snapshots: transitivePeerDependencies: - supports-color - ember-cli-test-info@1.0.0: - dependencies: - ember-cli-string-utils: 1.1.0 - ember-cli-test-loader@3.1.0: dependencies: ember-cli-babel: 7.26.11 @@ -14922,6 +14819,158 @@ snapshots: - walrus - whiskers + ember-cli@4.12.3(babel-core@6.26.3)(handlebars@4.7.8)(underscore@1.13.6): + dependencies: + '@babel/core': 7.24.7 + '@babel/plugin-transform-modules-amd': 7.24.7(@babel/core@7.24.7) + amd-name-resolver: 1.3.1 + babel-plugin-module-resolver: 4.1.0 + bower-config: 1.4.3 + bower-endpoint-parser: 0.2.2 + broccoli: 3.5.2 + broccoli-amd-funnel: 2.0.1 + broccoli-babel-transpiler: 7.8.1 + broccoli-builder: 0.18.14 + broccoli-concat: 4.2.5 + broccoli-config-loader: 1.0.1 + broccoli-config-replace: 1.1.2 + broccoli-debug: 0.6.5 + broccoli-funnel: 3.0.8 + broccoli-funnel-reducer: 1.0.0 + broccoli-merge-trees: 4.2.0 + broccoli-middleware: 2.1.1 + broccoli-slow-trees: 3.1.0 + broccoli-source: 3.0.1 + broccoli-stew: 3.0.0 + calculate-cache-key-for-tree: 2.0.0 + capture-exit: 2.0.0 + chalk: 4.1.2 + ci-info: 3.9.0 + clean-base-url: 1.0.0 + compression: 1.7.4 + configstore: 5.0.1 + console-ui: 3.1.2 + core-object: 3.1.5 + dag-map: 2.0.2 + diff: 5.2.0 + ember-cli-is-package-missing: 1.0.0 + ember-cli-lodash-subset: 2.0.1 + ember-cli-normalize-entity-name: 1.0.0 + ember-cli-preprocess-registry: 3.3.0 + ember-cli-string-utils: 1.1.0 + ensure-posix-path: 1.1.1 + execa: 5.1.1 + exit: 0.1.2 + express: 4.19.2 + filesize: 10.1.2 + find-up: 5.0.0 + find-yarn-workspace-root: 2.0.0 + fixturify-project: 2.1.1 + fs-extra: 11.2.0 + fs-tree-diff: 2.0.1 + get-caller-file: 2.0.5 + git-repo-info: 2.1.1 + glob: 8.1.0 + heimdalljs: 0.2.6 + heimdalljs-fs-monitor: 1.1.1 + heimdalljs-graph: 1.0.0 + heimdalljs-logger: 0.1.10 + http-proxy: 1.18.1 + inflection: 2.0.1 + inquirer: 8.2.6 + is-git-url: 1.0.0 + is-language-code: 3.1.0 + isbinaryfile: 5.0.2 + js-yaml: 4.1.0 + leek: 0.0.24 + lodash: 4.17.21 + markdown-it: 13.0.2 + markdown-it-terminal: 0.4.0(markdown-it@13.0.2) + minimatch: 7.4.6 + morgan: 1.10.0 + nopt: 3.0.6 + npm-package-arg: 10.1.0 + os-locale: 5.0.0 + p-defer: 3.0.0 + portfinder: 1.0.32 + promise-map-series: 0.3.0 + promise.hash.helper: 1.0.8 + quick-temp: 0.1.8 + remove-types: 1.0.0 + resolve: 1.22.8 + resolve-package-path: 4.0.3 + safe-stable-stringify: 2.4.3 + sane: 5.0.1 + semver: 7.6.2 + silent-error: 1.1.1 + sort-package-json: 1.57.0 + symlink-or-copy: 1.3.1 + temp: 0.9.4 + testem: 3.14.0(babel-core@6.26.3)(handlebars@4.7.8)(lodash@4.17.21)(underscore@1.13.6) + tiny-lr: 2.0.0 + tree-sync: 2.1.0 + uuid: 9.0.1 + walk-sync: 3.0.0 + watch-detector: 1.0.2 + workerpool: 6.5.1 + yam: 1.0.0 + transitivePeerDependencies: + - arc-templates + - atpl + - babel-core + - bracket-template + - bufferutil + - coffee-script + - debug + - dot + - dust + - dustjs-helpers + - dustjs-linkedin + - eco + - ect + - ejs + - haml-coffee + - hamlet + - hamljs + - handlebars + - hogan.js + - htmling + - jade + - jazz + - jqtpl + - just + - liquid-node + - liquor + - marko + - mote + - nunjucks + - plates + - pug + - qejs + - ractive + - razor-tmpl + - react + - react-dom + - slm + - squirrelly + - supports-color + - swig + - swig-templates + - teacup + - templayed + - then-jade + - then-pug + - tinyliquid + - toffee + - twig + - twing + - underscore + - utf-8-validate + - vash + - velocityjs + - walrus + - whiskers + ember-cli@5.10.0-beta.0(babel-core@6.26.3)(handlebars@4.7.8)(underscore@1.13.6): dependencies: '@pnpm/find-workspace-dir': 6.0.3 @@ -15219,34 +15268,6 @@ snapshots: - '@babel/core' - supports-color - ember-data@5.3.8(@ember/string@3.1.1)(@ember/test-helpers@3.3.0(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1))(webpack@5.92.1))(@ember/test-waiters@3.1.0)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1))(qunit@2.21.0): - dependencies: - '@ember-data/adapter': 5.3.8(@ember-data/legacy-compat@5.3.8(kxjtz5whh7zco27l2dp4yt4lsa))(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/debug': 5.3.8(@ember-data/model@5.3.8(5zp7jzwp7kvduzcfpvskyipsfy))(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/graph': 5.3.8(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/json-api': 5.3.8(@ember-data/graph@5.3.8(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/legacy-compat': 5.3.8(kxjtz5whh7zco27l2dp4yt4lsa) - '@ember-data/model': 5.3.8(5zp7jzwp7kvduzcfpvskyipsfy) - '@ember-data/request': 5.3.8(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/request-utils': 5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/serializer': 5.3.8(@ember-data/legacy-compat@5.3.8(kxjtz5whh7zco27l2dp4yt4lsa))(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/store@5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11))(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/store': 5.3.8(@ember-data/request-utils@5.3.8(@ember/string@3.1.1)(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/request@5.3.8(@warp-drive/core-types@0.0.0-beta.11))(@ember-data/tracking@5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)))(@warp-drive/core-types@0.0.0-beta.11) - '@ember-data/tracking': 5.3.8(@warp-drive/core-types@0.0.0-beta.11)(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)) - '@ember/edition-utils': 1.2.0 - '@embroider/macros': 1.16.5 - '@warp-drive/build-config': 0.0.0-beta.6 - '@warp-drive/core-types': 0.0.0-beta.11 - optionalDependencies: - '@ember/test-helpers': 3.3.0(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1))(webpack@5.92.1) - '@ember/test-waiters': 3.1.0 - qunit: 2.21.0 - transitivePeerDependencies: - - '@ember/string' - - '@glint/template' - - ember-inflector - - ember-source - - supports-color - ember-destroyable-polyfill@2.0.3(@babel/core@7.24.7): dependencies: ember-cli-babel: 7.26.11 @@ -15298,6 +15319,16 @@ snapshots: - '@babel/core' - supports-color + ember-modifier@4.1.0(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1)): + dependencies: + '@embroider/addon-shim': 1.8.9 + ember-cli-normalize-entity-name: 1.0.0 + ember-cli-string-utils: 1.1.0 + optionalDependencies: + ember-source: 4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1) + transitivePeerDependencies: + - supports-color + ember-modifier@4.1.0(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)): dependencies: '@embroider/addon-shim': 1.8.9 @@ -15314,6 +15345,14 @@ snapshots: transitivePeerDependencies: - supports-color + ember-page-title@8.2.3(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1)): + dependencies: + '@embroider/addon-shim': 1.8.9 + '@simple-dom/document': 1.4.0 + ember-source: 4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1) + transitivePeerDependencies: + - supports-color + ember-page-title@8.2.3(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)): dependencies: '@embroider/addon-shim': 1.8.9 @@ -15340,6 +15379,19 @@ snapshots: - webpack-cli - webpack-command + ember-qunit@8.1.0(@ember/test-helpers@3.3.0(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1))(webpack@5.92.1))(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1))(qunit@2.21.0): + dependencies: + '@ember/test-helpers': 3.3.0(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1))(webpack@5.92.1) + '@embroider/addon-shim': 1.8.9 + '@embroider/macros': 1.16.5 + ember-cli-test-loader: 3.1.0 + ember-source: 4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1) + qunit: 2.21.0 + qunit-theme-ember: 1.0.0 + transitivePeerDependencies: + - '@glint/template' + - supports-color + ember-qunit@8.1.0(@ember/test-helpers@3.3.0(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1))(webpack@5.92.1))(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1))(qunit@2.21.0): dependencies: '@ember/test-helpers': 3.3.0(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1))(webpack@5.92.1) @@ -15353,6 +15405,14 @@ snapshots: - '@glint/template' - supports-color + ember-resolver@11.0.1(ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1)): + dependencies: + ember-cli-babel: 7.26.11 + optionalDependencies: + ember-source: 4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1) + transitivePeerDependencies: + - supports-color + ember-resolver@11.0.1(ember-source@5.9.0(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1)): dependencies: ember-cli-babel: 7.26.11 @@ -15519,6 +15579,42 @@ snapshots: - '@babel/core' - supports-color + ember-source@4.12.4(@babel/core@7.24.7)(@glimmer/component@1.1.2(@babel/core@7.24.7))(webpack@5.92.1): + dependencies: + '@babel/helper-module-imports': 7.24.7(supports-color@8.1.1) + '@babel/plugin-transform-block-scoping': 7.24.7(@babel/core@7.24.7) + '@ember/edition-utils': 1.2.0 + '@glimmer/component': 1.1.2(@babel/core@7.24.7) + '@glimmer/vm-babel-plugins': 0.84.2(@babel/core@7.24.7) + '@simple-dom/interface': 1.4.0 + babel-plugin-debug-macros: 0.3.4(@babel/core@7.24.7) + babel-plugin-filter-imports: 4.0.0 + broccoli-concat: 4.2.5 + broccoli-debug: 0.6.5 + broccoli-file-creator: 2.1.1 + broccoli-funnel: 3.0.8 + broccoli-merge-trees: 4.2.0 + chalk: 4.1.2 + ember-auto-import: 2.7.4(webpack@5.92.1) + ember-cli-babel: 7.26.11 + ember-cli-get-component-path-option: 1.0.0 + ember-cli-is-package-missing: 1.0.0 + ember-cli-normalize-entity-name: 1.0.0 + ember-cli-path-utils: 1.0.0 + ember-cli-string-utils: 1.1.0 + ember-cli-typescript-blueprint-polyfill: 0.1.0 + ember-cli-version-checker: 5.1.2 + ember-router-generator: 2.0.0 + inflection: 1.13.4 + resolve: 1.22.8 + semver: 7.6.2 + silent-error: 1.1.1 + transitivePeerDependencies: + - '@babel/core' + - '@glint/template' + - supports-color + - webpack + ember-source@5.10.0-alpha.4(@glimmer/component@1.1.2(@babel/core@7.24.7))(rsvp@4.8.5)(webpack@5.92.1): dependencies: '@babel/core': 7.24.7 @@ -17411,8 +17507,6 @@ snapshots: inflection@2.0.1: {} - inflection@3.0.0: {} - inflight@1.0.6: dependencies: once: 1.4.0 @@ -17464,6 +17558,24 @@ snapshots: strip-ansi: 6.0.1 through: 2.3.8 + inquirer@8.2.6: + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.1 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 6.2.0 + inquirer@9.2.23: dependencies: '@inquirer/figures': 1.0.3 @@ -20841,6 +20953,8 @@ snapshots: uuid@8.3.2: {} + uuid@9.0.1: {} + v8-compile-cache@2.4.0: {} validate-npm-package-license@3.0.4: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index e269d687..076ff8fb 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,5 @@ packages: - '.' - 'test-app-3.x' + - 'test-app-4.x' - 'test-app-5.x' diff --git a/test-app-3.x/package.json b/test-app-3.x/package.json index e374caaa..cc1b1421 100644 --- a/test-app-3.x/package.json +++ b/test-app-3.x/package.json @@ -2,7 +2,7 @@ "name": "test-app-3.x", "private": true, "version": "1.0.0", - "description": "Test suite for ember-moment", + "description": "Test suite for ember-moment with ember-source 3.x", "license": "MIT", "scripts": { "build": "ember build --environment=production", diff --git a/test-app-4.x/.editorconfig b/test-app-4.x/.editorconfig new file mode 100644 index 00000000..c35a0024 --- /dev/null +++ b/test-app-4.x/.editorconfig @@ -0,0 +1,19 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +[*.hbs] +insert_final_newline = false + +[*.{diff,md}] +trim_trailing_whitespace = false diff --git a/test-app-4.x/.ember-cli b/test-app-4.x/.ember-cli new file mode 100644 index 00000000..465c4050 --- /dev/null +++ b/test-app-4.x/.ember-cli @@ -0,0 +1,7 @@ +{ + /** + Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript + rather than JavaScript by default, when a TypeScript version of a given blueprint is available. + */ + "isTypeScriptProject": false +} diff --git a/test-app-4.x/.eslintignore b/test-app-4.x/.eslintignore new file mode 100644 index 00000000..768fab33 --- /dev/null +++ b/test-app-4.x/.eslintignore @@ -0,0 +1,14 @@ +# unconventional js +/blueprints/*/files/ + +# compiled output +/declarations/ +/dist/ + +# misc +/coverage/ +!.* +.*/ + +# ember-try +/.node_modules.ember-try/ diff --git a/test-app-4.x/.eslintrc.js b/test-app-4.x/.eslintrc.js new file mode 100644 index 00000000..25ceaab4 --- /dev/null +++ b/test-app-4.x/.eslintrc.js @@ -0,0 +1,56 @@ +'use strict'; + +module.exports = { + root: true, + parser: '@babel/eslint-parser', + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + requireConfigFile: false, + babelOptions: { + plugins: [ + ['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }], + ], + }, + }, + plugins: ['ember'], + extends: [ + 'eslint:recommended', + 'plugin:ember/recommended', + 'plugin:prettier/recommended', + ], + env: { + browser: true, + }, + rules: {}, + overrides: [ + // node files + { + files: [ + './.eslintrc.js', + './.prettierrc.js', + './.stylelintrc.js', + './.template-lintrc.js', + './ember-cli-build.js', + './testem.js', + './blueprints/*/index.js', + './config/**/*.js', + './lib/*/index.js', + './server/**/*.js', + ], + parserOptions: { + sourceType: 'script', + }, + env: { + browser: false, + node: true, + }, + extends: ['plugin:n/recommended'], + }, + { + // test files + files: ['tests/**/*-test.{js,ts}'], + extends: ['plugin:qunit/recommended'], + }, + ], +}; diff --git a/test-app-4.x/.gitignore b/test-app-4.x/.gitignore new file mode 100644 index 00000000..71ad79d0 --- /dev/null +++ b/test-app-4.x/.gitignore @@ -0,0 +1,25 @@ +# compiled output +/dist/ +/declarations/ + +# dependencies +/node_modules/ + +# misc +/.env* +/.pnp* +/.eslintcache +/coverage/ +/npm-debug.log* +/testem.log +/yarn-error.log + +# ember-try +/.node_modules.ember-try/ +/npm-shrinkwrap.json.ember-try +/package.json.ember-try +/package-lock.json.ember-try +/yarn.lock.ember-try + +# broccoli-debug +/DEBUG/ diff --git a/test-app-4.x/.prettierignore b/test-app-4.x/.prettierignore new file mode 100644 index 00000000..9385391f --- /dev/null +++ b/test-app-4.x/.prettierignore @@ -0,0 +1,13 @@ +# unconventional js +/blueprints/*/files/ + +# compiled output +/dist/ + +# misc +/coverage/ +!.* +.*/ + +# ember-try +/.node_modules.ember-try/ diff --git a/test-app-4.x/.prettierrc.js b/test-app-4.x/.prettierrc.js new file mode 100644 index 00000000..e5f7b6d1 --- /dev/null +++ b/test-app-4.x/.prettierrc.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = { + overrides: [ + { + files: '*.{js,ts}', + options: { + singleQuote: true, + }, + }, + ], +}; diff --git a/test-app-4.x/.stylelintignore b/test-app-4.x/.stylelintignore new file mode 100644 index 00000000..a0cf71cb --- /dev/null +++ b/test-app-4.x/.stylelintignore @@ -0,0 +1,8 @@ +# unconventional files +/blueprints/*/files/ + +# compiled output +/dist/ + +# addons +/.node_modules.ember-try/ diff --git a/test-app-4.x/.stylelintrc.js b/test-app-4.x/.stylelintrc.js new file mode 100644 index 00000000..021c539a --- /dev/null +++ b/test-app-4.x/.stylelintrc.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'], +}; diff --git a/test-app-4.x/.template-lintrc.js b/test-app-4.x/.template-lintrc.js new file mode 100644 index 00000000..f35f61c7 --- /dev/null +++ b/test-app-4.x/.template-lintrc.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + extends: 'recommended', +}; diff --git a/test-app-4.x/.watchmanconfig b/test-app-4.x/.watchmanconfig new file mode 100644 index 00000000..f9c3d8f8 --- /dev/null +++ b/test-app-4.x/.watchmanconfig @@ -0,0 +1,3 @@ +{ + "ignore_dirs": ["dist"] +} diff --git a/test-app-4.x/README.md b/test-app-4.x/README.md new file mode 100644 index 00000000..5e64515b --- /dev/null +++ b/test-app-4.x/README.md @@ -0,0 +1,57 @@ +# test-app-4.x + +This README outlines the details of collaborating on this Ember application. +A short introduction of this app could easily go here. + +## Prerequisites + +You will need the following things properly installed on your computer. + +- [Git](https://git-scm.com/) +- [Node.js](https://nodejs.org/) +- [pnpm](https://pnpm.io/) +- [Ember CLI](https://cli.emberjs.com/release/) +- [Google Chrome](https://google.com/chrome/) + +## Installation + +- `git clone ` this repository +- `cd test-app-4.x` +- `pnpm install` + +## Running / Development + +- `pnpm start` +- Visit your app at [http://localhost:4200](http://localhost:4200). +- Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests). + +### Code Generators + +Make use of the many generators for code, try `ember help generate` for more details + +### Running Tests + +- `pnpm test` +- `pnpm test:ember --server` + +### Linting + +- `pnpm lint` +- `pnpm lint:fix` + +### Building + +- `pnpm ember build` (development) +- `pnpm build` (production) + +### Deploying + +Specify what it takes to deploy your app. + +## Further Reading / Useful Links + +- [ember.js](https://emberjs.com/) +- [ember-cli](https://cli.emberjs.com/release/) +- Development Browser Extensions + - [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) + - [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) diff --git a/test-app-4.x/app/app.js b/test-app-4.x/app/app.js new file mode 100644 index 00000000..d421d86f --- /dev/null +++ b/test-app-4.x/app/app.js @@ -0,0 +1,12 @@ +import Application from '@ember/application'; +import Resolver from 'ember-resolver'; +import loadInitializers from 'ember-load-initializers'; +import config from 'test-app-4.x/config/environment'; + +export default class App extends Application { + modulePrefix = config.modulePrefix; + podModulePrefix = config.podModulePrefix; + Resolver = Resolver; +} + +loadInitializers(App, config.modulePrefix); diff --git a/test-app-4.x/app/components/.gitkeep b/test-app-4.x/app/components/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-app-4.x/app/controllers/.gitkeep b/test-app-4.x/app/controllers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-app-4.x/app/controllers/index.js b/test-app-4.x/app/controllers/index.js new file mode 100644 index 00000000..c04a32ce --- /dev/null +++ b/test-app-4.x/app/controllers/index.js @@ -0,0 +1,37 @@ +import { action, set } from '@ember/object'; +import { dependentKeyCompat } from '@ember/object/compat'; +import { tracked } from '@glimmer/tracking'; +import { inject as service } from '@ember/service'; +import Controller from '@ember/controller'; + +export default class Index extends Controller { + @service moment; + + @action + changeLocale(locale) { + this.moment.changeLocale(locale); + } + @action + changeDefaultFormat(defaultFormat) { + set(this, 'moment.defaultFormat', defaultFormat); + } + + @tracked emptyDate = null; + @tracked numHours = 822; + @tracked unixTimeStamp = 946684799; + @tracked date = new Date(); + @tracked currentTime = new Date(); + + get inTwelveHours() { + return new Date(new Date().valueOf() + 12 * 60 * 60 * 1000); + } + + @dependentKeyCompat + get lastHour() { + return new Date(new Date().valueOf() - 60 * 60 * 1000); + } + + get usIndependenceDay() { + return new Date(1776, 6, 4, 12, 0, 0); + } +} diff --git a/test-app-4.x/app/controllers/smoke.js b/test-app-4.x/app/controllers/smoke.js new file mode 100644 index 00000000..d95a9ecd --- /dev/null +++ b/test-app-4.x/app/controllers/smoke.js @@ -0,0 +1,11 @@ +import Controller from '@ember/controller'; + +export default class Smoke extends Controller { + get currentTime() { + return new Date(); + } + + get usIndependenceDay() { + return new Date(1776, 6, 4, 12, 0, 0); + } +} diff --git a/test-app-4.x/app/helpers/.gitkeep b/test-app-4.x/app/helpers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-app-4.x/app/index.html b/test-app-4.x/app/index.html new file mode 100644 index 00000000..7f8dc903 --- /dev/null +++ b/test-app-4.x/app/index.html @@ -0,0 +1,24 @@ + + + + + TestApp + + + + {{content-for "head"}} + + + + + {{content-for "head-footer"}} + + + {{content-for "body"}} + + + + + {{content-for "body-footer"}} + + diff --git a/test-app-4.x/app/models/.gitkeep b/test-app-4.x/app/models/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-app-4.x/app/router.js b/test-app-4.x/app/router.js new file mode 100644 index 00000000..cbea8770 --- /dev/null +++ b/test-app-4.x/app/router.js @@ -0,0 +1,12 @@ +import EmberRouter from '@ember/routing/router'; +import config from 'test-app-4.x/config/environment'; + +export default class Router extends EmberRouter { + location = config.locationType; + rootURL = config.rootURL; +} + +Router.map(function () { + this.route('index', { path: '/' }); + this.route('smoke'); +}); diff --git a/test-app-4.x/app/routes/.gitkeep b/test-app-4.x/app/routes/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-app-4.x/app/routes/application.js b/test-app-4.x/app/routes/application.js new file mode 100644 index 00000000..2f8aeeb4 --- /dev/null +++ b/test-app-4.x/app/routes/application.js @@ -0,0 +1,10 @@ +import Route from '@ember/routing/route'; +import { inject as service } from '@ember/service'; + +export default class Application extends Route { + @service moment; + + beforeModel() { + this.moment.changeLocale('en'); + } +} diff --git a/test-app-4.x/app/routes/index.js b/test-app-4.x/app/routes/index.js new file mode 100644 index 00000000..598979c8 --- /dev/null +++ b/test-app-4.x/app/routes/index.js @@ -0,0 +1,22 @@ +import Route from '@ember/routing/route'; +import { inject as service } from '@ember/service'; +import { set } from '@ember/object'; +import { run } from '@ember/runloop'; + +export default class Index extends Route { + @service moment; + + beforeModel() { + set(this, 'moment.locale', 'en'); + } + + setupController(controller, model) { + super.setupController(controller, model); + + setInterval(function () { + run(function () { + controller.set('date', new Date()); + }); + }, 1000); + } +} diff --git a/test-app-4.x/app/routes/smoke.js b/test-app-4.x/app/routes/smoke.js new file mode 100644 index 00000000..2a8486c3 --- /dev/null +++ b/test-app-4.x/app/routes/smoke.js @@ -0,0 +1,9 @@ +import Route from '@ember/routing/route'; +import moment from 'moment-timezone'; + +export default class Smoke extends Route { + setupController(controller, model) { + moment.locale('en'); + return super.setupController(controller, model); + } +} diff --git a/test-app-4.x/app/styles/app.css b/test-app-4.x/app/styles/app.css new file mode 100644 index 00000000..1797297a --- /dev/null +++ b/test-app-4.x/app/styles/app.css @@ -0,0 +1,18 @@ +/* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */ + +html, body { + margin: 20px; + font-family: Helvetica, sans-serif; + font-size: 14px; +} + +.example { + padding: 5px; + margin: 2px 0; + background: #f1f1f1; +} + +code { + color: #333; + font-size: 13px; +} diff --git a/test-app-4.x/app/templates/application.hbs b/test-app-4.x/app/templates/application.hbs new file mode 100644 index 00000000..abb003e1 --- /dev/null +++ b/test-app-4.x/app/templates/application.hbs @@ -0,0 +1,5 @@ +{{page-title "ember-moment"}} + +

ember-moment

+ +{{outlet}} diff --git a/test-app-4.x/app/templates/components/partials/calendar.hbs b/test-app-4.x/app/templates/components/partials/calendar.hbs new file mode 100644 index 00000000..0fa54f0e --- /dev/null +++ b/test-app-4.x/app/templates/components/partials/calendar.hbs @@ -0,0 +1,6 @@ +
+ {{moment-calendar this.currentTime this.lastHour}} + + \{{moment-calendar this.currentTime this.lastHour}} + +
\ No newline at end of file diff --git a/test-app-4.x/app/templates/components/partials/diff.hbs b/test-app-4.x/app/templates/components/partials/diff.hbs new file mode 100644 index 00000000..b8878cfa --- /dev/null +++ b/test-app-4.x/app/templates/components/partials/diff.hbs @@ -0,0 +1,36 @@ +
+ {{moment-diff this.lastHour this.currentTime}} + + \{{moment-diff this.lastHour this.currentTime}} + +
+ +
+ {{moment-diff this.currentTime this.inTwelveHours precision='hour'}} + + \{{moment-diff this.currentTime this.inTwelveHours precision='hour'}} + +
+ +
+ {{moment-diff this.currentTime this.inTwelveHours precision='day' float=true}} + + {{! template linter bug: https://github.com/ember-template-lint/ember-template-lint/issues/2330 }} + {{! template-lint-disable no-unbalanced-curlies}} + \{{moment-diff this.currentTime this.inTwelveHours precision='day' float=true}} + +
+ +
+ {{moment-diff this.usIndependenceDay this.currentTime precision='year'}} + + \{{moment-diff this.usIndependenceDay this.currentTime precision='year'}} + +
+ +
+ {{moment-diff this.currentTime this.usIndependenceDay precision='year'}} + + \{{moment-diff this.currentTime this.usIndependenceDay precision='year'}} + +
\ No newline at end of file diff --git a/test-app-4.x/app/templates/components/partials/duration.hbs b/test-app-4.x/app/templates/components/partials/duration.hbs new file mode 100644 index 00000000..98490f42 --- /dev/null +++ b/test-app-4.x/app/templates/components/partials/duration.hbs @@ -0,0 +1,34 @@ +
+{{moment-duration 5000}} + + \{{moment-duration 5000}} + +
+ +
+{{moment-duration 600000}} + + \{{moment-duration 600000}} + +
+ +
+{{moment-duration 86400000}} + + \{{moment-duration 86400000}} + +
+ +
+{{moment-duration '7.23:59:59'}} + + \{{moment-duration '7.23:59:59'}} + +
+ +
+{{moment-duration 210 'days'}} + + \{{moment-duration 210 'days'}} + +
diff --git a/test-app-4.x/app/templates/components/partials/format.hbs b/test-app-4.x/app/templates/components/partials/format.hbs new file mode 100644 index 00000000..5fdaaaf7 --- /dev/null +++ b/test-app-4.x/app/templates/components/partials/format.hbs @@ -0,0 +1,69 @@ +
+ {{moment-format (moment this.currentTime) 'LLLL'}} + + \{{moment-format (moment this.currentTime) 'LLLL'}} + +
+ +
+ {{moment-format (moment this.currentTime) 'LLLL'}} + + \{{moment-format (moment this.currentTime) 'LLLL'}} + +
+ +
+ {{moment-format (moment '123' 'hmm') 'HH:mm'}} + + \{{moment-format (moment '123' 'hmm') 'HH:mm'}} + +
+ +
+ {{moment-format (now interval=1000) 'MMMM Do YYYY, h:mm:ss a'}} + + \{{moment-format (now interval=1000) 'MMMM Do YYYY, h:mm:ss a'}} + +
+ +
+ {{moment-format (moment this.currentTime)}} + + \{{moment-format (moment this.currentTime)}} + +
+ +
+ {{moment-format (moment this.usIndependenceDay) 'LLLL'}} + + \{{moment-format (moment this.usIndependenceDay) 'LLLL'}} + +
+ +
+ {{moment-format (utc (moment this.usIndependenceDay)) 'LLLL'}} + + \{{moment-format (utc (moment this.usIndependenceDay)) 'LLLL'}} + +
+ +
+ {{moment-format (moment this.usIndependenceDay) 'MMM DD, YYYY'}} + + \{{moment-format (moment this.usIndependenceDay) 'MMM DD, YYYY'}} + +
+ +
+ {{moment-format (moment this.currentTime) 'LL' 'LLLL'}} + + \{{moment-format (moment this.currentTime) 'LL' 'LLLL'}} + +
+ +
+ {{moment-format (unix this.unixTimeStamp) 'LL' 'LLLL'}} + + \{{moment-format (unix this.unixTimeStamp) 'LL' 'LLLL'}} + +
\ No newline at end of file diff --git a/test-app-4.x/app/templates/components/partials/from-now.hbs b/test-app-4.x/app/templates/components/partials/from-now.hbs new file mode 100644 index 00000000..1eac6209 --- /dev/null +++ b/test-app-4.x/app/templates/components/partials/from-now.hbs @@ -0,0 +1,20 @@ +
+ {{moment-from-now this.currentTime}} + + \{{moment-from-now this.currentTime}} + +
+ +
+ {{moment-from-now this.currentTime interval=1000}} + + \{{moment-from-now this.currentTime interval=1000}} + +
+ +
+ {{moment-from-now this.usIndependenceDay}} + + \{{moment-from-now this.usIndependenceDay}} + +
\ No newline at end of file diff --git a/test-app-4.x/app/templates/components/partials/moment.hbs b/test-app-4.x/app/templates/components/partials/moment.hbs new file mode 100644 index 00000000..4c01d2f0 --- /dev/null +++ b/test-app-4.x/app/templates/components/partials/moment.hbs @@ -0,0 +1,41 @@ +
+ {{moment this.currentTime}} + + \{{moment this.currentTime}} + +
+ +
+ {{moment (now interval=1000)}} + + \{{moment (now interval=1000)}} + +
+ +
+ {{moment '12-25-1995' 'MM-DD-YYYY'}} + + \{{moment '12-25-1995' 'MM-DD-YYYY'}} + +
+ +
+ {{utc '12-25-1995 23:45:21' 'MM-DD-YYYY HH:mm:ss'}} + + \{{utc '12-25-1995 23:45:21' 'MM-DD-YYYY HH:mm:ss'}} + +
+ +
+ {{utc interval=1000}} + + \{{utc interval=1000}} + +
+ +
+ {{utc (moment this.now)}} + + \{{utc (moment this.now)}} + +
\ No newline at end of file diff --git a/test-app-4.x/app/templates/components/partials/to-now.hbs b/test-app-4.x/app/templates/components/partials/to-now.hbs new file mode 100644 index 00000000..ff3c6d93 --- /dev/null +++ b/test-app-4.x/app/templates/components/partials/to-now.hbs @@ -0,0 +1,20 @@ +
+ {{moment-to-now this.currentTime}} + + \{{moment-to-now this.currentTime}} + +
+ +
+ {{moment-to-now this.currentTime interval=1000}} + + \{{moment-to-now this.currentTime interval=1000}} + +
+ +
+ {{moment-to-now this.usIndependenceDay}} + + \{{moment-to-now this.usIndependenceDay}} + +
\ No newline at end of file diff --git a/test-app-4.x/app/templates/index.hbs b/test-app-4.x/app/templates/index.hbs new file mode 100644 index 00000000..1193600e --- /dev/null +++ b/test-app-4.x/app/templates/index.hbs @@ -0,0 +1,51 @@ +Locale: + + + + +
+Default Format: + + + + +
+ +

Moment

+ + + +

Format

+ + + +
+ +

From Now

+ + + +

To Now

+ + + +
+ +

Calendar

+ + + +
+ +

Duration

+ + + +
+ +

Difference

+ + \ No newline at end of file diff --git a/test-app-4.x/app/templates/smoke.hbs b/test-app-4.x/app/templates/smoke.hbs new file mode 100644 index 00000000..4643a4b3 --- /dev/null +++ b/test-app-4.x/app/templates/smoke.hbs @@ -0,0 +1,6 @@ +
{{moment-format + this.usIndependenceDay + 'MMM DD, YYYY' + }}
+
{{moment-from-now this.currentTime}}
+
{{moment-duration 420000}}
\ No newline at end of file diff --git a/test-app-4.x/config/ember-cli-update.json b/test-app-4.x/config/ember-cli-update.json new file mode 100644 index 00000000..f8ced50c --- /dev/null +++ b/test-app-4.x/config/ember-cli-update.json @@ -0,0 +1,22 @@ +{ + "schemaVersion": "1.0.0", + "packages": [ + { + "name": "ember-cli", + "version": "5.9.0", + "blueprints": [ + { + "name": "app", + "outputRepo": "https://github.com/ember-cli/ember-new-output", + "codemodsSource": "ember-app-codemods-manifest@1", + "isBaseBlueprint": true, + "options": [ + "--no-welcome", + "--pnpm", + "--ci-provider=travis" + ] + } + ] + } + ] +} diff --git a/test-app-4.x/config/ember-try.js b/test-app-4.x/config/ember-try.js new file mode 100644 index 00000000..973ca16a --- /dev/null +++ b/test-app-4.x/config/ember-try.js @@ -0,0 +1,54 @@ +'use strict'; + +const getChannelURL = require('ember-source-channel-url'); +const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup'); + +module.exports = async function () { + return { + usePnpm: true, + scenarios: [ + { + name: 'ember-lts-4.12', + npm: { + devDependencies: { + 'ember-source': '~4.12.0', + }, + }, + }, + { + name: 'ember-lts-5.4', + npm: { + devDependencies: { + 'ember-source': '~5.4.0', + }, + }, + }, + { + name: 'ember-release', + npm: { + devDependencies: { + 'ember-source': await getChannelURL('release'), + }, + }, + }, + { + name: 'ember-beta', + npm: { + devDependencies: { + 'ember-source': await getChannelURL('beta'), + }, + }, + }, + { + name: 'ember-canary', + npm: { + devDependencies: { + 'ember-source': await getChannelURL('canary'), + }, + }, + }, + embroiderSafe(), + embroiderOptimized(), + ], + }; +}; diff --git a/test-app-4.x/config/environment.js b/test-app-4.x/config/environment.js new file mode 100644 index 00000000..e8977b5f --- /dev/null +++ b/test-app-4.x/config/environment.js @@ -0,0 +1,52 @@ +'use strict'; + +module.exports = function (environment) { + const ENV = { + modulePrefix: 'test-app-4.x', + environment, + rootURL: '/', + locationType: 'history', + 'ember-moment': { + allowEmpty: true, + outputFormat: 'LLLL', + }, + EmberENV: { + EXTEND_PROTOTYPES: false, + FEATURES: { + // Here you can enable experimental features on an ember canary build + // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true + }, + }, + + APP: { + // Here you can pass flags/options to your application instance + // when it is created + }, + }; + + if (environment === 'development') { + // ENV.APP.LOG_RESOLVER = true; + // ENV.APP.LOG_ACTIVE_GENERATION = true; + // ENV.APP.LOG_TRANSITIONS = true; + // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; + // ENV.APP.LOG_VIEW_LOOKUPS = true; + } + + if (environment === 'test') { + // Testem prefers this... + ENV.locationType = 'none'; + + // keep test console output quieter + ENV.APP.LOG_ACTIVE_GENERATION = false; + ENV.APP.LOG_VIEW_LOOKUPS = false; + + ENV.APP.rootElement = '#ember-testing'; + ENV.APP.autoboot = false; + } + + if (environment === 'production') { + // here you can enable a production-specific feature + } + + return ENV; +}; diff --git a/test-app-4.x/config/optional-features.json b/test-app-4.x/config/optional-features.json new file mode 100644 index 00000000..5329dd99 --- /dev/null +++ b/test-app-4.x/config/optional-features.json @@ -0,0 +1,7 @@ +{ + "application-template-wrapper": false, + "default-async-observers": true, + "jquery-integration": false, + "template-only-glimmer-components": true, + "no-implicit-route-model": true +} diff --git a/test-app-4.x/config/targets.js b/test-app-4.x/config/targets.js new file mode 100644 index 00000000..1e48e059 --- /dev/null +++ b/test-app-4.x/config/targets.js @@ -0,0 +1,11 @@ +'use strict'; + +const browsers = [ + 'last 1 Chrome versions', + 'last 1 Firefox versions', + 'last 1 Safari versions', +]; + +module.exports = { + browsers, +}; diff --git a/test-app-4.x/ember-cli-build.js b/test-app-4.x/ember-cli-build.js new file mode 100644 index 00000000..1344c767 --- /dev/null +++ b/test-app-4.x/ember-cli-build.js @@ -0,0 +1,26 @@ +'use strict'; + +const EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +module.exports = function (defaults) { + let app = new EmberApp(defaults, { + autoImport: { + watchDependencies: ['ember-moment'], + }, + }); + + const { maybeEmbroider } = require('@embroider/test-setup'); + return maybeEmbroider(app, { + skipBabel: [ + { + package: 'qunit', + }, + { + package: 'moment', + }, + { + package: 'moment-timezone', + }, + ], + }); +}; diff --git a/test-app-4.x/package.json b/test-app-4.x/package.json new file mode 100644 index 00000000..bc619ed2 --- /dev/null +++ b/test-app-4.x/package.json @@ -0,0 +1,83 @@ +{ + "name": "test-app-4.x", + "version": "0.0.0", + "private": true, + "description": "Test app for ember-moment addon with ember-source 4.x", + "repository": "", + "license": "MIT", + "author": "", + "directories": { + "doc": "doc", + "test": "tests" + }, + "scripts": { + "build": "ember build --environment=production", + "lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"", + "lint:css": "stylelint \"**/*.css\"", + "lint:css:fix": "concurrently \"pnpm:lint:css -- --fix\"", + "lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\"", + "lint:hbs": "ember-template-lint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", + "start": "ember serve", + "test": "concurrently \"pnpm:lint\" \"pnpm:test:*\" --names \"lint,test:\"", + "test:ember": "ember test" + }, + "devDependencies": { + "@babel/core": "^7.24.7", + "@babel/eslint-parser": "^7.24.7", + "@babel/plugin-proposal-decorators": "^7.24.7", + "@ember/optional-features": "^2.1.0", + "@ember/string": "^3.1.1", + "@ember/test-helpers": "^3.3.0", + "@embroider/test-setup": "^3.0.1", + "@glimmer/component": "^1.1.2", + "@glimmer/tracking": "^1.1.2", + "broccoli-asset-rev": "^3.0.0", + "concurrently": "^8.2.2", + "ember-auto-import": "^2.7.3", + "ember-cli": "~4.12.3", + "ember-cli-app-version": "^6.0.1", + "ember-cli-babel": "^8.2.0", + "ember-cli-clean-css": "^3.0.0", + "ember-cli-dependency-checker": "^3.3.2", + "ember-cli-htmlbars": "^6.3.0", + "ember-cli-inject-live-reload": "^2.1.0", + "ember-cli-sri": "^2.1.1", + "ember-cli-terser": "^4.0.2", + "ember-fetch": "^8.1.2", + "ember-load-initializers": "^2.1.2", + "ember-modifier": "^4.1.0", + "ember-moment": "workspace:*", + "ember-page-title": "^8.2.3", + "ember-qunit": "^8.0.2", + "ember-resolver": "^11.0.1", + "ember-source": "~4.12.4", + "ember-source-channel-url": "^3.0.0", + "ember-template-lint": "^5.13.0", + "ember-try": "^3.0.0", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-ember": "^11.12.0", + "eslint-plugin-n": "^16.6.2", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-qunit": "^8.1.1", + "loader.js": "^4.7.0", + "moment-timezone": "^0.5.45", + "prettier": "^3.3.1", + "qunit": "^2.21.0", + "qunit-dom": "^2.0.0", + "stylelint": "^15.11.0", + "stylelint-config-standard": "^34.0.0", + "stylelint-prettier": "^4.1.0", + "tracked-built-ins": "^3.3.0", + "webpack": "^5.91.0" + }, + "engines": { + "node": ">= 18" + }, + "ember": { + "edition": "octane" + } +} \ No newline at end of file diff --git a/test-app-4.x/public/robots.txt b/test-app-4.x/public/robots.txt new file mode 100644 index 00000000..f5916452 --- /dev/null +++ b/test-app-4.x/public/robots.txt @@ -0,0 +1,3 @@ +# http://www.robotstxt.org +User-agent: * +Disallow: diff --git a/test-app-4.x/testem.js b/test-app-4.x/testem.js new file mode 100644 index 00000000..ed2f3712 --- /dev/null +++ b/test-app-4.x/testem.js @@ -0,0 +1,23 @@ +'use strict'; + +module.exports = { + test_page: 'tests/index.html?hidepassed', + disable_watching: true, + launch_in_ci: ['Chrome'], + launch_in_dev: ['Chrome'], + browser_start_timeout: 120, + browser_args: { + Chrome: { + ci: [ + // --no-sandbox is needed when running Chrome inside a container + process.env.CI ? '--no-sandbox' : null, + '--headless', + '--disable-dev-shm-usage', + '--disable-software-rasterizer', + '--mute-audio', + '--remote-debugging-port=0', + '--window-size=1440,900', + ].filter(Boolean), + }, + }, +}; diff --git a/test-app-4.x/tests/acceptance/smoke-test.js b/test-app-4.x/tests/acceptance/smoke-test.js new file mode 100644 index 00000000..4fc46fc3 --- /dev/null +++ b/test-app-4.x/tests/acceptance/smoke-test.js @@ -0,0 +1,25 @@ +import { module, test } from 'qunit'; +import { visit } from '@ember/test-helpers'; +import { setupApplicationTest } from 'ember-qunit'; + +module('Acceptance: Smoke', function (hooks) { + setupApplicationTest(hooks); + test('moment', async function (assert) { + assert.expect(1); + await visit('/smoke'); + assert.dom('.moment-independence-day').hasText('Jul 04, 1776'); + }); + + test('ago', async function (assert) { + assert.expect(1); + await visit('/smoke'); + + assert.dom('.ago-now').hasText('a few seconds ago'); + }); + + test('duration', async function (assert) { + assert.expect(1); + await visit('/smoke'); + assert.dom('.duration-seven-minutes').hasText('7 minutes'); + }); +}); diff --git a/test-app-4.x/tests/helpers/date.js b/test-app-4.x/tests/helpers/date.js new file mode 100644 index 00000000..0d49090a --- /dev/null +++ b/test-app-4.x/tests/helpers/date.js @@ -0,0 +1,7 @@ +import moment from 'moment-timezone'; + +moment.tz.add(['America/New_York|EST EDT|50 40|0101|1Lz50 1zb0 Op0']); + +export default function (time) { + return moment(new Date(time)).tz('America/New_York'); +} diff --git a/test-app-4.x/tests/helpers/index.js b/test-app-4.x/tests/helpers/index.js new file mode 100644 index 00000000..d37dd680 --- /dev/null +++ b/test-app-4.x/tests/helpers/index.js @@ -0,0 +1,42 @@ +import { + setupApplicationTest as upstreamSetupApplicationTest, + setupRenderingTest as upstreamSetupRenderingTest, + setupTest as upstreamSetupTest, +} from 'ember-qunit'; + +// This file exists to provide wrappers around ember-qunit's +// test setup functions. This way, you can easily extend the setup that is +// needed per test type. + +function setupApplicationTest(hooks, options) { + upstreamSetupApplicationTest(hooks, options); + + // Additional setup for application tests can be done here. + // + // For example, if you need an authenticated session for each + // application test, you could do: + // + // hooks.beforeEach(async function () { + // await authenticateSession(); // ember-simple-auth + // }); + // + // This is also a good place to call test setup functions coming + // from other addons: + // + // setupIntl(hooks); // ember-intl + // setupMirage(hooks); // ember-cli-mirage +} + +function setupRenderingTest(hooks, options) { + upstreamSetupRenderingTest(hooks, options); + + // Additional setup for rendering tests can be done here. +} + +function setupTest(hooks, options) { + upstreamSetupTest(hooks, options); + + // Additional setup for unit tests can be done here. +} + +export { setupApplicationTest, setupRenderingTest, setupTest }; diff --git a/test-app-4.x/tests/helpers/run-append.js b/test-app-4.x/tests/helpers/run-append.js new file mode 100644 index 00000000..6fb7d8fd --- /dev/null +++ b/test-app-4.x/tests/helpers/run-append.js @@ -0,0 +1,13 @@ +import { run } from '@ember/runloop'; + +function runAppend(view) { + run(view, 'appendTo', '#qunit-fixture'); +} + +function runDestroy(destroyed) { + if (destroyed) { + run(destroyed, 'destroy'); + } +} + +export { runAppend, runDestroy }; diff --git a/test-app-4.x/tests/index.html b/test-app-4.x/tests/index.html new file mode 100644 index 00000000..9ebf5100 --- /dev/null +++ b/test-app-4.x/tests/index.html @@ -0,0 +1,39 @@ + + + + + TestApp Tests + + + + {{content-for "head"}} + {{content-for "test-head"}} + + + + + + {{content-for "head-footer"}} + {{content-for "test-head-footer"}} + + + {{content-for "body"}} + {{content-for "test-body"}} + +
+
+
+
+
+
+ + + + + + + + {{content-for "body-footer"}} + {{content-for "test-body-footer"}} + + diff --git a/test-app-4.x/tests/integration/.gitkeep b/test-app-4.x/tests/integration/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-app-4.x/tests/integration/moment-test.js b/test-app-4.x/tests/integration/moment-test.js new file mode 100644 index 00000000..fe8eb01b --- /dev/null +++ b/test-app-4.x/tests/integration/moment-test.js @@ -0,0 +1,115 @@ +import moment from 'moment-timezone'; +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('moment', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.service = this.owner.lookup('service:moment'); + this.service.changeLocale('en'); + }); + + test('moment-from and moment integration', async function (assert) { + assert.expect(1); + + this.set('tomorrow', moment().add(1, 'day')); + await render(hbs`{{moment-from (moment) this.tomorrow}}`); + + assert.dom(this.element).hasText('a day ago'); + }); + + test('moment-to and moment integration', async function (assert) { + assert.expect(1); + + this.set('tomorrow', moment().add(1, 'day')); + await render(hbs`{{moment-to (moment) this.tomorrow}}`); + + assert.dom(this.element).hasText('in a day'); + }); + + test('moment and moment-format helper integration #2', async function (assert) { + assert.expect(1); + + this.setProperties({ + inputFormat: 'M/D/YY', + outputFormat: 'MMMM D, YYYY', + date: '5/3/10', + }); + + await render( + hbs`{{moment-format (moment this.date this.inputFormat) this.outputFormat}}` + ); + assert.dom(this.element).hasText('May 3, 2010'); + }); + + test('moment can use the service locale', async function (assert) { + assert.expect(1); + + this.setProperties({ + inputFormat: 'M/D/YY', + outputFormat: 'MMMM D, YYYY', + date: '5/3/10', + }); + + this.service.changeLocale('fr'); + await render( + hbs`{{moment-format (moment this.date this.inputFormat) this.outputFormat}}` + ); + + assert.dom(this.element).hasText('mai 3, 2010'); + }); + + test('changing moment service locale changes global locale', function (assert) { + const done = assert.async(); + assert.expect(1); + + this.service.on('localeChanged', function () { + assert.equal(moment.locale(), 'es'); + done(); + }); + + this.service.setLocale('es'); + }); + + test('changing timeZone triggers event', function (assert) { + const done = assert.async(); + assert.expect(1); + + this.service.on('timeZoneChanged', function () { + assert.ok(true); + done(); + }); + + this.service.setTimeZone('PST'); + }); + + test('moment can use the service locale (setLocale)', async function (assert) { + assert.expect(1); + + this.setProperties({ + inputFormat: 'M/D/YY', + outputFormat: 'MMMM D, YYYY', + date: '5/3/10', + }); + + this.service.setLocale('fr'); + await render( + hbs`{{moment-format (moment this.date this.inputFormat) this.outputFormat}}` + ); + + assert.dom(this.element).hasText('mai 3, 2010'); + }); + + test('moment can update service locale (updateLocale)', function (assert) { + assert.expect(2); + + this.service.updateLocale('en', { week: { dow: 3 } }); + assert.equal(moment().weekday(0).format('dddd'), 'Wednesday'); + this.service.updateLocale('en', { week: { dow: 0 } }); + assert.equal(moment().weekday(0).format('dddd'), 'Sunday'); + }); +}); diff --git a/test-app-4.x/tests/test-helper.js b/test-app-4.x/tests/test-helper.js new file mode 100644 index 00000000..c7363597 --- /dev/null +++ b/test-app-4.x/tests/test-helper.js @@ -0,0 +1,12 @@ +import Application from 'test-app-4.x/app'; +import config from 'test-app-4.x/config/environment'; +import * as QUnit from 'qunit'; +import { setApplication } from '@ember/test-helpers'; +import { setup } from 'qunit-dom'; +import { start } from 'ember-qunit'; + +setApplication(Application.create(config.APP)); + +setup(QUnit.assert); + +start(); diff --git a/test-app-4.x/tests/unit/.gitkeep b/test-app-4.x/tests/unit/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test-app-4.x/tests/unit/helpers/is-after-test.js b/test-app-4.x/tests/unit/helpers/is-after-test.js new file mode 100644 index 00000000..8b60840a --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/is-after-test.js @@ -0,0 +1,62 @@ +import EmberObject from '@ember/object'; +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('is-after', function (hooks) { + setupRenderingTest(hooks); + + test('one arg (comparisonDate)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + const today = momentService.moment(); + const threeDaysFromNow = today.add(3, 'days'); + const context = EmberObject.create({ + date: threeDaysFromNow, + }); + this.set('context', context); + + await render(hbs`{{is-after this.context.date}}`); + assert.dom(this.element).hasText('false'); + }); + + test('one arg with precision (comparisonDate, precision)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + const today = momentService.moment(); + const threeYearsAgo = today.subtract(3, 'years'); + const context = EmberObject.create({ + date: threeYearsAgo, + }); + this.set('context', context); + + await render(hbs`{{is-after this.context.date precision='year'}}`); + assert.dom(this.element).hasText('true'); + }); + + test('two args (evaluatedDate, comparisonDate)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-after '2010-10-20' '2010-10-19'}}`); + assert.dom(this.element).hasText('true'); + }); + + test('two args with precision (evaluatedDate, comparisonDate, precision)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-after '2010-12-20' '2010-10-19' precision='year'}}`); + assert.dom(this.element).hasText('false'); + }); + + test('can be called with null when allow-empty is set to true', async function (assert) { + assert.expect(1); + + this.set('date', null); + await render(hbs`{{is-after null allow-empty=true}}`); + assert.dom(this.element).hasText(''); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/is-before-test.js b/test-app-4.x/tests/unit/helpers/is-before-test.js new file mode 100644 index 00000000..4d05dd67 --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/is-before-test.js @@ -0,0 +1,45 @@ +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('is-before', function (hooks) { + setupRenderingTest(hooks); + + test('one arg (comparisonDate)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-before '2011-10-19'}}`); + assert.dom(this.element).hasText('false'); + }); + + test('one arg with precision (comparisonDate, precision)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-before '2011-10-19' precision='year'}}`); + assert.dom(this.element).hasText('false'); + }); + + test('two args (evaluatedDate, comparisonDate)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-before '2010-10-20' '2011-10-19'}}`); + assert.dom(this.element).hasText('true'); + }); + + test('two args with precision (evaluatedDate, comparisonDate, precision)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-before '2010-10-20' '2010-12-19' precision='year'}}`); + assert.dom(this.element).hasText('false'); + }); + + test('can be called with null when allow-empty is set to true', async function (assert) { + assert.expect(1); + + this.set('date', null); + await render(hbs`{{is-before null allow-empty=true}}`); + assert.dom(this.element).hasText(''); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/is-between-test.js b/test-app-4.x/tests/unit/helpers/is-between-test.js new file mode 100644 index 00000000..8f704610 --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/is-between-test.js @@ -0,0 +1,101 @@ +import EmberObject from '@ember/object'; +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('is-between', function (hooks) { + setupRenderingTest(hooks); + + test('two args (comparisonDate1, comparisonDate2)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + const today = momentService.moment(); + const threeDaysFromNow = today.add(3, 'days'); + const context = EmberObject.create({ + date: threeDaysFromNow, + }); + this.set('context', context); + + await render(hbs`{{is-between '2010-10-19' this.context.date}}`); + assert.dom(this.element).hasText('true'); + }); + + test('two args (comparisonDate1, comparisonDate2, precision)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + const today = momentService.moment(); + const threeYearsFromNow = today.add(3, 'years'); + const context = EmberObject.create({ + date: threeYearsFromNow, + }); + this.set('context', context); + + await render( + hbs`{{is-between '2010-10-19' this.context.date precision='year'}}` + ); + assert.dom(this.element).hasText('true'); + }); + + test('two args (comparisonDate1, comparisonDate2, precision, inclusivity)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + const today = momentService.moment(); + const threeDaysFromNow = today.add(3, 'days'); + const context = EmberObject.create({ + date: threeDaysFromNow, + }); + this.set('context', context); + + await render( + hbs`{{is-between '2010-10-19' this.context.date precision='year' inclusivity='()'}}` + ); + assert.dom(this.element).hasText('false'); + }); + + test('three args (evaluatedDate, comparisonDate1, comparisonDate2)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-between '2010-10-20' '2010-10-19' '2010-10-25'}}`); + assert.dom(this.element).hasText('true'); + }); + + test('three args with precision (evaluatedDate, comparisonDate1, comparisonDate2, precision)', async function (assert) { + assert.expect(1); + + await render( + hbs`{{is-between '2010-10-20' '2009-12-31' '2012-01-01' precision='year'}}` + ); + assert.dom(this.element).hasText('true'); + }); + + test('three args with inclusivity (evaluatedDate, comparisonDate1, comparisonDate2, inclusivity)', async function (assert) { + assert.expect(1); + + await render( + hbs`{{is-between '2016-10-30' '2016-10-30' '2016-12-30' inclusivity='[)'}}` + ); + assert.dom(this.element).hasText('true'); + }); + + test('three args with precision and inclusivity (evaluatedDate, comparisonDate1, comparisonDate2, precision, inclusivity)', async function (assert) { + assert.expect(1); + + await render( + hbs`{{is-between '2016-10-30' '2016-10-30' '2017-12-30' precision='year' inclusivity='[]'}}` + ); + assert.dom(this.element).hasText('true'); + }); + + test('can be called with null when allow-empty is set to true', async function (assert) { + assert.expect(1); + + this.set('date', null); + await render(hbs`{{is-between null null allow-empty=true}}`); + assert.dom(this.element).hasText(''); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/is-same-or-after-test.js b/test-app-4.x/tests/unit/helpers/is-same-or-after-test.js new file mode 100644 index 00000000..a70da523 --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/is-same-or-after-test.js @@ -0,0 +1,64 @@ +import EmberObject from '@ember/object'; +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('is-same-or-after', function (hooks) { + setupRenderingTest(hooks); + + test('one arg (comparisonDate)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + const today = momentService.moment(); + const threeDaysFromNow = today.add(3, 'days'); + const context = EmberObject.create({ + date: threeDaysFromNow, + }); + this.set('context', context); + + await render(hbs`{{is-same-or-after this.context.date}}`); + assert.dom(this.element).hasText('false'); + }); + + test('one arg with precision (comparisonDate, precision)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + const today = momentService.moment(); + const threeYearsAgo = today.subtract(3, 'years'); + const context = EmberObject.create({ + date: threeYearsAgo, + }); + this.set('context', context); + + await render(hbs`{{is-same-or-after this.context.date precision='year'}}`); + assert.dom(this.element).hasText('true'); + }); + + test('two args (evaluatedDate, comparisonDate)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-same-or-after '2010-10-20' '2010-10-20'}}`); + assert.dom(this.element).hasText('true'); + }); + + test('two args with precision (evaluatedDate, comparisonDate, precision)', async function (assert) { + assert.expect(1); + + await render( + hbs`{{is-same-or-after '2010-12-20' '2010-10-19' precision='year'}}` + ); + assert.dom(this.element).hasText('true'); + }); + + test('can be called with null when allow-empty is set to true', async function (assert) { + assert.expect(1); + + this.set('date', null); + await render(hbs`{{is-same-or-after null allow-empty=true}}`); + assert.dom(this.element).hasText(''); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/is-same-or-before-test.js b/test-app-4.x/tests/unit/helpers/is-same-or-before-test.js new file mode 100644 index 00000000..a1aca17d --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/is-same-or-before-test.js @@ -0,0 +1,47 @@ +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('is-same-or-before', function (hooks) { + setupRenderingTest(hooks); + + test('one arg (comparisonDate)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-same-or-before '2011-10-19'}}`); + assert.dom(this.element).hasText('false'); + }); + + test('one arg with precision (comparisonDate, precision)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-same-or-before '2011-10-19' precision='year'}}`); + assert.dom(this.element).hasText('false'); + }); + + test('two args (evaluatedDate, comparisonDate)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-same-or-before '2010-10-20' '2011-10-19'}}`); + assert.dom(this.element).hasText('true'); + }); + + test('two args with precision (evaluatedDate, comparisonDate, precision)', async function (assert) { + assert.expect(1); + + await render( + hbs`{{is-same-or-before '2010-12-20' '2010-12-19' precision='year'}}` + ); + assert.dom(this.element).hasText('true'); + }); + + test('can be called with null when allow-empty is set to true', async function (assert) { + assert.expect(1); + + this.set('date', null); + await render(hbs`{{is-same-or-before null allow-empty=true}}`); + assert.dom(this.element).hasText(''); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/is-same-test.js b/test-app-4.x/tests/unit/helpers/is-same-test.js new file mode 100644 index 00000000..aca42c7e --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/is-same-test.js @@ -0,0 +1,53 @@ +import EmberObject from '@ember/object'; +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('is-same', function (hooks) { + setupRenderingTest(hooks); + + test('one arg (comparisonDate)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-same '2011-10-19'}}`); + assert.dom(this.element).hasText('false'); + }); + + test('one arg with precision (comparisonDate, precision)', async function (assert) { + assert.expect(1); + + const today = new Date(); + const date = `${today.getFullYear()}-10-19`; + const context = EmberObject.create({ + date: date, + }); + this.set('context', context); + + await render(hbs`{{is-same this.context.date precision='year'}}`); + assert.dom(this.element).hasText('true'); + }); + + test('two args (evaluatedDate, comparisonDate)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-same '2010-10-20' '2010-10-20'}}`); + assert.dom(this.element).hasText('true'); + }); + + test('two args with precision (evaluatedDate, comparisonDate, precision)', async function (assert) { + assert.expect(1); + + await render(hbs`{{is-same '2010-10-20' '2010-12-19' precision='year'}}`); + assert.dom(this.element).hasText('true'); + }); + + test('can be called with null when allow-empty is set to true', async function (assert) { + assert.expect(1); + + this.set('date', null); + await render(hbs`{{is-same null allow-empty=true}}`); + assert.dom(this.element).hasText(''); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/moment-add-test.js b/test-app-4.x/tests/unit/helpers/moment-add-test.js new file mode 100644 index 00000000..ebaae5da --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/moment-add-test.js @@ -0,0 +1,88 @@ +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('moment-add', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.owner.lookup('service:moment').changeLocale('en'); + }); + + test('one arg adds duration', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + const duration = { days: 3 }; + this.set('duration', duration); + const expectedString = momentService + .moment() + .add(duration) + .format('ddd MMM DD YYYY'); + + await render(hbs`{{moment-add this.duration}}`); + //assert.ok(this.$().text().match()); + assert.dom(this.element).hasText(new RegExp(expectedString)); + }); + + test('two args with number and string', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + const number = 3; + const precision = 'days'; + this.setProperties({ + number, + precision, + }); + const expectedString = momentService + .moment() + .add(number, precision) + .format('ddd MMM DD YYYY'); + + await render(hbs`{{moment-add this.number this.precision}}`); + assert.dom(this.element).hasText(new RegExp(expectedString)); + }); + + test('two args with date and duration', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + const duration = { days: 3 }; + this.set('duration', duration); + const expectedString = momentService + .moment('2016-06-01') + .add(duration) + .format('ddd MMM DD YYYY'); + + await render(hbs`{{moment-add '2016-06-01' this.duration}}`); + assert.dom(this.element).hasText(new RegExp(expectedString)); + }); + + test('one arg with precision', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + const number = 3; + this.set('number', number); + const expectedString = momentService + .moment() + .add(number, 'days') + .format('ddd MMM DD YYYY'); + + await render(hbs`{{moment-add this.number precision='days'}}`); + assert.dom(this.element).hasText(new RegExp(expectedString)); + }); + + test('two args with precision', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + const number = 3; + this.set('number', number); + const expectedString = momentService + .moment('2016-06-01') + .add(number, 'days') + .format('ddd MMM DD YYYY'); + + await render(hbs`{{moment-add '2016-06-01' this.number precision='days'}}`); + assert.dom(this.element).hasText(new RegExp(expectedString)); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/moment-calendar-test.js b/test-app-4.x/tests/unit/helpers/moment-calendar-test.js new file mode 100644 index 00000000..1146a7cf --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/moment-calendar-test.js @@ -0,0 +1,135 @@ +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +import date from '../../helpers/date'; + +module('moment-calendar', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.owner.lookup('service:moment').changeLocale('en'); + }); + + test('one arg (date)', async function (assert) { + assert.expect(1); + + this.set('date', date(date(0))); + await render(hbs`{{moment-calendar this.date}}`); + assert.dom(this.element).hasText('12/31/1969'); + }); + + test('two args (date, referenceDate)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + date: momentService.moment('2013-01-01T02:30:26Z'), + referenceDate: momentService.moment('2013-01-01T12:00:00Z'), + }); + + await render( + hbs`{{moment-calendar this.date this.referenceDate timeZone='America/New_York'}}` + ); + assert.dom(this.element).hasText('Yesterday at 9:30 PM'); + }); + + test('two args (date, referenceDate) with formats', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + date: momentService.moment('2013-01-01T02:30:26Z'), + referenceDate: momentService.moment('2013-01-01T12:00:00Z'), + formats: { + sameDay: '[Today]', + nextDay: '[Tomorrow]', + nextWeek: 'dddd', + lastDay: '[Yesterday]', + lastWeek: '[Last] dddd', + sameElse: 'DD/MM/YYYY', + }, + }); + + await render( + hbs`{{moment-calendar this.date this.referenceDate this.formats timeZone='America/New_York'}}` + ); + assert.dom().hasText('Yesterday'); + }); + + test('can pass individual formats', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + date: momentService.moment('2013-01-01T02:30:26Z'), + referenceDate: momentService.moment('2013-01-01T12:00:00Z'), + lastDay: '[Yesterday!]', + }); + + await render( + hbs`{{moment-calendar this.date this.referenceDate lastDay=this.lastDay timeZone='America/New_York'}}` + ); + assert.dom(this.element).hasText('Yesterday!'); + }); + + test('can use a combination of hash options and positional params', async function (assert) { + assert.expect(2); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + date: momentService.moment('2013-01-01T02:30:26Z'), + referenceDate: momentService.moment('2013-01-01T12:00:00Z'), + formats: { + sameDay: '[Today!]', + sameElse: 'DD/MM/YYYY', + }, + }); + + await render( + hbs`{{moment-calendar this.date this.referenceDate this.formats lastDay='[YESTERDAY]' timeZone='America/New_York'}}` + ); + + assert.equal( + Object.keys(this.formats).length, + 2, + 'formats object shape does not change' + ); + assert.dom(this.element).hasText('YESTERDAY'); + }); + + test('with es locale', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + date: momentService.moment('2013-01-01T08:30:26Z'), + referenceDate: momentService.moment('2013-01-01T12:00:00Z'), + }); + + await render( + hbs`{{moment-calendar this.date this.referenceDate locale="es" timeZone='America/New_York'}}` + ); + assert.dom(this.element).hasText('hoy a las 3:30'); + }); + + test('can inline timeZone (Sydney)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + date: momentService.moment('2013-01-01T08:30:26Z'), + referenceDate: momentService.moment('2013-01-01T12:00:00Z'), + }); + + await render( + hbs`{{moment-calendar this.date this.referenceDate timeZone='Australia/Sydney'}}` + ); + + assert + .dom(this.element) + .hasText('Today at 7:30 PM', 'Australia is 11 hours ahead of UTC'); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/moment-diff-test.js b/test-app-4.x/tests/unit/helpers/moment-diff-test.js new file mode 100644 index 00000000..30e21537 --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/moment-diff-test.js @@ -0,0 +1,75 @@ +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('moment-diff', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.owner.lookup('service:moment').changeLocale('en'); + }); + + test('two args with (dateA, dateB)', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: momentService.moment('2017-01-10'), + dateB: momentService.moment('2017-01-15'), + }); + + await render(hbs`{{moment-diff this.dateA this.dateB}}`); + assert.dom(this.element).hasText('432000000'); + }); + + test('two args with a moment and a string (dateMoment, dateString)', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateMoment: momentService.moment('2017-01-10'), + dateString: '2017-01-15', + }); + + await render(hbs`{{moment-diff this.dateMoment this.dateString}}`); + assert.dom(this.element).hasText('432000000'); + }); + + test('two args with (dateA, dateB) and expect a negative result', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: momentService.moment('2017-01-15'), + dateB: momentService.moment('2017-01-10'), + }); + + await render(hbs`{{moment-diff this.dateA this.dateB}}`); + assert.dom(this.element).hasText('-432000000'); + }); + + test('two args with precision (dateA, dateB, precision)', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: new Date(), + dateB: momentService.moment().add(5, 'day'), + }); + + await render(hbs`{{moment-diff this.dateA this.dateB precision='day'}}`); + assert.dom().hasText('5'); + }); + + test('two args with precision and float (dateA, dateB, precision, float)', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: new Date(), + dateB: momentService.moment().add(6, 'month'), + }); + + await render( + hbs`{{moment-diff this.dateA this.dateB precision='year' float=true}}` + ); + assert.dom().containsText('.5'); // good ol' rounding error + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/moment-duration-test.js b/test-app-4.x/tests/unit/helpers/moment-duration-test.js new file mode 100644 index 00000000..e1e53fcd --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/moment-duration-test.js @@ -0,0 +1,99 @@ +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('moment-duration', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.owner.lookup('service:moment').changeLocale('en'); + }); + + test('one arg (ms)', async function (assert) { + assert.expect(1); + + this.set('date', 86400000); + await render(hbs`{{moment-duration this.date}}`); + assert.dom(this.element).hasText('a day'); + }); + + test('one arg (empty string)', async function (assert) { + assert.expect(1); + + this.set('date', ''); + await render(hbs`{{moment-duration this.date}}`); + assert.dom(this.element).hasText('a few seconds'); + }); + + test('one arg (object)', async function (assert) { + assert.expect(1); + + this.set('date', { + seconds: 2, + minutes: 2, + hours: 2, + days: 2, + weeks: 2, + months: 2, + years: 2, + }); + + await render(hbs`{{moment-duration this.date}}`); + assert.dom(this.element).hasText('2 years'); + }); + + test('one arg (string)', async function (assert) { + assert.expect(1); + + this.set('date', '23:59:59'); + await render(hbs`{{moment-duration this.date}}`); + assert.dom(this.element).hasText('a day'); + }); + + test('two args (value, units) - minute', async function (assert) { + assert.expect(1); + + this.setProperties({ + unit: 'minutes', + date: 1, + }); + + await render(hbs`{{moment-duration this.date this.unit}}`); + + assert.dom(this.element).hasText('a minute'); + }); + + test('two args (value, units) - day', async function (assert) { + assert.expect(1); + + this.setProperties({ + unit: 'day', + date: 1, + }); + + await render(hbs`{{moment-duration this.date this.unit}}`); + assert.dom(this.element).hasText('a day'); + }); + + test('two args (value, units) - empty value', async function (assert) { + assert.expect(1); + + this.setProperties({ + unit: 'minutes', + date: null, + }); + + await render(hbs`{{moment-duration this.date this.unit}}`); + assert.dom(this.element).hasText('a few seconds'); + }); + + test('can inline a locale instead of using global locale', async function (assert) { + assert.expect(1); + + this.set('date', 86400000); + await render(hbs`{{moment-duration this.date locale='es'}}`); + assert.dom(this.element).hasText('un día'); // note: that's not an `i` in día + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/moment-format-test.js b/test-app-4.x/tests/unit/helpers/moment-format-test.js new file mode 100644 index 00000000..5f2c46f9 --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/moment-format-test.js @@ -0,0 +1,142 @@ +import EmberObject from '@ember/object'; +import { run } from '@ember/runloop'; +import { helper } from '@ember/component/helper'; +import { settled } from '@ember/test-helpers'; +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +import date from '../../helpers/date'; + +module('moment-format', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.owner.lookup('service:moment').changeLocale('en'); + }); + + test('one arg (date)', async function (assert) { + assert.expect(1); + + this.set('date', date(date(0))); + await render(hbs`{{moment-format this.date}}`); + assert.dom(this.element).hasText('Wednesday, December 31, 1969 7:00 PM'); + }); + + test('updating default format recomputes moment-format', async function (assert) { + assert.expect(2); + + this.set('date', date(date(0))); + await render(hbs`{{moment-format this.date}}`); + + const service = this.owner.lookup('service:moment'); + + assert.dom(this.element).hasText('Wednesday, December 31, 1969 7:00 PM'); + + service.set('defaultFormat', 'DD.MM.YYYY'); + await settled(); + + assert.dom(this.element).hasText('31.12.1969'); + }); + + test('two args (date, inputFormat)', async function (assert) { + assert.expect(1); + + this.setProperties({ + format: 'MMMM D, YYYY', + date: date(Date.parse('2011-10-10T14:48:00-05:00')), + }); + + await render(hbs`{{moment-format this.date this.format}}`); + assert.dom(this.element).hasText('October 10, 2011'); + }); + + test('three args (date, outputFormat, inputFormat)', async function (assert) { + assert.expect(1); + + this.setProperties({ + inputFormat: 'M/D/YY', + outputFormat: 'MMMM D, YYYY', + date: '5/3/10', + }); + + await render( + hbs`{{moment-format this.date this.outputFormat this.inputFormat}}` + ); + assert.dom(this.element).hasText('May 3, 2010'); + }); + + test('change date input and change is reflected by bound helper', async function (assert) { + assert.expect(2); + + const context = EmberObject.create({ + date: date(0), + }); + + this.set('context', context); + + await render(hbs`{{moment-format this.context.date}}`); + assert.dom(this.element).hasText('Wednesday, December 31, 1969 7:00 PM'); + + run(function () { + context.set('date', date(60 * 60 * 24)); + }); + + assert.dom(this.element).hasText('Wednesday, December 31, 1969 7:01 PM'); + }); + + test('can inline a locale instead of using global locale', async function (assert) { + assert.expect(1); + this.set('date', date(date(0))); + + await render(hbs`{{moment-format this.date 'LLLL' locale='es'}}`); + assert + .dom(this.element) + .hasText('miércoles, 31 de diciembre de 1969 19:00'); + }); + + test('can inline timeZone (New York)', async function (assert) { + assert.expect(1); + + this.set('date', 0); + await render( + hbs`{{moment-format this.date 'LLLL' timeZone='America/New_York'}}` + ); + assert.dom(this.element).hasText('Wednesday, December 31, 1969 7:00 PM'); + }); + + test('can inline timeZone (Los Angeles)', async function (assert) { + assert.expect(1); + + this.set('date', 0); + await render( + hbs`{{moment-format this.date 'LLLL' timeZone='America/Los_Angeles'}}` + ); + assert.dom(this.element).hasText('Wednesday, December 31, 1969 4:00 PM'); + }); + + test('can be called with null when allow-empty is set to true', async function (assert) { + assert.expect(1); + + this.set('date', null); + await render(hbs`{{moment-format null allow-empty=true}}`); + assert.dom(this.element).hasText(''); + }); + + test('can be called using subexpression', async function (assert) { + assert.expect(1); + + this.owner.register( + 'helper:get-format', + helper(function () { + return 'L'; + }) + ); + + this.set('date', date(0)); + await render(hbs`{{moment-format this.date (get-format 'global-format')}}`); + assert.dom(this.element).hasText('12/31/1969'); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/moment-from-now-test.js b/test-app-4.x/tests/unit/helpers/moment-from-now-test.js new file mode 100644 index 00000000..236f63f3 --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/moment-from-now-test.js @@ -0,0 +1,104 @@ +import EmberObject from '@ember/object'; +import { run } from '@ember/runloop'; +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('moment-from-now', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.owner.lookup('service:moment').changeLocale('en'); + }); + + test('one arg (date)', async function (assert) { + assert.expect(1); + + const threeDaysAgo = new Date(); + threeDaysAgo.setDate(threeDaysAgo.getDate() - 3); + + const context = EmberObject.create({ + date: threeDaysAgo, + }); + + this.set('context', context); + + await render(hbs`{{moment-from-now this.context.date}}`); + assert.dom(this.element).hasText('3 days ago'); + }); + + test('one arg (dateA, hideAffix=boolean)', async function (assert) { + assert.expect(2); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: momentService.moment().add(3, 'day'), + }); + + await render(hbs`{{moment-to-now this.dateA hideAffix=true}}`); + assert.dom(this.element).hasText('3 days'); + await render(hbs`{{moment-to-now this.dateA hideAffix=false}}`); + assert.dom(this.element).hasText('3 days ago'); + }); + + test('two args (date, inputFormat)', async function (assert) { + assert.expect(1); + + const threeDaysAgo = new Date(); + threeDaysAgo.setDate(threeDaysAgo.getDate() - 3); + + this.setProperties({ + inputFormat: 'LLLL', + date: threeDaysAgo, + }); + + await render(hbs`{{moment-from-now this.date this.inputFormat}}`); + assert.dom(this.element).hasText('3 days ago'); + }); + + test('change date input and change is reflected by bound helper', async function (assert) { + assert.expect(2); + + const momentService = this.owner.lookup('service:moment'); + const context = EmberObject.create({ + date: momentService.moment().subtract(1, 'hour'), + }); + + this.set('context', context); + + await render(hbs`{{moment-from-now this.context.date}}`); + assert.dom(this.element).hasText('an hour ago'); + + run(function () { + context.set('date', momentService.moment().subtract(2, 'hours')); + }); + + assert.dom(this.element).hasText('2 hours ago'); + }); + + test('can inline a locale instead of using global locale', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + + this.set('date', momentService.moment().subtract(1, 'hour')); + await render(hbs`{{moment-from-now this.date locale='es'}}`); + assert.dom(this.element).hasText('hace una hora'); + }); + + test('can be called with null', async function (assert) { + assert.expect(1); + + this.set('date', null); + await render(hbs`{{moment-from-now this.date allow-empty=true}}`); + assert.dom(this.element).hasText(''); + }); + + test('localize arabic - issue 239', async function (assert) { + this.set('date', new Date()); + await render(hbs`{{moment-from-now this.date locale='ar' hideAffix=true}}`); + assert.dom(this.element).hasText('ثانية واحدة'); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/moment-from-test.js b/test-app-4.x/tests/unit/helpers/moment-from-test.js new file mode 100644 index 00000000..005bf194 --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/moment-from-test.js @@ -0,0 +1,76 @@ +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('moment-from', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.owner.lookup('service:moment').changeLocale('en'); + }); + + test('one arg (date)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + + this.set('date', momentService.moment().add(3, 'day')); + + await render(hbs`{{moment-from this.date}}`); + assert.dom(this.element).hasText('in 3 days'); + }); + + test('two args (dateA, dateB)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: new Date(), + dateB: momentService.moment().add(3, 'day'), + }); + + await render(hbs`{{moment-from this.dateB this.dateA}}`); + assert.dom(this.element).hasText('in 3 days'); + }); + + test('two args (dateA, dateB, hideAffix=boolean)', async function (assert) { + assert.expect(2); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: new Date(), + dateB: momentService.moment().add(3, 'day'), + }); + + await render(hbs`{{moment-from this.dateB this.dateA hideAffix=true}}`); + assert.dom(this.element).hasText('3 days'); + await render(hbs`{{moment-from this.dateB this.dateA hideAffix=false}}`); + assert.dom(this.element).hasText('in 3 days'); + }); + + test('three args (dateA, dateB, boolean)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: new Date(), + dateB: momentService.moment().subtract(3, 'day'), + }); + + await render(hbs`{{moment-from this.dateA this.dateB true}}`); + assert.dom(this.element).hasText('3 days'); + }); + + test('can inline a locale', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.set('dateA', momentService.moment()); + this.set('dateB', momentService.moment().subtract(2, 'day')); + + await render(hbs`{{moment-from this.dateA this.dateB locale='es'}}`); + assert.dom(this.element).hasText('en 2 días'); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/moment-subtract-test.js b/test-app-4.x/tests/unit/helpers/moment-subtract-test.js new file mode 100644 index 00000000..39f8acf4 --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/moment-subtract-test.js @@ -0,0 +1,89 @@ +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('moment-subtract', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.owner.lookup('service:moment').changeLocale('en'); + }); + + test('one arg subtracts duration', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + const duration = { days: 3 }; + this.set('duration', duration); + const expectedString = momentService + .moment() + .subtract(duration) + .format('ddd MMM DD YYYY'); + + await render(hbs`{{moment-subtract this.duration}}`); + assert.dom().containsText(expectedString); + }); + + test('two args with number and string', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + const number = 3; + const precision = 'days'; + this.setProperties({ + number, + precision, + }); + const expectedString = momentService + .moment() + .subtract(number, precision) + .format('ddd MMM DD YYYY'); + + await render(hbs`{{moment-subtract this.number this.precision}}`); + assert.dom().containsText(expectedString); + }); + + test('two args with date and duration', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + const duration = { days: 3 }; + this.set('duration', duration); + const expectedString = momentService + .moment('2016-06-01') + .subtract(duration) + .format('ddd MMM DD YYYY'); + + await render(hbs`{{moment-subtract '2016-06-01' this.duration}}`); + assert.dom().containsText(expectedString); + }); + + test('one arg with precision', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + const number = 3; + this.set('number', number); + const expectedString = momentService + .moment() + .subtract(number, 'days') + .format('ddd MMM DD YYYY'); + + await render(hbs`{{moment-subtract this.number precision='days'}}`); + assert.dom().containsText(expectedString); + }); + + test('two args with precision', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + const number = 3; + this.set('number', number); + const expectedString = momentService + .moment('2016-06-01') + .subtract(number, 'days') + .format('ddd MMM DD YYYY'); + + await render( + hbs`{{moment-subtract '2016-06-01' this.number precision='days'}}` + ); + assert.dom().containsText(expectedString); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/moment-to-now-test.js b/test-app-4.x/tests/unit/helpers/moment-to-now-test.js new file mode 100644 index 00000000..7c63615d --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/moment-to-now-test.js @@ -0,0 +1,106 @@ +import EmberObject from '@ember/object'; +import { run } from '@ember/runloop'; +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('moment-to-now', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.owner.lookup('service:moment').changeLocale('en'); + }); + + test('one arg (date)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: momentService.moment().subtract(3, 'day'), + }); + + await render(hbs`{{moment-to-now this.dateA}}`); + assert.dom(this.element).hasText('in 3 days'); + }); + + test('one arg (date, hideAffix=boolean)', async function (assert) { + assert.expect(2); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + date: momentService.moment().subtract(3, 'day'), + }); + + await render(hbs`{{moment-to-now this.date hideAffix=true}}`); + assert.dom(this.element).hasText('3 days'); + await render(hbs`{{moment-to-now this.date hideAffix=false}}`); + assert.dom(this.element).hasText('in 3 days'); + }); + + test('two args (date, inputFormat)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + format: 'LLLL', + date: momentService.moment().subtract(3, 'day'), + }); + + await render(hbs`{{moment-to-now this.date this.format}}`); + assert.dom(this.element).hasText('in 3 days'); + }); + + test('change date input and change is reflected by bound helper', async function (assert) { + assert.expect(2); + + const momentService = this.owner.lookup('service:moment'); + const context = EmberObject.create({ + date: momentService.moment().subtract(1, 'hour'), + }); + + this.set('context', context); + await render(hbs`{{moment-to-now this.context.date}}`); + assert.dom(this.element).hasText('in an hour'); + + run(function () { + context.set('date', momentService.moment().subtract(2, 'hour')); + }); + + assert.dom(this.element).hasText('in 2 hours'); + }); + + test('can inline a locale instead of using global locale', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.set('date', momentService.moment().subtract(1, 'hour')); + await render(hbs`{{moment-to-now this.date locale='es'}}`); + assert.dom(this.element).hasText('en una hora'); + }); + + test('can be called with null', async function (assert) { + assert.expect(1); + + this.set('date', null); + await render(hbs`{{moment-to-now this.date allow-empty=true}}`); + assert.dom(this.element).hasText(''); + }); + + test('can be called with null using global config option', async function (assert) { + assert.expect(1); + + this.set('date', null); + await render(hbs`{{moment-to-now this.date}}`); + assert.dom(this.element).hasText(''); + }); + + test('unable to called with null overriding global config option', async function (assert) { + assert.expect(1); + + this.set('date', null); + await render(hbs`{{moment-to-now this.date allow-empty=false}}`); + assert.dom(this.element).hasText('Invalid date'); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/moment-to-test.js b/test-app-4.x/tests/unit/helpers/moment-to-test.js new file mode 100644 index 00000000..bacb90d0 --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/moment-to-test.js @@ -0,0 +1,75 @@ +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('moment-to', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.owner.lookup('service:moment').changeLocale('en'); + }); + + test('one arg (date)', async function (assert) { + assert.expect(1); + const momentService = this.owner.lookup('service:moment'); + + this.set('date', momentService.moment().subtract(3, 'day')); + + await render(hbs`{{moment-to this.date}}`); + assert.dom(this.element).hasText('in 3 days'); + }); + + test('two args (dateA, dateB)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: new Date(), + dateB: momentService.moment().subtract(3, 'day'), + }); + + await render(hbs`{{moment-to this.dateB this.dateA}}`); + assert.dom(this.element).hasText('in 3 days'); + }); + + test('two args (dateA, dateB, hideAffix=boolean)', async function (assert) { + assert.expect(2); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: new Date(), + dateB: momentService.moment().add(3, 'day'), + }); + + await render(hbs`{{moment-to this.dateA this.dateB hideAffix=true}}`); + assert.dom(this.element).hasText('3 days'); + await render(hbs`{{moment-to this.dateA this.dateB hideAffix=false}}`); + assert.dom(this.element).hasText('in 3 days'); + }); + + test('three args (dateA, dateB, boolean)', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.setProperties({ + dateA: new Date(), + dateB: momentService.moment().add(3, 'day'), + }); + + await render(hbs`{{moment-to this.dateA this.dateB true}}`); + assert.dom(this.element).hasText('3 days'); + }); + + test('can inline a locale', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + this.set('dateA', momentService.moment()); + this.set('dateB', momentService.moment().add(2, 'day')); + + await render(hbs`{{moment-to this.dateA this.dateB locale='es'}}`); + assert.dom(this.element).hasText('en 2 días'); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/now-test.js b/test-app-4.x/tests/unit/helpers/now-test.js new file mode 100644 index 00000000..273c91eb --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/now-test.js @@ -0,0 +1,45 @@ +import moment from 'moment-timezone'; +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +let now = moment.now; +let momentFromService; + +module('now', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.moment = this.owner.lookup('service:moment'); + this.moment.changeLocale('en'); + momentFromService = this.moment.moment; + }); + + hooks.afterEach(function () { + moment.now = now; + this.moment.now = now; + this.moment.moment = momentFromService; + }); + + test('returns the result of moment.now', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + const current = momentService.moment('20111031'); + moment.now = () => current; + await render(hbs`{{moment-format (now) 'YYYYMMDD'}}`); + assert.dom(this.element).hasText('20111031'); + }); + + test('returns the result of this.moment.now', async function (assert) { + assert.expect(1); + + const momentService = this.owner.lookup('service:moment'); + const current = momentService.moment('20011031'); + this.moment.moment = () => current; + await render(hbs`{{moment-format (now) 'YYYYMMDD'}}`); + assert.dom().hasText('20011031'); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/unix-test.js b/test-app-4.x/tests/unit/helpers/unix-test.js new file mode 100644 index 00000000..8c0bd1c9 --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/unix-test.js @@ -0,0 +1,22 @@ +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +module('unix', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.owner.lookup('service:moment').changeLocale('en'); + }); + + test('returns the result of moment.unix', async function (assert) { + assert.expect(1); + + await render( + hbs`{{moment-format (unix 946684799) 'YYYYMMDD' timeZone='America/Los_Angeles'}}` + ); + assert.dom(this.element).hasText('19991231'); + }); +}); diff --git a/test-app-4.x/tests/unit/helpers/utc-test.js b/test-app-4.x/tests/unit/helpers/utc-test.js new file mode 100644 index 00000000..f75fb5ca --- /dev/null +++ b/test-app-4.x/tests/unit/helpers/utc-test.js @@ -0,0 +1,68 @@ +import moment from 'moment-timezone'; +import hbs from 'htmlbars-inline-precompile'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; + +import { render } from '@ember/test-helpers'; + +let utc = moment.utc; + +module('utc', function (hooks) { + setupRenderingTest(hooks); + + hooks.beforeEach(function () { + this.moment = this.owner.lookup('service:moment'); + this.moment.changeLocale('en'); + }); + + hooks.afterEach(function () { + moment.utc = utc; + this.moment.utc = utc; + }); + + test('returns the result of moment.utc', async function (assert) { + assert.expect(1); + + const timeStr = '2001-10-31T13:24:56'; + const fmtStr = 'YYYY-MM-DDTHH:mm:ss'; + const momentService = this.owner.lookup('service:moment'); + const current = momentService.utc(timeStr, fmtStr); + moment.utc = () => current; + await render(hbs`{{moment-format (utc) 'YYYY-MM-DDTHH:mm:ss'}}`); + assert.dom(this.element).hasText(timeStr); + }); + + test('returns the result of this.moment.utc', async function (assert) { + assert.expect(1); + + const timeStr = '2001-10-31T13:24:56'; + const fmtStr = 'YYYY-MM-DDTHH:mm:ss'; + const momentService = this.owner.lookup('service:moment'); + const current = momentService.utc(timeStr, fmtStr); + this.moment.utc = () => current; + await render(hbs`{{moment-format (utc) 'YYYY-MM-DDTHH:mm:ss'}}`); + assert.dom().hasText(timeStr); + }); + + test('utc of existing moment', async function (assert) { + assert.expect(2); + + const utcTimeStr = '2001-10-31T13:24:56 +00:00'; + const estTimeStr = '2001-10-31T08:24:56 -05:00'; + const fmtStr = 'YYYY-MM-DDTHH:mm:ss Z'; + const momentService = this.owner.lookup('service:moment'); + const estValue = momentService.moment(estTimeStr, fmtStr); + this.set('estValue', estValue); + const utcValue = momentService.utc(utcTimeStr, fmtStr); + this.set('utcValue', utcValue); + await render( + hbs`{{moment-format (utc this.estValue) 'YYYY-MM-DDTHH:mm:ss Z'}}` + ); + assert.dom(this.element).hasText(utcTimeStr); + + await render( + hbs`{{moment-format (utc this.utcValue) 'YYYY-MM-DDTHH:mm:ss Z'}}` + ); + assert.dom(this.element).hasText(utcTimeStr); + }); +}); diff --git a/test-app-5.x/package.json b/test-app-5.x/package.json index e4857f84..59d49463 100644 --- a/test-app-5.x/package.json +++ b/test-app-5.x/package.json @@ -2,7 +2,7 @@ "name": "test-app-5.x", "version": "0.0.0", "private": true, - "description": "Test app for ember-moment addon", + "description": "Test app for ember-moment addon with ember-source 5.x", "repository": "", "license": "MIT", "author": "", @@ -46,7 +46,6 @@ "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~5.3.3", "ember-fetch": "^8.1.2", "ember-load-initializers": "^2.1.2", "ember-modifier": "^4.1.0",