Skip to content

Commit 10a57f5

Browse files
Drop support for Ember < 4.12 (#570)
* Create ember-cli-update.json * Delete yarn.lock * Update to latest blueprints * Get tests running * Update README.md * Change ember-source to 5.x * Add super secret .npmrc * Fix embroider-optimized
1 parent 3292ec1 commit 10a57f5

Some content is hidden

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

78 files changed

+15089
-13166
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,50 @@ name: CI
33
on:
44
push:
55
branches:
6+
- main
67
- master
7-
- 'v*'
88
pull_request: {}
99

1010
concurrency:
1111
group: ci-${{ github.head_ref || github.ref }}
1212
cancel-in-progress: true
1313

14-
env:
15-
NODE_VERSION: 16
16-
1714
jobs:
18-
lint:
19-
name: Lint files and dependencies
15+
test:
16+
name: "Tests"
2017
runs-on: ubuntu-latest
2118
timeout-minutes: 10
22-
steps:
23-
- name: Check out a copy of the repo
24-
uses: actions/checkout@v3
2519

26-
- name: Use Node.js ${{ env.NODE_VERSION }}
27-
uses: actions/setup-node@v3
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: pnpm/action-setup@v4
23+
- uses: actions/setup-node@v4
2824
with:
29-
cache: 'yarn'
30-
node-version: ${{ env.NODE_VERSION }}
31-
32-
- name: Install dependencies
33-
run: yarn install --frozen-lockfile
34-
25+
node-version: 18
26+
cache: pnpm
27+
- name: Install Dependencies
28+
run: pnpm install --frozen-lockfile
3529
- name: Lint
36-
run: yarn lint
30+
run: pnpm lint
31+
- name: Run Tests
32+
run: pnpm test
3733

38-
test:
39-
name: 'Tests'
34+
floating:
35+
name: "Floating Dependencies"
4036
runs-on: ubuntu-latest
4137
timeout-minutes: 10
4238

4339
steps:
44-
- uses: actions/checkout@v3
45-
- name: Install Node
46-
uses: actions/setup-node@v3
40+
- uses: actions/checkout@v4
41+
- uses: pnpm/action-setup@v4
42+
- uses: actions/setup-node@v4
4743
with:
48-
node-version: ${{ env.NODE_VERSION }}
49-
cache: yarn
44+
node-version: 18
45+
cache: pnpm
5046
- name: Install Dependencies
51-
run: yarn install --frozen-lockfile
47+
run: pnpm install --no-lockfile
5248
- name: Run Tests
53-
run: yarn test:ember
54-
working-directory: test-app
49+
run: pnpm test
5550

5651
try-scenarios:
5752
name: ${{ matrix.try-scenario }}
@@ -63,23 +58,23 @@ jobs:
6358
fail-fast: false
6459
matrix:
6560
try-scenario:
66-
- ember-lts-3.28
67-
- ember-lts-4.4
61+
- ember-lts-4.12
62+
- ember-lts-5.4
6863
- ember-release
6964
- ember-beta
7065
- ember-canary
7166
- embroider-safe
7267
- embroider-optimized
7368

7469
steps:
75-
- uses: actions/checkout@v3
76-
- name: Install Node
77-
uses: actions/setup-node@v3
70+
- uses: actions/checkout@v4
71+
- uses: pnpm/action-setup@v4
72+
- uses: actions/setup-node@v4
7873
with:
79-
node-version: ${{ env.NODE_VERSION }}
80-
cache: yarn
74+
node-version: 18
75+
cache: pnpm
8176
- name: Install Dependencies
82-
run: yarn install --frozen-lockfile
77+
run: pnpm install --frozen-lockfile
8378
- name: Run Tests
84-
run: yarn ember try:one ${{ matrix.try-scenario }}
79+
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
8580
working-directory: test-app

.github/workflows/push-dist.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Because this library needs to be built,
2+
# we can't easily point package.json files at the git repo for easy cross-repo testing.
3+
#
4+
# This workflow brings back that capability by placing the compiled assets on a "dist" branch
5+
# (configurable via the "branch" option below)
6+
name: Push dist
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
- master
13+
14+
jobs:
15+
push-dist:
16+
name: Push dist
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 10
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: pnpm/action-setup@v4
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 18
26+
cache: pnpm
27+
- name: Install Dependencies
28+
run: pnpm install --frozen-lockfile
29+
- uses: kategengler/put-built-npm-package-contents-on-branch@v2.0.0
30+
with:
31+
branch: dist
32+
token: ${{ secrets.GITHUB_TOKEN }}
33+
working-directory: 'ember-launch-darkly'

.gitignore

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
11
# See https://help.github.com/ignore-files/ for more about ignoring files.
22

3-
# compiled output
4-
/dist/
5-
/tmp/
6-
73
# dependencies
8-
/bower_components/
9-
/node_modules/
4+
node_modules/
105

116
# misc
12-
/.env*
13-
/.pnp*
14-
/.sass-cache
15-
/.eslintcache
16-
/connect.lock
17-
/coverage/
18-
/libpeerconnection.log
19-
/npm-debug.log*
20-
/testem.log
21-
/yarn-error.log
7+
.env*
8+
.pnp*
9+
.pnpm-debug.log
10+
.sass-cache
11+
.eslintcache
12+
coverage/
13+
npm-debug.log*
14+
yarn-error.log
2215

2316
# ember-try
2417
/.node_modules.ember-try/
25-
/bower.json.ember-try
26-
/npm-shrinkwrap.json.ember-try
2718
/package.json.ember-try
2819
/package-lock.json.ember-try
2920
/yarn.lock.ember-try
21+
/pnpm-lock.ember-try.yaml
3022

31-
# broccoli-debug
32-
/DEBUG/

.npmrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
####################
2+
# super strict mode
3+
####################
4+
auto-install-peers=false
5+
strict-peer-dependents=true
6+
resolve-peers-from-workspace-root=false
7+
8+
################
9+
# Optimizations
10+
################
11+
# Less strict, but required for tooling to not barf on duplicate peer trees.
12+
# (many libraries declare the same peers, which resolve to the same
13+
# versions)
14+
peers-suffix-max-length=40
15+
dedupe-injected-deps=true
16+
dedupe-peer-dependents=true
17+
public-hoist-pattern[]=ember-source
18+
19+
################
20+
# Compatibility
21+
################
22+
# highest is what everyone is used to, but
23+
# not ensuring folks are actually compatible with declared ranges.
24+
resolution-mode=highest

.prettierignore

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
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/
1+
# Prettier is also run from each package, so the ignores here
2+
# protect against files that may not be within a package
123

134
# misc
14-
/coverage/
155
!.*
16-
.eslintcache
176
.lint-todo/
187

198
# ember-try
209
/.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
10+
/pnpm-lock.ember-try.yaml

.prettierrc.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
'use strict';
2+
3+
module.exports = {
4+
plugins: ['prettier-plugin-ember-template-tag'],
5+
singleQuote: true,
6+
};

CONTRIBUTING.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,30 @@
22

33
## Installation
44

5-
* `git clone <repository-url>`
6-
* `cd my-addon`
7-
* `npm install`
5+
- `git clone <repository-url>`
6+
- `cd ember-launch-darkly`
7+
- `pnpm install`
88

99
## Linting
1010

11-
* `npm run lint:hbs`
12-
* `npm run lint:js`
13-
* `npm run lint:js -- --fix`
11+
- `pnpm lint`
12+
- `pnpm lint:fix`
13+
14+
## Building the addon
15+
16+
- `cd ember-launch-darkly`
17+
- `pnpm build`
1418

1519
## Running tests
1620

17-
* `ember test` – Runs the test suite on the current Ember version
18-
* `ember test --server` – Runs the test suite in "watch mode"
19-
* `ember try:each` – Runs the test suite against multiple Ember versions
21+
- `cd test-app`
22+
- `pnpm test` – Runs the test suite on the current Ember version
23+
- `pnpm test:watch` – Runs the test suite in "watch mode"
2024

21-
## Running the dummy application
25+
## Running the test application
2226

23-
* `ember serve`
24-
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
27+
- `cd test-app`
28+
- `pnpm start`
29+
- Visit the test application at [http://localhost:4200](http://localhost:4200).
2530

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

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019
3+
Copyright (c) 2025
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

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ This addon wraps the [Launch Darkly](https://launchdarkly.com/) feature flagging
66

77
## Compatibility
88

9-
| Addon version | Ember version | |
10-
| :----------------------------------------------------------------------------------------: | :-------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
11-
| [v3.0](https://github.com/adopted-ember-addons/ember-launch-darkly/releases/tag/v2.0.0) | >= [v3.28](https://github.com/emberjs/ember.js/releases/tag/v3.28.0) and [v4.4](https://github.com/emberjs/ember.js/releases/tag/v4.4.0) | [README](README.md) |
12-
| [v2.0](https://github.com/adopted-ember-addons/ember-launch-darkly/releases/tag/v2.0.0) | >= [v3.17](https://github.com/emberjs/ember.js/releases/tag/v3.17.3) | [README](README.md) |
13-
| <= [v1.0](https://github.com/adopted-ember-addons/ember-launch-darkly/releases/tag/v1.0.0) | <= [v3.16](https://github.com/emberjs/ember.js/releases/tag/v3.16.10) | [README](https://github.com/adopted-ember-addons/ember-launch-darkly/blob/v1.0.0/README.md) |
9+
| Addon version | Ember version | |
10+
|---------------|-------------------|---------------------------------------------------------------------------------------------|
11+
| v4.0 | >= v4.12 | [README](README.md) |
12+
| v3.0 | >= v3.28 and v4.4 | [README](README.md) |
13+
| v2.0 | >= v3.17 | [README](README.md) |
14+
| <= v1.0 | <= v3.16 | [README](https://github.com/adopted-ember-addons/ember-launch-darkly/blob/v1.0.0/README.md) |
1415

1516
## Table of Contents
1617

@@ -370,7 +371,7 @@ import { module, test } from 'qunit';
370371
import { visit, currentURL, click } from '@ember/test-helpers';
371372
import { setupApplicationTest } from 'ember-qunit';
372373

373-
import { setupLaunchDarkly } from 'ember-launch-darkly/test-support';
374+
import setupLaunchDarkly from 'ember-launch-darkly/test-support/setup-launch-darkly'';
374375
375376
module('Acceptance | Homepage', function (hooks) {
376377
setupApplicationTest(hooks);
@@ -421,7 +422,7 @@ import { setupRenderingTest } from 'ember-qunit';
421422
import { render } from '@ember/test-helpers';
422423
import hbs from 'htmlbars-inline-precompile';
423424
424-
import { setupLaunchDarkly } from 'ember-launch-darkly/test-support';
425+
import setupLaunchDarkly from 'ember-launch-darkly/test-support/setup-launch-darkly';
425426
426427
module('Integration | Component | foo', function (hooks) {
427428
setupRenderingTest(hooks);

config/ember-cli-update.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"schemaVersion": "1.0.0",
3+
"projectName": "ember-launch-darkly",
4+
"packages": [
5+
{
6+
"name": "@embroider/addon-blueprint",
7+
"version": "4.1.1",
8+
"blueprints": [
9+
{
10+
"name": "@embroider/addon-blueprint",
11+
"isBaseBlueprint": true,
12+
"options": [
13+
"--ci-provider=github",
14+
"--pnpm"
15+
]
16+
}
17+
]
18+
}
19+
]
20+
}

0 commit comments

Comments
 (0)