diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1784e2..9617b24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,9 +36,9 @@ jobs: - name: Install Dependencies run: yarn install --frozen-lockfile - name: Lint - run: yarn lint + run: yarn workspace ember-cached-decorator-polyfill lint - name: Browser Tests - run: yarn test:ember + run: yarn workspace ember-cached-decorator-polyfill test:ember test-old-dependencies: name: Oldest Supported Env @@ -53,7 +53,7 @@ jobs: - name: Install Dependencies run: yarn install --frozen-lockfile - name: Browser Tests - run: yarn test:ember + run: yarn workspace ember-cached-decorator-polyfill test:ember test-try: name: Ember Try @@ -78,4 +78,4 @@ jobs: - name: Install Dependencies run: yarn install --frozen-lockfile - name: Try Scenario - run: yarn ember try:one ${{ matrix.scenario }} + run: yarn workspace ember-cached-decorator-polyfill ember try:one ${{ matrix.scenario }} diff --git a/.gitignore b/.gitignore index c40a1b2..59d4965 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,120 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist/ -/tmp/ - -# dependencies -/bower_components/ -/node_modules/ - -# misc -/.env* -/.pnp* -/.sass-cache -/connect.lock -/coverage/ -/libpeerconnection.log -/npm-debug.log* -/testem.log -/yarn-error.log - -# ember-try -/.node_modules.ember-try/ -/bower.json.ember-try -/package.json.ember-try +### https://raw.github.com/github/gitignore/18aa6d83774d514da479d73a4beb864cd4220231/Node.gitignore + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + + diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 94b281b..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,23 +0,0 @@ -## v0.1.0-3 (2020-08-17) - -#### :house: Internal -* [#10](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/pull/10) test: add integration / render test ([@mydea](https://github.com/mydea)) - -#### Committers: 1 -- Francesco Novy ([@mydea](https://github.com/mydea)) - -## v0.1.0-2 (2020-08-17) - -#### :bug: Bug Fix -* [#9](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/pull/9) fix: cache per instance via `WeakMap` ([@buschtoens](https://github.com/buschtoens)) - -#### :house: Internal -* [#8](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/pull/8) style: fix Prettier auto-format ([@buschtoens](https://github.com/buschtoens)) - -#### Committers: 1 -- Jan Buschtöns ([@buschtoens](https://github.com/buschtoens)) - -## v0.1.0-1 (2020-08-11) - -## v0.1.0-0 (2020-08-10) - diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 120000 index 0000000..8e5f35b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +ember-cached-decorator-polyfill/CHANGELOG.md \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index aa3d9b8..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# How To Contribute - -## Installation - -* `git clone ` -* `cd ember-cached-decorator-polyfill` -* `yarn install` - -## Linting - -* `yarn lint:hbs` -* `yarn lint:js` -* `yarn lint:js --fix` - -## Running tests - -* `ember test` – Runs the test suite on the current Ember version -* `ember test --server` – Runs the test suite in "watch mode" -* `ember try:each` – Runs the test suite against multiple Ember versions - -## Running the dummy application - -* `ember serve` -* Visit the dummy application at [http://localhost:4200](http://localhost:4200). - -For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 120000 index 0000000..cde9fd4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +ember-cached-decorator-polyfill/CONTRIBUTING.md \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 7b6573f..0000000 --- a/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/LICENSE.md b/LICENSE.md new file mode 120000 index 0000000..7f1c503 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1 @@ +ember-cached-decorator-polyfill/LICENSE.md \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index df88cb0..0000000 --- a/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# ember-cached-decorator-polyfill - -[![CI](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/workflows/CI/badge.svg)](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/actions) -[![npm version](https://badge.fury.io/js/ember-cached-decorator-polyfill.svg)](http://badge.fury.io/js/ember-cached-decorator-polyfill) -[![Download Total](https://img.shields.io/npm/dt/ember-cached-decorator-polyfill.svg)](http://badge.fury.io/js/ember-cached-decorator-polyfill) -[![Ember Observer Score](https://emberobserver.com/badges/ember-cached-decorator-polyfill.svg)](https://emberobserver.com/addons/ember-cached-decorator-polyfill) -[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) -[![Dependabot enabled](https://img.shields.io/badge/dependabot-enabled-blue.svg?logo=dependabot)](https://dependabot.com/) -[![dependencies Status](https://david-dm.org/ember-polyfills/ember-cached-decorator-polyfill/status.svg)](https://david-dm.org/ember-polyfills/ember-cached-decorator-polyfill) -[![devDependencies Status](https://david-dm.org/ember-polyfills/ember-cached-decorator-polyfill/dev-status.svg)](https://david-dm.org/ember-polyfills/ember-cached-decorator-polyfill?type=dev) - -Polyfill for [RFC 566 "@cached decorator"][rfc-566]. - -[rfc-566]: https://github.com/emberjs/rfcs/pull/566 - -## Installation - -```bash -ember install ember-cached-decorator-polyfill -``` - -For addons, pass the `-S` flag. - -## Compatibility - -* Ember.js v3.13 or above -* Ember CLI v2.13 or above -* Node.js v10 or above - -## Summary - -Add a `@cached` decorator for memoizing the result of a getter based on -autotracking. In the following example, `fullName` would only recalculate if -`firstName` or `lastName` is updated. - -```js -import { tracked, cached } from '@glimmer/tracking'; - -class Person { - @tracked firstName = 'Jen'; - @tracked lastName = 'Weber'; - - @cached - get fullName() { - return `${this.firstName} ${this.lastName}`; - } -} -``` - -For detailed usage instructions, refer to the -[RFC 566 "@cached decorator"][rfc-566]. - -## TypeScript Usage - -TypeScript's normal type resolution for an import from `@glimmer/tracking` -will **not** find this the types provided by this package (since TypeScript -would attempt to resolve it as `node_modules/@glimmer/tracking` or under -the Definitely Typed location for `@glimmer/tracking`). - -Once the addition to the `@glimmer/tracking` API is a documented part of Ember's -API, the types will be available upstream, but in the meantime users will need -to modify their `tsconfig.json` to tell TypeScript where these types are. - -Add the following to your `tsconfig.json`: - -```js -{ - // ...snip... - "paths": { - // ...snip... - "@glimmer/tracking": [ - "node_modules/ember-cached-decorator-polyfill", - "node_modules/@glimmer/tracking/dist/types" - ], - } -} -``` diff --git a/README.md b/README.md new file mode 120000 index 0000000..48b6463 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +ember-cached-decorator-polyfill/README.md \ No newline at end of file diff --git a/RELEASE.md b/RELEASE.md deleted file mode 100644 index f5f137b..0000000 --- a/RELEASE.md +++ /dev/null @@ -1,62 +0,0 @@ -# Release - -Releases are mostly automated using -[release-it](https://github.com/release-it/release-it/) and -[lerna-changelog](https://github.com/lerna/lerna-changelog/). - - -## Preparation - -Since the majority of the actual release process is automated, the primary -remaining task prior to releasing is confirming that all pull requests that -have been merged since the last release have been labeled with the appropriate -`lerna-changelog` labels and the titles have been updated to ensure they -represent something that would make sense to our users. Some great information -on why this is important can be found at -[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall -guiding principle here is that changelogs are for humans, not machines. - -When reviewing merged PR's the labels to be used are: - -* breaking - Used when the PR is considered a breaking change. -* enhancement - Used when the PR adds a new feature or enhancement. -* bug - Used when the PR fixes a bug included in a previous release. -* documentation - Used when the PR adds or updates documentation. -* internal - Used for internal changes that still require a mention in the - changelog/release notes. - - -## Release - -Once the prep work is completed, the actual release is straight forward: - -* First, ensure that you have installed your projects dependencies: - -``` -yarn install -``` - -* Second, ensure that you have obtained a - [GitHub personal access token][generate-token] with the `repo` scope (no - other permissions are needed). Make sure the token is available as the - `GITHUB_AUTH` environment variable. - - For instance: - - ```bash - export GITHUB_AUTH=abc123def456 - ``` - -[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable - -* And last (but not least 😁) do your release. - -``` -npx release-it -``` - -[release-it](https://github.com/release-it/release-it/) manages the actual -release process. It will prompt you to to choose the version number after which -you will have the chance to hand tweak the changelog to be used (for the -`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging, -pushing the tag and commits, etc. diff --git a/RELEASE.md b/RELEASE.md new file mode 120000 index 0000000..02db3ba --- /dev/null +++ b/RELEASE.md @@ -0,0 +1 @@ +ember-cached-decorator-polyfill/RELEASE.md \ No newline at end of file diff --git a/.ember-cli b/ember-cached-decorator-polyfill/.ember-cli similarity index 100% rename from .ember-cli rename to ember-cached-decorator-polyfill/.ember-cli diff --git a/.eslintignore b/ember-cached-decorator-polyfill/.eslintignore similarity index 100% rename from .eslintignore rename to ember-cached-decorator-polyfill/.eslintignore diff --git a/.eslintrc.js b/ember-cached-decorator-polyfill/.eslintrc.js similarity index 100% rename from .eslintrc.js rename to ember-cached-decorator-polyfill/.eslintrc.js diff --git a/ember-cached-decorator-polyfill/.gitignore b/ember-cached-decorator-polyfill/.gitignore new file mode 100644 index 0000000..c40a1b2 --- /dev/null +++ b/ember-cached-decorator-polyfill/.gitignore @@ -0,0 +1,25 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist/ +/tmp/ + +# dependencies +/bower_components/ +/node_modules/ + +# misc +/.env* +/.pnp* +/.sass-cache +/connect.lock +/coverage/ +/libpeerconnection.log +/npm-debug.log* +/testem.log +/yarn-error.log + +# ember-try +/.node_modules.ember-try/ +/bower.json.ember-try +/package.json.ember-try diff --git a/.npmignore b/ember-cached-decorator-polyfill/.npmignore similarity index 100% rename from .npmignore rename to ember-cached-decorator-polyfill/.npmignore diff --git a/ember-cached-decorator-polyfill/.prettierrc.js b/ember-cached-decorator-polyfill/.prettierrc.js new file mode 100644 index 0000000..52310fd --- /dev/null +++ b/ember-cached-decorator-polyfill/.prettierrc.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = { + arrowParens: 'avoid', + singleQuote: true, + trailingComma: 'none' // @TODO: switch to 'all' +}; diff --git a/.template-lintrc.js b/ember-cached-decorator-polyfill/.template-lintrc.js similarity index 100% rename from .template-lintrc.js rename to ember-cached-decorator-polyfill/.template-lintrc.js diff --git a/.watchmanconfig b/ember-cached-decorator-polyfill/.watchmanconfig similarity index 100% rename from .watchmanconfig rename to ember-cached-decorator-polyfill/.watchmanconfig diff --git a/ember-cached-decorator-polyfill/CHANGELOG.md b/ember-cached-decorator-polyfill/CHANGELOG.md new file mode 100644 index 0000000..94b281b --- /dev/null +++ b/ember-cached-decorator-polyfill/CHANGELOG.md @@ -0,0 +1,23 @@ +## v0.1.0-3 (2020-08-17) + +#### :house: Internal +* [#10](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/pull/10) test: add integration / render test ([@mydea](https://github.com/mydea)) + +#### Committers: 1 +- Francesco Novy ([@mydea](https://github.com/mydea)) + +## v0.1.0-2 (2020-08-17) + +#### :bug: Bug Fix +* [#9](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/pull/9) fix: cache per instance via `WeakMap` ([@buschtoens](https://github.com/buschtoens)) + +#### :house: Internal +* [#8](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/pull/8) style: fix Prettier auto-format ([@buschtoens](https://github.com/buschtoens)) + +#### Committers: 1 +- Jan Buschtöns ([@buschtoens](https://github.com/buschtoens)) + +## v0.1.0-1 (2020-08-11) + +## v0.1.0-0 (2020-08-10) + diff --git a/ember-cached-decorator-polyfill/CONTRIBUTING.md b/ember-cached-decorator-polyfill/CONTRIBUTING.md new file mode 100644 index 0000000..aa3d9b8 --- /dev/null +++ b/ember-cached-decorator-polyfill/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# How To Contribute + +## Installation + +* `git clone ` +* `cd ember-cached-decorator-polyfill` +* `yarn install` + +## Linting + +* `yarn lint:hbs` +* `yarn lint:js` +* `yarn lint:js --fix` + +## Running tests + +* `ember test` – Runs the test suite on the current Ember version +* `ember test --server` – Runs the test suite in "watch mode" +* `ember try:each` – Runs the test suite against multiple Ember versions + +## Running the dummy application + +* `ember serve` +* Visit the dummy application at [http://localhost:4200](http://localhost:4200). + +For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). diff --git a/ember-cached-decorator-polyfill/LICENSE.md b/ember-cached-decorator-polyfill/LICENSE.md new file mode 100644 index 0000000..7b6573f --- /dev/null +++ b/ember-cached-decorator-polyfill/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2020 + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ember-cached-decorator-polyfill/README.md b/ember-cached-decorator-polyfill/README.md new file mode 100644 index 0000000..df88cb0 --- /dev/null +++ b/ember-cached-decorator-polyfill/README.md @@ -0,0 +1,77 @@ +# ember-cached-decorator-polyfill + +[![CI](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/workflows/CI/badge.svg)](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/actions) +[![npm version](https://badge.fury.io/js/ember-cached-decorator-polyfill.svg)](http://badge.fury.io/js/ember-cached-decorator-polyfill) +[![Download Total](https://img.shields.io/npm/dt/ember-cached-decorator-polyfill.svg)](http://badge.fury.io/js/ember-cached-decorator-polyfill) +[![Ember Observer Score](https://emberobserver.com/badges/ember-cached-decorator-polyfill.svg)](https://emberobserver.com/addons/ember-cached-decorator-polyfill) +[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) +[![Dependabot enabled](https://img.shields.io/badge/dependabot-enabled-blue.svg?logo=dependabot)](https://dependabot.com/) +[![dependencies Status](https://david-dm.org/ember-polyfills/ember-cached-decorator-polyfill/status.svg)](https://david-dm.org/ember-polyfills/ember-cached-decorator-polyfill) +[![devDependencies Status](https://david-dm.org/ember-polyfills/ember-cached-decorator-polyfill/dev-status.svg)](https://david-dm.org/ember-polyfills/ember-cached-decorator-polyfill?type=dev) + +Polyfill for [RFC 566 "@cached decorator"][rfc-566]. + +[rfc-566]: https://github.com/emberjs/rfcs/pull/566 + +## Installation + +```bash +ember install ember-cached-decorator-polyfill +``` + +For addons, pass the `-S` flag. + +## Compatibility + +* Ember.js v3.13 or above +* Ember CLI v2.13 or above +* Node.js v10 or above + +## Summary + +Add a `@cached` decorator for memoizing the result of a getter based on +autotracking. In the following example, `fullName` would only recalculate if +`firstName` or `lastName` is updated. + +```js +import { tracked, cached } from '@glimmer/tracking'; + +class Person { + @tracked firstName = 'Jen'; + @tracked lastName = 'Weber'; + + @cached + get fullName() { + return `${this.firstName} ${this.lastName}`; + } +} +``` + +For detailed usage instructions, refer to the +[RFC 566 "@cached decorator"][rfc-566]. + +## TypeScript Usage + +TypeScript's normal type resolution for an import from `@glimmer/tracking` +will **not** find this the types provided by this package (since TypeScript +would attempt to resolve it as `node_modules/@glimmer/tracking` or under +the Definitely Typed location for `@glimmer/tracking`). + +Once the addition to the `@glimmer/tracking` API is a documented part of Ember's +API, the types will be available upstream, but in the meantime users will need +to modify their `tsconfig.json` to tell TypeScript where these types are. + +Add the following to your `tsconfig.json`: + +```js +{ + // ...snip... + "paths": { + // ...snip... + "@glimmer/tracking": [ + "node_modules/ember-cached-decorator-polyfill", + "node_modules/@glimmer/tracking/dist/types" + ], + } +} +``` diff --git a/ember-cached-decorator-polyfill/RELEASE.md b/ember-cached-decorator-polyfill/RELEASE.md new file mode 100644 index 0000000..f5f137b --- /dev/null +++ b/ember-cached-decorator-polyfill/RELEASE.md @@ -0,0 +1,62 @@ +# Release + +Releases are mostly automated using +[release-it](https://github.com/release-it/release-it/) and +[lerna-changelog](https://github.com/lerna/lerna-changelog/). + + +## Preparation + +Since the majority of the actual release process is automated, the primary +remaining task prior to releasing is confirming that all pull requests that +have been merged since the last release have been labeled with the appropriate +`lerna-changelog` labels and the titles have been updated to ensure they +represent something that would make sense to our users. Some great information +on why this is important can be found at +[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall +guiding principle here is that changelogs are for humans, not machines. + +When reviewing merged PR's the labels to be used are: + +* breaking - Used when the PR is considered a breaking change. +* enhancement - Used when the PR adds a new feature or enhancement. +* bug - Used when the PR fixes a bug included in a previous release. +* documentation - Used when the PR adds or updates documentation. +* internal - Used for internal changes that still require a mention in the + changelog/release notes. + + +## Release + +Once the prep work is completed, the actual release is straight forward: + +* First, ensure that you have installed your projects dependencies: + +``` +yarn install +``` + +* Second, ensure that you have obtained a + [GitHub personal access token][generate-token] with the `repo` scope (no + other permissions are needed). Make sure the token is available as the + `GITHUB_AUTH` environment variable. + + For instance: + + ```bash + export GITHUB_AUTH=abc123def456 + ``` + +[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable + +* And last (but not least 😁) do your release. + +``` +npx release-it +``` + +[release-it](https://github.com/release-it/release-it/) manages the actual +release process. It will prompt you to to choose the version number after which +you will have the chance to hand tweak the changelog to be used (for the +`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging, +pushing the tag and commits, etc. diff --git a/config/ember-try.js b/ember-cached-decorator-polyfill/config/ember-try.js similarity index 100% rename from config/ember-try.js rename to ember-cached-decorator-polyfill/config/ember-try.js diff --git a/config/environment.js b/ember-cached-decorator-polyfill/config/environment.js similarity index 100% rename from config/environment.js rename to ember-cached-decorator-polyfill/config/environment.js diff --git a/ember-cli-build.js b/ember-cached-decorator-polyfill/ember-cli-build.js similarity index 100% rename from ember-cli-build.js rename to ember-cached-decorator-polyfill/ember-cli-build.js diff --git a/index.d.ts b/ember-cached-decorator-polyfill/index.d.ts similarity index 100% rename from index.d.ts rename to ember-cached-decorator-polyfill/index.d.ts diff --git a/index.js b/ember-cached-decorator-polyfill/index.js similarity index 100% rename from index.js rename to ember-cached-decorator-polyfill/index.js diff --git a/lib/transpile-modules.js b/ember-cached-decorator-polyfill/lib/transpile-modules.js similarity index 100% rename from lib/transpile-modules.js rename to ember-cached-decorator-polyfill/lib/transpile-modules.js diff --git a/ember-cached-decorator-polyfill/package.json b/ember-cached-decorator-polyfill/package.json new file mode 100644 index 0000000..7027719 --- /dev/null +++ b/ember-cached-decorator-polyfill/package.json @@ -0,0 +1,116 @@ +{ + "name": "ember-cached-decorator-polyfill", + "version": "0.1.0-3", + "description": "Polyfill for RFC 566: @cached", + "keywords": [ + "ember-addon", + "polyfill", + "glimmer", + "tracking", + "cache", + "cached", + "memo", + "memoize", + "memoized", + "memoization" + ], + "homepage": "https://github.com/ember-polyfills/ember-cached-decorator-polyfill#readme", + "bugs": { + "url": "https://github.com/ember-polyfills/ember-cached-decorator-polyfill/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ember-polyfills/ember-cached-decorator-polyfill.git" + }, + "license": "MIT", + "author": "Jan Buschtöns (https://jan.buschtoens.me)", + "directories": { + "test": "tests" + }, + "scripts": { + "build": "ember build --environment=production", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", + "lint:hbs": "ember-template-lint .", + "lint:js": "eslint .", + "lint:types": "tsc --noEmit", + "start": "ember serve", + "test": "npm-run-all lint:* test:*", + "test:ember": "ember test", + "test:ember-compatibility": "ember try:each" + }, + "dependencies": { + "ember-cache-primitive-polyfill": "^1.0.0", + "ember-cli-babel": "^7.21.0" + }, + "devDependencies": { + "@ember/optional-features": "^1.3.0", + "@glimmer/component": "^1.0.1", + "@glimmer/tracking": "^1.0.0", + "@types/ember": "^3.16.0", + "@types/ember-qunit": "^3.4.9", + "@types/ember-resolver": "^5.0.9", + "@types/ember__test-helpers": "^1.7.2", + "@types/qunit": "^2.9.1", + "@types/rsvp": "^4.0.3", + "babel-eslint": "^10.1.0", + "broccoli-asset-rev": "^3.0.0", + "ember-auto-import": "^1.6.0", + "ember-cli": "~3.20.0", + "ember-cli-dependency-checker": "^3.2.0", + "ember-cli-htmlbars": "^5.3.1", + "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-sri": "^2.1.1", + "ember-cli-typescript": "^3.1.4", + "ember-cli-typescript-blueprints": "^3.0.0", + "ember-cli-uglify": "^3.0.0", + "ember-disable-prototype-extensions": "^1.1.3", + "ember-export-application-global": "^2.0.1", + "ember-load-initializers": "^2.1.1", + "ember-maybe-import-regenerator": "^0.1.6", + "ember-qunit": "^4.6.0", + "ember-resolver": "^8.0.0", + "ember-source": "~3.20.4", + "ember-source-channel-url": "^3.0.0", + "ember-template-lint": "^2.9.1", + "ember-try": "^1.4.0", + "eslint": "^7.7.0", + "eslint-config-prettier": "^6.11.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.1.4", + "loader.js": "^4.7.0", + "npm-run-all": "^4.1.5", + "prettier": "^2.0.5", + "qunit-dom": "^1.2.0", + "release-it": "^13.6.7", + "release-it-lerna-changelog": "^2.3.0", + "typescript": "^3.9.7" + }, + "engines": { + "node": "10.* || >= 12" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org" + }, + "ember": { + "edition": "octane" + }, + "ember-addon": { + "before": "ember-cli-babel", + "configPath": "tests/dummy/config" + }, + "release-it": { + "plugins": { + "release-it-lerna-changelog": { + "infile": "CHANGELOG.md", + "launchEditor": false + } + }, + "git": { + "tagName": "v${version}" + }, + "github": { + "release": true, + "tokenRef": "GITHUB_AUTH" + } + } +} diff --git a/testem.js b/ember-cached-decorator-polyfill/testem.js similarity index 100% rename from testem.js rename to ember-cached-decorator-polyfill/testem.js diff --git a/tests/dummy/app/app.ts b/ember-cached-decorator-polyfill/tests/dummy/app/app.ts similarity index 100% rename from tests/dummy/app/app.ts rename to ember-cached-decorator-polyfill/tests/dummy/app/app.ts diff --git a/tests/dummy/app/components/.gitkeep b/ember-cached-decorator-polyfill/tests/dummy/app/components/.gitkeep similarity index 100% rename from tests/dummy/app/components/.gitkeep rename to ember-cached-decorator-polyfill/tests/dummy/app/components/.gitkeep diff --git a/tests/dummy/app/config/environment.d.ts b/ember-cached-decorator-polyfill/tests/dummy/app/config/environment.d.ts similarity index 100% rename from tests/dummy/app/config/environment.d.ts rename to ember-cached-decorator-polyfill/tests/dummy/app/config/environment.d.ts diff --git a/tests/dummy/app/controllers/.gitkeep b/ember-cached-decorator-polyfill/tests/dummy/app/controllers/.gitkeep similarity index 100% rename from tests/dummy/app/controllers/.gitkeep rename to ember-cached-decorator-polyfill/tests/dummy/app/controllers/.gitkeep diff --git a/tests/dummy/app/helpers/.gitkeep b/ember-cached-decorator-polyfill/tests/dummy/app/helpers/.gitkeep similarity index 100% rename from tests/dummy/app/helpers/.gitkeep rename to ember-cached-decorator-polyfill/tests/dummy/app/helpers/.gitkeep diff --git a/tests/dummy/app/index.html b/ember-cached-decorator-polyfill/tests/dummy/app/index.html similarity index 100% rename from tests/dummy/app/index.html rename to ember-cached-decorator-polyfill/tests/dummy/app/index.html diff --git a/tests/dummy/app/models/.gitkeep b/ember-cached-decorator-polyfill/tests/dummy/app/models/.gitkeep similarity index 100% rename from tests/dummy/app/models/.gitkeep rename to ember-cached-decorator-polyfill/tests/dummy/app/models/.gitkeep diff --git a/tests/dummy/app/router.ts b/ember-cached-decorator-polyfill/tests/dummy/app/router.ts similarity index 100% rename from tests/dummy/app/router.ts rename to ember-cached-decorator-polyfill/tests/dummy/app/router.ts diff --git a/tests/dummy/app/routes/.gitkeep b/ember-cached-decorator-polyfill/tests/dummy/app/routes/.gitkeep similarity index 100% rename from tests/dummy/app/routes/.gitkeep rename to ember-cached-decorator-polyfill/tests/dummy/app/routes/.gitkeep diff --git a/tests/dummy/app/styles/app.css b/ember-cached-decorator-polyfill/tests/dummy/app/styles/app.css similarity index 100% rename from tests/dummy/app/styles/app.css rename to ember-cached-decorator-polyfill/tests/dummy/app/styles/app.css diff --git a/tests/dummy/app/templates/application.hbs b/ember-cached-decorator-polyfill/tests/dummy/app/templates/application.hbs similarity index 100% rename from tests/dummy/app/templates/application.hbs rename to ember-cached-decorator-polyfill/tests/dummy/app/templates/application.hbs diff --git a/tests/dummy/config/ember-cli-update.json b/ember-cached-decorator-polyfill/tests/dummy/config/ember-cli-update.json similarity index 100% rename from tests/dummy/config/ember-cli-update.json rename to ember-cached-decorator-polyfill/tests/dummy/config/ember-cli-update.json diff --git a/tests/dummy/config/environment.js b/ember-cached-decorator-polyfill/tests/dummy/config/environment.js similarity index 100% rename from tests/dummy/config/environment.js rename to ember-cached-decorator-polyfill/tests/dummy/config/environment.js diff --git a/tests/dummy/config/optional-features.json b/ember-cached-decorator-polyfill/tests/dummy/config/optional-features.json similarity index 100% rename from tests/dummy/config/optional-features.json rename to ember-cached-decorator-polyfill/tests/dummy/config/optional-features.json diff --git a/tests/dummy/config/targets.js b/ember-cached-decorator-polyfill/tests/dummy/config/targets.js similarity index 100% rename from tests/dummy/config/targets.js rename to ember-cached-decorator-polyfill/tests/dummy/config/targets.js diff --git a/tests/dummy/public/robots.txt b/ember-cached-decorator-polyfill/tests/dummy/public/robots.txt similarity index 100% rename from tests/dummy/public/robots.txt rename to ember-cached-decorator-polyfill/tests/dummy/public/robots.txt diff --git a/tests/helpers/.gitkeep b/ember-cached-decorator-polyfill/tests/helpers/.gitkeep similarity index 100% rename from tests/helpers/.gitkeep rename to ember-cached-decorator-polyfill/tests/helpers/.gitkeep diff --git a/tests/index.html b/ember-cached-decorator-polyfill/tests/index.html similarity index 100% rename from tests/index.html rename to ember-cached-decorator-polyfill/tests/index.html diff --git a/tests/integration/cached-decorator-test.ts b/ember-cached-decorator-polyfill/tests/integration/cached-decorator-test.ts similarity index 100% rename from tests/integration/cached-decorator-test.ts rename to ember-cached-decorator-polyfill/tests/integration/cached-decorator-test.ts diff --git a/tests/test-helper.ts b/ember-cached-decorator-polyfill/tests/test-helper.ts similarity index 100% rename from tests/test-helper.ts rename to ember-cached-decorator-polyfill/tests/test-helper.ts diff --git a/tests/unit/cached-decorator-test.ts b/ember-cached-decorator-polyfill/tests/unit/cached-decorator-test.ts similarity index 100% rename from tests/unit/cached-decorator-test.ts rename to ember-cached-decorator-polyfill/tests/unit/cached-decorator-test.ts diff --git a/tsconfig.json b/ember-cached-decorator-polyfill/tsconfig.json similarity index 100% rename from tsconfig.json rename to ember-cached-decorator-polyfill/tsconfig.json diff --git a/vendor/.gitkeep b/ember-cached-decorator-polyfill/vendor/.gitkeep similarity index 100% rename from vendor/.gitkeep rename to ember-cached-decorator-polyfill/vendor/.gitkeep diff --git a/vendor/ember-cached-decorator-polyfill/index.js b/ember-cached-decorator-polyfill/vendor/ember-cached-decorator-polyfill/index.js similarity index 100% rename from vendor/ember-cached-decorator-polyfill/index.js rename to ember-cached-decorator-polyfill/vendor/ember-cached-decorator-polyfill/index.js diff --git a/package.json b/package.json index 7027719..377eca8 100644 --- a/package.json +++ b/package.json @@ -1,116 +1,7 @@ { - "name": "ember-cached-decorator-polyfill", - "version": "0.1.0-3", - "description": "Polyfill for RFC 566: @cached", - "keywords": [ - "ember-addon", - "polyfill", - "glimmer", - "tracking", - "cache", - "cached", - "memo", - "memoize", - "memoized", - "memoization" - ], - "homepage": "https://github.com/ember-polyfills/ember-cached-decorator-polyfill#readme", - "bugs": { - "url": "https://github.com/ember-polyfills/ember-cached-decorator-polyfill/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ember-polyfills/ember-cached-decorator-polyfill.git" - }, - "license": "MIT", - "author": "Jan Buschtöns (https://jan.buschtoens.me)", - "directories": { - "test": "tests" - }, - "scripts": { - "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", - "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", - "lint:types": "tsc --noEmit", - "start": "ember serve", - "test": "npm-run-all lint:* test:*", - "test:ember": "ember test", - "test:ember-compatibility": "ember try:each" - }, - "dependencies": { - "ember-cache-primitive-polyfill": "^1.0.0", - "ember-cli-babel": "^7.21.0" - }, - "devDependencies": { - "@ember/optional-features": "^1.3.0", - "@glimmer/component": "^1.0.1", - "@glimmer/tracking": "^1.0.0", - "@types/ember": "^3.16.0", - "@types/ember-qunit": "^3.4.9", - "@types/ember-resolver": "^5.0.9", - "@types/ember__test-helpers": "^1.7.2", - "@types/qunit": "^2.9.1", - "@types/rsvp": "^4.0.3", - "babel-eslint": "^10.1.0", - "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.6.0", - "ember-cli": "~3.20.0", - "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", - "ember-cli-inject-live-reload": "^2.0.2", - "ember-cli-sri": "^2.1.1", - "ember-cli-typescript": "^3.1.4", - "ember-cli-typescript-blueprints": "^3.0.0", - "ember-cli-uglify": "^3.0.0", - "ember-disable-prototype-extensions": "^1.1.3", - "ember-export-application-global": "^2.0.1", - "ember-load-initializers": "^2.1.1", - "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", - "ember-resolver": "^8.0.0", - "ember-source": "~3.20.4", - "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^2.9.1", - "ember-try": "^1.4.0", - "eslint": "^7.7.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", - "loader.js": "^4.7.0", - "npm-run-all": "^4.1.5", - "prettier": "^2.0.5", - "qunit-dom": "^1.2.0", - "release-it": "^13.6.7", - "release-it-lerna-changelog": "^2.3.0", - "typescript": "^3.9.7" - }, - "engines": { - "node": "10.* || >= 12" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org" - }, - "ember": { - "edition": "octane" - }, - "ember-addon": { - "before": "ember-cli-babel", - "configPath": "tests/dummy/config" - }, - "release-it": { - "plugins": { - "release-it-lerna-changelog": { - "infile": "CHANGELOG.md", - "launchEditor": false - } - }, - "git": { - "tagName": "v${version}" - }, - "github": { - "release": true, - "tokenRef": "GITHUB_AUTH" - } - } + "private": true, + "workspaces": [ + "ember-cached-decorator-polyfill", + "test-packages/*" + ] }