Skip to content

Commit

Permalink
Merge pull request #58 from bendemboski/upgrade-tooling
Browse files Browse the repository at this point in the history
Upgrade tooling
  • Loading branch information
bendemboski authored Mar 14, 2024
2 parents 99c2e58 + 7c49749 commit 655eb68
Show file tree
Hide file tree
Showing 41 changed files with 13,896 additions and 13,005 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
- uses: wyvox/action-setup-pnpm@v2
with:
node-version: 18
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
run: pnpm lint
- name: Run Tests
run: yarn test:ember
run: pnpm test:ember
working-directory: ./test-app

floating:
Expand All @@ -39,14 +35,12 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: wyvox/action-setup-pnpm@v2
with:
node-version: 18
cache: yarn
- name: Install Dependencies
run: yarn install --no-lockfile
args: '--no-lockfile'
- name: Run Tests
run: yarn test:ember
run: pnpm test:ember
working-directory: ./test-app

try-scenarios:
Expand All @@ -60,6 +54,7 @@ jobs:
matrix:
try-scenario:
- ember-lts-4.8
- ember-lts-4.12
- ember-release
- ember-beta
- ember-canary
Expand All @@ -68,13 +63,9 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
- uses: wyvox/action-setup-pnpm@v2
with:
node-version: 18
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
working-directory: ./test-app
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@

- `git clone <repository-url>`
- `cd ember-add-listener-helper`
- `yarn install`
- `pnpm install`

## Linting

- `yarn lint`
- `yarn lint:fix`
- `pnpm lint`
- `pnpm lint:fix`

## Building the addon

- `cd ember-add-listener-helper`
- `yarn build`
- `cd addon`
- `pnpm build`

## Running tests

- `cd test-app`
- `yarn test` – Runs the test suite on the current Ember version
- `yarn test:watch` – Runs the test suite in "watch mode"
- `pnpm test` – Runs the test suite on the current Ember version
- `pnpm test:watch` – Runs the test suite in "watch mode"

## Running the test application

- `cd test-app`
- `yarn start`
- `pnpm start`
- Visit the test application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ glimmer component and the publisher is an argument to that component. Using the
un/re-registering when arguments change, and unregistering on un-render. All
you have to do is:

```gjs
import { addListener } from 'ember-add-listener-helper';
export default <template>
{{addListener @publisher 'event' onEvent}}
</template>;
```

or

```hbs
{{add-listener @publisher 'event' this.onEvent}}
```
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Once the prep work is completed, the actual release is straight forward:
* First, ensure that you have installed your projects dependencies:

```sh
yarn install
pnpm install
```

* Second, ensure that you have obtained a
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@embroider/addon-shim": "^1.0.0"
},
"peerDependencies": {
"ember-source": "^4.8.0 || ^5.0.0"
"ember-source": ">= 4.8.0"
},
"devDependencies": {
"@babel/core": "^7.17.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ export default {
plugins: [
// These are the modules that users should be able to import from your
// addon. Anything not listed here may get optimized away.
addon.publicEntrypoints(['helpers/**/*.ts', 'template-registry.ts']),
addon.publicEntrypoints([
'index.js',
'template-registry.js',
'helpers/**/*.js',
]),

// These are the modules that should get reexported into the traditional
// "app" tree. Things in here should also be in publicEntrypoints above, but
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions addon/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as addListener } from './helpers/add-listener.ts';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type AddListenerHelper from './helpers/add-listener';
import type AddListenerHelper from './helpers/add-listener.ts';

export default interface EmberAddListenerHelperRegistry {
'add-listener': typeof AddListenerHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"environment": "ember-loose"
},
"compilerOptions": {
"declarationDir": "declarations"
"declarationDir": "declarations",
"allowImportingTsExtensions": true,
}
}
1 change: 0 additions & 1 deletion ember-add-listener-helper/.eslintcache

This file was deleted.

40 changes: 25 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,49 @@
"repository": "https://github.com/bendemboski/ember-add-listener-helper",
"license": "MIT",
"author": "Ben Demboski",
"workspaces": [
"ember-add-listener-helper",
"test-app"
],
"scripts": {
"build": "yarn workspace ember-add-listener-helper run build",
"lint": "yarn workspaces run lint",
"lint:fix": "yarn workspaces run lint:fix",
"prepare": "yarn build",
"build": "pnpm --filter ember-add-listener-helper build",
"preinstall": "npx only-allow pnpm",
"lint": "pnpm --filter '*' lint",
"lint:fix": "pnpm --filter '*' lint:fix",
"prepare": "pnpm build",
"release": "dotenv release-it",
"start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start:addon": "yarn workspace ember-add-listener-helper run start",
"start:test-app": "yarn workspace test-app run start",
"test": "yarn workspaces run test",
"release": "dotenv release-it"
"start:addon": "pnpm --filter ember-add-listener-helper start --no-watch.clearScreen",
"start:test-app": "pnpm --filter test-app start",
"test": "pnpm --filter '*' test:ember"
},
"devDependencies": {
"@release-it-plugins/lerna-changelog": "^6.0.0",
"@release-it-plugins/workspaces": "^4.0.0",
"concurrently": "^8.2.0",
"dotenv-cli": "^7.2.1",
"prettier": "^3.0.0",
"release-it": "^16.1.3"
},
"pnpm": {
"overrides": {
"@glimmer/validator": "0.84.3",
"@glimmer/util": "0.84.3"
}
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"release-it": {
"hooks": {
"before:init": "cp README.md LICENSE.md packages/ember-add-listener-helper/",
"after:bump": "pnpm install"
},
"plugins": {
"@release-it-plugins/lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
},
"@release-it-plugins/workspaces": true
"@release-it-plugins/workspaces": {
"workspaces": [
"packages/ember-add-listener-helper"
]
}
},
"git": {
"tagName": "v${version}"
Expand All @@ -50,6 +60,6 @@
},
"volta": {
"node": "18.12.0",
"yarn": "1.22.11"
"pnpm": "8.14.3"
}
}
Loading

0 comments on commit 655eb68

Please sign in to comment.