Skip to content

Commit

Permalink
Adopt pnpm
Browse files Browse the repository at this point in the history
- Move test app to use ember-prism and updated ember-code-snippet
  • Loading branch information
lukemelia committed Sep 30, 2024
1 parent 46d5b8e commit 4badb14
Show file tree
Hide file tree
Showing 17 changed files with 17,900 additions and 12,292 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.yaml.ember-try
96 changes: 74 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: CI

env:
VOLTA_FEATURE_PNPM: 1

on:
push:
branches:
Expand All @@ -17,33 +20,64 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Install volta
uses: volta-cli/action@v4
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path -s)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
id: cache
with:
node-version: 16.x
cache: yarn
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: yarn install --frozen-lockfile
shell: bash
run: pnpm install --frozen-lockfile
- name: Prune pnpm store
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
shell: bash
run: pnpm store prune
- name: Lint
run: yarn lint
run: pnpm lint
- name: Run Tests
run: yarn test:ember
run: pnpm test:ember

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Install volta
uses: volta-cli/action@v4
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path -s)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
id: cache
with:
node-version: 16.x
cache: yarn
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: yarn install --no-lockfile
shell: bash
run: pnpm install --no-frozen-lockfile
- name: Prune pnpm store
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
shell: bash
run: pnpm store prune
- name: Run Tests
run: yarn test:ember
run: pnpm test:ember

try-scenarios:
name: ${{ matrix.try-scenario }}
Expand All @@ -56,22 +90,40 @@ jobs:
try-scenario:
- ember-lts-3.24
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-lts-5.4
- ember-lts-5.8
- ember-release
- ember-beta
- ember-canary
- ember-classic
- ember-default-with-jquery
- embroider-safe
- embroider-optimized

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Install volta
uses: volta-cli/action@v4
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path -s)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
id: cache
with:
node-version: 16.x
cache: yarn
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: yarn install --frozen-lockfile
shell: bash
run: pnpm install --frozen-lockfile
- name: Prune pnpm store
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
shell: bash
run: pnpm store prune
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.yaml.ember-try
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/tests/
/yarn-error.log
/yarn.lock
/pnpm-lock.yaml
.gitkeep

# ember-try
Expand All @@ -38,3 +39,4 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.yaml.ember-try
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.yaml.ember-try
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,32 @@ Unlike some other modal libraries for Ember, ember-modal-dialog uses solutions l

<!-- toc -->

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

<!-- tocstop -->

Expand Down Expand Up @@ -384,7 +386,7 @@ module.exports = {
};
```

## Dependencies
## Compatibility & Dependencies

* For Ember versions >= 3.20, use the latest published version
* 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)
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Once the prep work is completed, the actual release is straight forward:
* First, ensure that you have installed your projects dependencies:

```
yarn install
pnpm install
```

* Second, ensure that you have obtained a
Expand Down
55 changes: 32 additions & 23 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

module.exports = async function () {
return {
useYarn: true,
usePnpm: true,
scenarios: [
{
name: 'ember-lts-3.24',
Expand All @@ -24,57 +24,66 @@ module.exports = async function () {
},
},
{
name: 'ember-release',
name: 'ember-lts-4.4',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release'),
'ember-source': '~4.4.0',
},
},
},
{
name: 'ember-beta',
name: 'ember-lts-4.8',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta'),
'ember-source': '~4.8.0',
},
},
},
{
name: 'ember-canary',
name: 'ember-lts-4.12',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary'),
'ember-source': '~4.12.0',
},
},
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true,
}),
name: 'ember-lts-5.4',
npm: {
devDependencies: {
'ember-source': '~5.4.0',
},
},
},
{
name: 'ember-lts-5.8',
npm: {
devDependencies: {
'@ember/jquery': '^1.1.0',
'ember-source': '~5.8.0',
},
},
},
{
name: 'ember-classic',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'application-template-wrapper': true,
'default-async-observers': false,
'template-only-glimmer-components': false,
}),
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release'),
},
},
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': '~3.28.0',
'ember-source': await getChannelURL('beta'),
},
ember: {
edition: 'classic',
},
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary'),
},
},
},
Expand Down
4 changes: 4 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function (defaults) {
let app = new EmberAddon(defaults, {
snippetSearchPaths: ['tests/dummy/app'],
'ember-prism': {
theme: 'twilight',
components: ['scss', 'javascript', 'markup'],
},
});

/*
Expand Down
Loading

0 comments on commit 4badb14

Please sign in to comment.