Skip to content

Commit

Permalink
Merge pull request #499 from emberjs/v2-addon
Browse files Browse the repository at this point in the history
convert to a v2 addon using ember init
  • Loading branch information
NullVoxPopuli authored Jul 24, 2024
2 parents 26011df + 265e398 commit 51bb724
Show file tree
Hide file tree
Showing 80 changed files with 16,466 additions and 18,601 deletions.
15 changes: 0 additions & 15 deletions .ember-cli

This file was deleted.

73 changes: 28 additions & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,62 +18,42 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 14.x
cache: npm
node-version: 18
cache: pnpm
- name: Install Dependencies
run: npm ci
run: pnpm install --frozen-lockfile
- name: Lint
run: npm run lint
run: pnpm lint
- name: Run Tests
run: npm run test:ember
run: pnpm test

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
node-version: 14.x
cache: npm
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: npm install --no-shrinkwrap
run: pnpm install --no-lockfile
- name: Run Tests
run: npm run test:ember

test-os:
name: Tests Full Matrix ${{ matrix.os }} Node version ${{ matrix.node }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: ['10', '12', '14']
os: [ubuntu-latest, windows-latest]

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install dependencies
run: npm i
- name: Test
run: npm run test:ember
run: pnpm test

try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: "test"
needs: 'test'
timeout-minutes: 10

strategy:
Expand All @@ -86,20 +66,23 @@ jobs:
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-lts-5.4
- ember-release
- ember-beta
- ember-canary
- embroider-safe
- embroider-optimized

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 14.x
cache: npm
node-version: 18
cache: pnpm
- name: Install Dependencies
run: npm ci
run: pnpm install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
working-directory: test-app
9 changes: 3 additions & 6 deletions .github/workflows/plan-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,13 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18

- run: npm ci

- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lockfile
- name: "Generate Explanation and Prep Changelogs"
id: explanation
run: |
set +e
npx release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
if [ $? -ne 0 ]; then
echo 'text<<EOF' >> $GITHUB_OUTPUT
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@ jobs:
node-version: 18
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
registry-url: 'https://registry.npmjs.org'

- run: npm ci
- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lockfile
- name: npm publish
run: npx release-plan publish

run: pnpm release-plan publish
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Because this library needs to be built,
# we can't easily point package.json files at the git repo for easy cross-repo testing.
#
# This workflow brings back that capability by placing the compiled assets on a "dist" branch
# (configurable via the "branch" option below)
name: Push dist

on:
push:
branches:
- main
- master

jobs:
push-dist:
name: Push dist
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- uses: kategengler/[email protected]
with:
branch: dist
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: 'ember-inflector'
30 changes: 10 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/
node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log
.env*
.pnp*
.pnpm-debug.log
.sass-cache
.eslintcache
coverage/
npm-debug.log*
yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.ember-try.yaml

# broccoli-debug
/DEBUG/
41 changes: 0 additions & 41 deletions .npmignore

This file was deleted.

21 changes: 3 additions & 18 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/
# Prettier is also run from each package, so the ignores here
# protect against files that may not be within a package

# misc
/coverage/
!.*
.eslintcache
.lint-todo/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.ember-try.yaml
6 changes: 6 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'use strict';

module.exports = {
plugins: ['prettier-plugin-ember-template-tag'],
singleQuote: true,
};
3 changes: 0 additions & 3 deletions .watchmanconfig

This file was deleted.

28 changes: 17 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,30 @@

## Installation

* `git clone <repository-url>`
* `cd ember-inflector`
* `npm install`
- `git clone <repository-url>`
- `cd ember-inflector`
- `pnpm install`

## Linting

* `npm run lint`
* `npm run lint:fix`
- `pnpm lint`
- `pnpm lint:fix`

## Building the addon

- `cd ember-inflector`
- `pnpm build`

## 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
- `cd test-app`
- `pnpm test` – Runs the test suite on the current Ember version
- `pnpm test:watch` – Runs the test suite in "watch mode"

## Running the dummy application
## Running the test application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
- `cd test-app`
- `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/).
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ Ember Inflector is a library for inflecting words between plural and singular fo

## Compatibility

* Ember.js v3.16 or above
* Ember CLI v2.13 or above
* Node.js v10 or above

- Ember.js v3.16 or above
- Embroider or ember-auto-import v2

## Installation

Expand Down Expand Up @@ -77,7 +75,6 @@ Specify a count with the word, with the pluralization being based on the number

See the [Contributing](CONTRIBUTING.md) guide for details.


## License

This project is licensed under the [MIT License](LICENSE.md).
2 changes: 0 additions & 2 deletions app/helpers/pluralize.js

This file was deleted.

2 changes: 0 additions & 2 deletions app/helpers/singularize.js

This file was deleted.

Loading

0 comments on commit 51bb724

Please sign in to comment.