Skip to content

Commit f54b3ce

Browse files
committed
update blueprint and fix tests
1 parent d6d9832 commit f54b3ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+17756
-24713
lines changed

.bowerrc

-4
This file was deleted.

.ember-cli

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@
55

66
Setting `disableAnalytics` to true will prevent any data from being sent.
77
*/
8-
"disableAnalytics": false
8+
"disableAnalytics": false,
9+
10+
/**
11+
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
12+
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
13+
*/
14+
"isTypeScriptProject": false
915
}

.eslintignore

+5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
# misc
1414
/coverage/
1515
!.*
16+
.*/
17+
.eslintcache
1618

1719
# ember-try
1820
/.node_modules.ember-try/
1921
/bower.json.ember-try
22+
/npm-shrinkwrap.json.ember-try
2023
/package.json.ember-try
24+
/package-lock.json.ember-try
25+
/yarn.lock.ember-try

.eslintrc.js

+25-26
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,47 @@ module.exports = {
77
ecmaVersion: 2018,
88
sourceType: 'module',
99
ecmaFeatures: {
10-
legacyDecorators: true
11-
}
10+
legacyDecorators: true,
11+
},
1212
},
13-
plugins: [
14-
'ember'
15-
],
13+
plugins: ['ember'],
1614
extends: [
1715
'eslint:recommended',
18-
'plugin:ember/recommended'
16+
'plugin:ember/recommended',
17+
'plugin:prettier/recommended',
1918
],
2019
env: {
21-
browser: true
20+
browser: true,
2221
},
2322
rules: {},
2423
overrides: [
2524
// node files
2625
{
2726
files: [
28-
'.eslintrc.js',
29-
'.template-lintrc.js',
30-
'ember-cli-build.js',
31-
'index.js',
32-
'testem.js',
33-
'blueprints/*/index.js',
34-
'config/**/*.js',
35-
'tests/dummy/config/**/*.js'
36-
],
37-
excludedFiles: [
38-
'addon/**',
39-
'addon-test-support/**',
40-
'app/**',
41-
'tests/dummy/app/**'
27+
'./.eslintrc.js',
28+
'./.prettierrc.js',
29+
'./.template-lintrc.js',
30+
'./ember-cli-build.js',
31+
'./index.js',
32+
'./testem.js',
33+
'./blueprints/*/index.js',
34+
'./config/**/*.js',
35+
'./tests/dummy/config/**/*.js',
4236
],
4337
parserOptions: {
44-
sourceType: 'script'
38+
sourceType: 'script',
4539
},
4640
env: {
4741
browser: false,
48-
node: true
42+
node: true,
4943
},
5044
plugins: ['node'],
51-
extends: ['plugin:node/recommended']
52-
}
53-
]
45+
extends: ['plugin:node/recommended'],
46+
},
47+
{
48+
// test files
49+
files: ['tests/**/*-test.{js,ts}'],
50+
extends: ['plugin:qunit/recommended'],
51+
},
52+
],
5453
};

.github/workflows/ci.yml

+61-53
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,50 @@ name: CI
33
on:
44
push:
55
branches:
6+
- main
67
- master
7-
tags:
8-
- '*'
9-
pull_request:
10-
schedule:
11-
- cron: '0 4 * * 1' # Mondays at 4am
8+
pull_request: {}
9+
10+
concurrency:
11+
group: ci-${{ github.head_ref || github.ref }}
12+
cancel-in-progress: true
1213

1314
jobs:
1415
test:
15-
name: Tests
16+
name: "Tests"
1617
runs-on: ubuntu-latest
1718

1819
steps:
19-
- name: Checkout code
20-
uses: actions/checkout@v2
21-
- name: Setup node.js
22-
uses: volta-cli/action@v1
23-
- name: Install dependencies
24-
run: yarn --frozen-lockfile
20+
- uses: actions/checkout@v3
21+
- name: Install Node
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 14.x
25+
cache: npm
26+
- name: Install Dependencies
27+
run: npm ci
2528
- name: Lint
26-
run: yarn lint
27-
- name: Test
28-
run: yarn test:ember
29+
run: npm run lint
30+
- name: Run Tests
31+
run: npm run test:ember
32+
33+
floating:
34+
name: "Floating Dependencies"
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- uses: actions/checkout@v3
39+
- uses: actions/setup-node@v3
40+
with:
41+
node-version: 12.x
42+
cache: npm
43+
- name: Install Dependencies
44+
run: npm install --no-shrinkwrap
45+
- name: Run Tests
46+
run: npm run test:ember
47+
2948
test-os:
30-
name: Tests (Windows & MacOs)
49+
name: Tests Full Matrix ${{ matrix.os }} Node version ${{ matrix.node }}
3150
runs-on: ${{ matrix.os }}
3251

3352
strategy:
@@ -38,53 +57,42 @@ jobs:
3857
steps:
3958
- name: Checkout code
4059
uses: actions/checkout@v2
41-
- name: Setup node.js
42-
uses: volta-cli/action@v1
60+
- name: Install Node
61+
uses: actions/setup-node@v3
62+
with:
63+
node-version: ${{ matrix.node }}
64+
cache: npm
4365
- name: Install dependencies
44-
run: yarn --frozen-lockfile
45-
- name: Lint
46-
run: yarn lint
66+
run: npm i
4767
- name: Test
48-
run: yarn test:ember
49-
68+
run: npm run test:ember
5069

51-
test-no-lock:
52-
name: Floating Dependencies
70+
try-scenarios:
71+
name: ${{ matrix.try-scenario }}
5372
runs-on: ubuntu-latest
73+
needs: "test"
5474

55-
steps:
56-
- name: Checkout code
57-
uses: actions/checkout@v2
58-
- name: Setup node.js
59-
uses: volta-cli/action@v1
60-
- name: Install dependencies
61-
run: yarn --no-lockfile
62-
- name: Test
63-
run: yarn test:ember
64-
65-
test-try:
66-
name: Additional Tests
67-
runs-on: ubuntu-latest
68-
needs:
69-
- test
7075
strategy:
76+
fail-fast: false
7177
matrix:
72-
scenario:
73-
- ember-lts-3.16
74-
- ember-lts-3.20
78+
try-scenario:
79+
- ember-lts-3.24
80+
- ember-lts-3.28
7581
- ember-release
7682
- ember-beta
7783
- ember-canary
78-
- ember-default-with-jquery
7984
- ember-classic
80-
- embroider-tests
85+
- embroider-safe
86+
- embroider-optimized
8187

8288
steps:
83-
- name: Checkout code
84-
uses: actions/checkout@v2
85-
- name: Setup node.js
86-
uses: volta-cli/action@v1
87-
- name: Install dependencies
88-
run: yarn --frozen-lockfile
89-
- name: Test
90-
run: yarn ember try:one ${{ matrix.scenario }}
89+
- uses: actions/checkout@v3
90+
- name: Install Node
91+
uses: actions/setup-node@v3
92+
with:
93+
node-version: 12.x
94+
cache: npm
95+
- name: Install Dependencies
96+
run: npm ci
97+
- name: Run Tests
98+
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/.env*
1313
/.pnp*
1414
/.sass-cache
15+
/.eslintcache
1516
/connect.lock
1617
/coverage/
1718
/libpeerconnection.log
@@ -22,4 +23,10 @@
2223
# ember-try
2324
/.node_modules.ember-try/
2425
/bower.json.ember-try
26+
/npm-shrinkwrap.json.ember-try
2527
/package.json.ember-try
28+
/package-lock.json.ember-try
29+
/yarn.lock.ember-try
30+
31+
# broccoli-debug
32+
/DEBUG/

.npmignore

+8
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@
1010
/.editorconfig
1111
/.ember-cli
1212
/.env*
13+
/.eslintcache
1314
/.eslintignore
1415
/.eslintrc.js
1516
/.git/
17+
/.github/
1618
/.gitignore
19+
/.prettierignore
20+
/.prettierrc.js
1721
/.template-lintrc.js
1822
/.travis.yml
1923
/.watchmanconfig
@@ -23,10 +27,14 @@
2327
/ember-cli-build.js
2428
/testem.js
2529
/tests/
30+
/yarn-error.log
2631
/yarn.lock
2732
.gitkeep
2833

2934
# ember-try
3035
/.node_modules.ember-try/
3136
/bower.json.ember-try
37+
/npm-shrinkwrap.json.ember-try
3238
/package.json.ember-try
39+
/package-lock.json.ember-try
40+
/yarn.lock.ember-try

.prettierignore

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# unconventional js
2+
/blueprints/*/files/
3+
/vendor/
4+
5+
# compiled output
6+
/dist/
7+
/tmp/
8+
9+
# dependencies
10+
/bower_components/
11+
/node_modules/
12+
13+
# misc
14+
/coverage/
15+
!.*
16+
.eslintcache
17+
.lint-todo/
18+
19+
# ember-try
20+
/.node_modules.ember-try/
21+
/bower.json.ember-try
22+
/npm-shrinkwrap.json.ember-try
23+
/package.json.ember-try
24+
/package-lock.json.ember-try
25+
/yarn.lock.ember-try

.prettierrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = {
4+
singleQuote: true,
5+
};

.template-lintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

33
module.exports = {
4-
extends: 'octane'
4+
extends: 'recommended',
55
};

CONTRIBUTING.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22

33
## Installation
44

5-
* `git clone https://github.com/emberjs/ember-inflector.git`
5+
* `git clone <repository-url>`
66
* `cd ember-inflector`
7-
* `yarn install`
7+
* `npm install`
88

99
## Linting
1010

11-
* `yarn lint:hbs`
12-
* `yarn lint:js`
13-
* `yarn lint:js -- --fix`
11+
* `npm run lint`
12+
* `npm run lint:fix`
1413

1514
## Running tests
1615

@@ -23,4 +22,4 @@
2322
* `ember serve`
2423
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
2524

26-
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
25+
For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-2020 Stefan Penner and ember-inflector contributors
3+
Copyright (c) 2015-2024 Stefan Penner and ember-inflector contributors
44

55
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:
66

0 commit comments

Comments
 (0)