{"id":15015726,"url":"https://github.com/emberjs/ember-edition-utils","last_synced_at":"2025-10-19T14:32:09.607Z","repository":{"id":35114763,"uuid":"208512932","full_name":"emberjs/ember-edition-utils","owner":"emberjs","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-05T01:59:12.000Z","size":252,"stargazers_count":5,"open_issues_count":10,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-29T14:44:08.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emberjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-14T22:44:50.000Z","updated_at":"2024-05-01T01:16:49.000Z","dependencies_parsed_at":"2023-01-15T14:07:45.827Z","dependency_job_id":null,"html_url":"https://github.com/emberjs/ember-edition-utils","commit_stats":null,"previous_names":["emberjs/ember-octane-utils"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emberjs%2Fember-edition-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emberjs%2Fember-edition-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emberjs%2Fember-edition-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emberjs%2Fember-edition-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emberjs","download_url":"https://codeload.github.com/emberjs/ember-edition-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237152796,"owners_count":19263784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:47:50.818Z","updated_at":"2025-10-19T14:32:04.316Z","avatar_url":"https://github.com/emberjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @ember/edition-utils\n\nThis package is the officially supported mechanism for declaring and detecting\nthe specific edition that a given application is using.\n\n## Usage\n\n### Declaring Edition\n\nIn order to declare which edition of Ember your application (or addon's test bed application) is compatible with\nyou would update your `package.json` to include the following:\n\n```js\n{\n  \"name\": \"project-name\",\n  // ...snip\n  \"ember\": {\n    \"edition\": \"octane\"\n  }\n}\n```\n\n### Detecting Edition\n\nIn order to detect if the currently running application is using _at least_ a\nspecific edition, you would call `has`. This will most commonly be used from\nwithin various addon's to determine which blueprint code to run. For example:\n\n```js\nconst { has } = require('@ember/edition-utils');\n\nif (has('octane', this.project.root)) {\n  // do octane stuff\n} else {\n  // do classic mode stuff\n}\n```\n\n### Valid use of the edition value\n\nThe edition flag should only be used by addons to determine what blueprint\noutput to generate and to provide helpful warnings (or errors) at build time.\n\nThis does **not** allow for an addon to detect the edition configuration and\nchange its fundamental implementation. This is quite intentional!\n\nInstead, addons should rely on feature detection techniques like the following\nto alter implementations:\n\n* Check to see if given methods/properties exist (this is essentially like how\n  browser polyfills work)\n* Use a tool like\n  [ember-compatibility-helpers](https://github.com/pzuraq/ember-compatibility-helpers)'s\n  `gte` method (e.g. `if (gte('ember-source', '3.14.0')) { }`)\n* Use\n  [@ember/optional-features](https://github.com/emberjs/ember-optional-features)'s\n  [`isFeatureEnabled`\n  method](https://github.com/emberjs/ember-optional-features#at-build-time-from-an-addon)\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femberjs%2Fember-edition-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femberjs%2Fember-edition-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femberjs%2Fember-edition-utils/lists"}