Skip to content

Commit 6125550

Browse files
authored
Merge pull request #403 from yapplabs/adopt-pnpm
Adopt pnpm
2 parents 46d5b8e + 3b75bb1 commit 6125550

File tree

17 files changed

+17892
-12293
lines changed

17 files changed

+17892
-12293
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323
/package.json.ember-try
2424
/package-lock.json.ember-try
2525
/yarn.lock.ember-try
26+
/pnpm-lock.yaml.ember-try

.github/workflows/ci.yml

Lines changed: 74 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: CI
22

3+
env:
4+
VOLTA_FEATURE_PNPM: 1
5+
36
on:
47
push:
58
branches:
@@ -17,33 +20,64 @@ jobs:
1720
runs-on: ubuntu-latest
1821

1922
steps:
20-
- uses: actions/checkout@v2
21-
- name: Install Node
22-
uses: actions/setup-node@v2
23+
- uses: actions/checkout@v4
24+
- name: Install volta
25+
uses: volta-cli/action@v4
26+
- name: Get pnpm store directory
27+
id: pnpm-cache
28+
shell: bash
29+
run: |
30+
echo "STORE_PATH=$(pnpm store path -s)" >> $GITHUB_OUTPUT
31+
- name: Setup pnpm cache
32+
uses: actions/cache@v4
33+
id: cache
2334
with:
24-
node-version: 16.x
25-
cache: yarn
35+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
36+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37+
restore-keys: |
38+
${{ runner.os }}-pnpm-store-
2639
- name: Install Dependencies
27-
run: yarn install --frozen-lockfile
40+
shell: bash
41+
run: pnpm install --frozen-lockfile
42+
- name: Prune pnpm store
43+
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
44+
shell: bash
45+
run: pnpm store prune
2846
- name: Lint
29-
run: yarn lint
47+
run: pnpm lint
3048
- name: Run Tests
31-
run: yarn test:ember
49+
run: pnpm test:ember
3250

3351
floating:
3452
name: "Floating Dependencies"
3553
runs-on: ubuntu-latest
3654

3755
steps:
38-
- uses: actions/checkout@v2
39-
- uses: actions/setup-node@v2
56+
- uses: actions/checkout@v4
57+
- name: Install volta
58+
uses: volta-cli/action@v4
59+
- name: Get pnpm store directory
60+
id: pnpm-cache
61+
shell: bash
62+
run: |
63+
echo "STORE_PATH=$(pnpm store path -s)" >> $GITHUB_OUTPUT
64+
- name: Setup pnpm cache
65+
uses: actions/cache@v4
66+
id: cache
4067
with:
41-
node-version: 16.x
42-
cache: yarn
68+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
69+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
70+
restore-keys: |
71+
${{ runner.os }}-pnpm-store-
4372
- name: Install Dependencies
44-
run: yarn install --no-lockfile
73+
shell: bash
74+
run: pnpm install --no-frozen-lockfile
75+
- name: Prune pnpm store
76+
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
77+
shell: bash
78+
run: pnpm store prune
4579
- name: Run Tests
46-
run: yarn test:ember
80+
run: pnpm test:ember
4781

4882
try-scenarios:
4983
name: ${{ matrix.try-scenario }}
@@ -56,22 +90,40 @@ jobs:
5690
try-scenario:
5791
- ember-lts-3.24
5892
- ember-lts-3.28
93+
- ember-lts-4.4
94+
- ember-lts-4.8
95+
- ember-lts-4.12
96+
- ember-lts-5.4
97+
- ember-lts-5.8
5998
- ember-release
6099
- ember-beta
61100
- ember-canary
62-
- ember-classic
63-
- ember-default-with-jquery
64101
- embroider-safe
65102
- embroider-optimized
66103

67104
steps:
68-
- uses: actions/checkout@v2
69-
- name: Install Node
70-
uses: actions/setup-node@v2
105+
- uses: actions/checkout@v4
106+
- name: Install volta
107+
uses: volta-cli/action@v4
108+
- name: Get pnpm store directory
109+
id: pnpm-cache
110+
shell: bash
111+
run: |
112+
echo "STORE_PATH=$(pnpm store path -s)" >> $GITHUB_OUTPUT
113+
- name: Setup pnpm cache
114+
uses: actions/cache@v4
115+
id: cache
71116
with:
72-
node-version: 16.x
73-
cache: yarn
117+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
118+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
119+
restore-keys: |
120+
${{ runner.os }}-pnpm-store-
74121
- name: Install Dependencies
75-
run: yarn install --frozen-lockfile
122+
shell: bash
123+
run: pnpm install --frozen-lockfile
124+
- name: Prune pnpm store
125+
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
126+
shell: bash
127+
run: pnpm store prune
76128
- name: Run Tests
77129
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@
2727
/package.json.ember-try
2828
/package-lock.json.ember-try
2929
/yarn.lock.ember-try
30+
/pnpm-lock.yaml.ember-try

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
/tests/
3030
/yarn-error.log
3131
/yarn.lock
32+
/pnpm-lock.yaml
3233
.gitkeep
3334

3435
# ember-try
@@ -38,3 +39,4 @@
3839
/package.json.ember-try
3940
/package-lock.json.ember-try
4041
/yarn.lock.ember-try
42+
/pnpm-lock.yaml.ember-try

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323
/package.json.ember-try
2424
/package-lock.json.ember-try
2525
/yarn.lock.ember-try
26+
/pnpm-lock.yaml.ember-try

README.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,32 @@ Unlike some other modal libraries for Ember, ember-modal-dialog uses solutions l
88

99
<!-- toc -->
1010

11-
- [Live Demo and Test Examples](#live-demo-and-test-examples)
12-
- [Including In An Ember Application](#including-in-an-ember-application)
13-
- [Upgrading](#upgrading)
14-
- [Controller-bound Usage](#controller-bound-usage)
15-
- [Routable Usage](#routable-usage)
16-
- [Configurable Properties](#configurable-properties)
17-
* [modal-dialog](#modal-dialog)
18-
+ [Tethering](#tethering)
19-
+ [Animation](#animation)
20-
* [Optional Dependencies](#optional-dependencies)
21-
- [Which Component Should I Use?](#which-component-should-i-use)
22-
- [Positioning](#positioning)
23-
+ [Caveats](#caveats)
24-
- [Wormholes](#wormholes)
25-
- [Configuring the Modal Root Element Id](#configuring-the-modal-root-element-id)
26-
- [Configuring Styles](#configuring-styles)
27-
- [Keyboard shortcuts](#keyboard-shortcuts)
28-
- [iOS](#ios)
29-
- [Custom Modals](#custom-modals)
30-
- [Using as a nested addon](#using-as-a-nested-addon)
31-
- [Dependencies](#dependencies)
32-
- [Additional Resources](#additional-resources)
33-
- [Contributing](#contributing)
34-
- [Credits](#credits)
11+
- [Ember Modal Dialog ](#ember-modal-dialog--)
12+
- [Table of Contents](#table-of-contents)
13+
- [Live Demo and Test Examples](#live-demo-and-test-examples)
14+
- [Including In An Ember Application](#including-in-an-ember-application)
15+
- [Upgrading](#upgrading)
16+
- [Controller-bound Usage](#controller-bound-usage)
17+
- [Routable Usage](#routable-usage)
18+
- [Configurable Properties](#configurable-properties)
19+
- [modal-dialog](#modal-dialog)
20+
- [Tethering](#tethering)
21+
- [Animation](#animation)
22+
- [Optional Dependencies](#optional-dependencies)
23+
- [Which Component Should I Use?](#which-component-should-i-use)
24+
- [Positioning](#positioning)
25+
- [Caveats](#caveats)
26+
- [Wormholes](#wormholes)
27+
- [Configuring the Modal Root Element Id](#configuring-the-modal-root-element-id)
28+
- [Configuring Styles](#configuring-styles)
29+
- [Keyboard shortcuts](#keyboard-shortcuts)
30+
- [iOS](#ios)
31+
- [Custom Modals](#custom-modals)
32+
- [Using as a nested addon](#using-as-a-nested-addon)
33+
- [Compatibility \& Dependencies](#compatibility--dependencies)
34+
- [Additional Resources](#additional-resources)
35+
- [Contributing](#contributing)
36+
- [Credits](#credits)
3537

3638
<!-- tocstop -->
3739

@@ -384,8 +386,9 @@ module.exports = {
384386
};
385387
```
386388

387-
## Dependencies
389+
## Compatibility & Dependencies
388390

391+
* For Ember versions >= 4.0, liquid-tether is not compatible so the animated+tethered variation of ember-modal-dialog will not work
389392
* For Ember versions >= 3.20, use the latest published version
390393
* For Ember versions >= 2.8 and < 3.20, use the latest 3.x version (Note that ember-cli >= 2.13 is required, though your ember version may be >= 2.8)
391394
* For Ember versions >= 2.4 and < 2.8, use the latest 2.x version

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Once the prep work is completed, the actual release is straight forward:
3333
* First, ensure that you have installed your projects dependencies:
3434

3535
```
36-
yarn install
36+
pnpm install
3737
```
3838

3939
* Second, ensure that you have obtained a

config/ember-try.js

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');
55

66
module.exports = async function () {
77
return {
8-
useYarn: true,
8+
usePnpm: true,
99
scenarios: [
1010
{
1111
name: 'ember-lts-3.24',
@@ -24,57 +24,66 @@ module.exports = async function () {
2424
},
2525
},
2626
{
27-
name: 'ember-release',
27+
name: 'ember-lts-4.4',
2828
npm: {
2929
devDependencies: {
30-
'ember-source': await getChannelURL('release'),
30+
'ember-source': '~4.4.0',
3131
},
3232
},
3333
},
3434
{
35-
name: 'ember-beta',
35+
name: 'ember-lts-4.8',
3636
npm: {
3737
devDependencies: {
38-
'ember-source': await getChannelURL('beta'),
38+
'ember-source': '~4.8.0',
3939
},
4040
},
4141
},
4242
{
43-
name: 'ember-canary',
43+
name: 'ember-lts-4.12',
4444
npm: {
4545
devDependencies: {
46-
'ember-source': await getChannelURL('canary'),
46+
'ember-source': '~4.12.0',
4747
},
4848
},
4949
},
5050
{
51-
name: 'ember-default-with-jquery',
52-
env: {
53-
EMBER_OPTIONAL_FEATURES: JSON.stringify({
54-
'jquery-integration': true,
55-
}),
51+
name: 'ember-lts-5.4',
52+
npm: {
53+
devDependencies: {
54+
'ember-source': '~5.4.0',
55+
},
5656
},
57+
},
58+
{
59+
name: 'ember-lts-5.8',
5760
npm: {
5861
devDependencies: {
59-
'@ember/jquery': '^1.1.0',
62+
'ember-source': '~5.8.0',
6063
},
6164
},
6265
},
6366
{
64-
name: 'ember-classic',
65-
env: {
66-
EMBER_OPTIONAL_FEATURES: JSON.stringify({
67-
'application-template-wrapper': true,
68-
'default-async-observers': false,
69-
'template-only-glimmer-components': false,
70-
}),
67+
name: 'ember-release',
68+
npm: {
69+
devDependencies: {
70+
'ember-source': await getChannelURL('release'),
71+
},
7172
},
73+
},
74+
{
75+
name: 'ember-beta',
7276
npm: {
7377
devDependencies: {
74-
'ember-source': '~3.28.0',
78+
'ember-source': await getChannelURL('beta'),
7579
},
76-
ember: {
77-
edition: 'classic',
80+
},
81+
},
82+
{
83+
name: 'ember-canary',
84+
npm: {
85+
devDependencies: {
86+
'ember-source': await getChannelURL('canary'),
7887
},
7988
},
8089
},

ember-cli-build.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
55
module.exports = function (defaults) {
66
let app = new EmberAddon(defaults, {
77
snippetSearchPaths: ['tests/dummy/app'],
8+
'ember-prism': {
9+
theme: 'twilight',
10+
components: ['scss', 'javascript', 'markup'],
11+
},
812
});
913

1014
/*

0 commit comments

Comments
 (0)