Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from yarn to pnpm #185

Merged
merged 8 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 18 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,15 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
cache: yarn
- name: Prepare
run: ./.github/scripts/setup-ci.sh
- name: Install Dependencies
run: yarn install --frozen-lockfile
- uses: wyvox/action-setup-pnpm@v2
with:
node-version: ${{ env.node-version }}
- name: Lint
run: yarn lint
run: pnpm lint
- name: Run Tests
run: yarn test:ember
run: pnpm test:ember

floating:
name: "Floating Dependencies"
Expand All @@ -56,16 +52,14 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
cache: yarn
- name: Prepare
run: ./.github/scripts/setup-ci.sh
- name: Install Dependencies
run: yarn install --frozen-lockfile
- uses: wyvox/action-setup-pnpm@v2
with:
node-version: ${{ env.node-version }}
args: '--no-lockfile'
- name: Run Tests
run: yarn test:ember
run: pnpm test:ember

build:
name: Build Tests
Expand All @@ -74,19 +68,16 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
cache: yarn
- name: Prepare
run: ./.github/scripts/setup-ci.sh
- name: Install Dependencies
run: yarn install --frozen-lockfile --non-interactive
- uses: wyvox/action-setup-pnpm@v2
with:
node-version: ${{ env.node-version }}
- name: Install template app dependencies
working-directory: ./build-tests/app-template
run: yarn install --frozen-lockfile --non-interactive
run: pnpm install
- name: Run Tests
run: yarn test:build
run: pnpm test:build

try-scenarios:
name: "Scenario: ${{ matrix.try-scenario }} | optional: ${{ matrix.allow-failure }}"
Expand Down Expand Up @@ -116,14 +107,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
cache: yarn
- name: Prepare
run: ./.github/scripts/setup-ci.sh
- name: Install Dependencies
run: yarn install --frozen-lockfile
- uses: wyvox/action-setup-pnpm@v2
with:
node-version: ${{ env.node-version }}
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
32 changes: 17 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@

* `git clone https://github.com/sandydoo/ember-google-maps`
* `cd ember-google-maps`
* `yarn install`
* `pnpm install`

## Linting

* `yarn lint`
* `yarn lint:fix`
* `pnpm lint`
* `pnpm lint:fix`

## Running tests

* `pnpm test` – Runs the test suite on the current Ember version
* `pnpm test:ember --server` – Runs the test suite in "watch mode"
* `pnpm test:ember-compatibility` – Runs the test suite against multiple Ember versions

#### Setting up API keys

Expand All @@ -22,26 +28,22 @@ Assign this key to the `GOOGLE_MAPS_API_KEY` variable in `.env` or just run thes
`touch .env && echo 'GOOGLE_MAPS_API_KEY=<INSERT_YOUR_KEY_HERE>' > .env`
`cp .env .env.test`

## Running tests

* `yarn test` – Runs the test suite on the current Ember version
* `yarn test:ember --server` – Runs the test suite in "watch mode"
* `yarn test:ember-compatibility` – Runs the test suite against multiple Ember versions

## Running the dummy application

* `yarn start`
* `pnpm start`
* Visit the dummy 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/).


## Debugging the build process

This addon modifies the components included in the final build. You can store incremental build trees to debug the build process with the following command.
This addon modifies the components included in the final build. You can store incremental build trees t
o debug the build process with the following command:

* `rm -rf DEBUG; BROCCOLI_DEBUG=ember-google-maps:* ember s`
```console
rm -rf DEBUG; BROCCOLI_DEBUG=ember-google-maps:* ember s
```

This will create a `DEBUG` folder at the root of the project containing the source files at various stages of processing.
This will create a `DEBUG` folder at the root of the project containing the source files at various sta
ges of processing.
The `with-addon-factory` and `post-filter` trees should likely be investigated first.

8 changes: 0 additions & 8 deletions build-tests/app-template/.ember-cli
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
Expand Down
12 changes: 0 additions & 12 deletions build-tests/app-template/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.*/
.eslintcache

# 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
35 changes: 35 additions & 0 deletions build-tests/app-template/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches:
- main
- master
pull_request: {}

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

jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: wyvox/action-setup-pnpm@v2
- name: Lint
run: pnpm lint

test:
name: "Test"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: wyvox/action-setup-pnpm@v2
- name: Run Tests
run: pnpm test
9 changes: 1 addition & 8 deletions build-tests/app-template/.gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
/declarations/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.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
Expand Down
14 changes: 1 addition & 13 deletions build-tests/app-template/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# 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
2 changes: 1 addition & 1 deletion build-tests/app-template/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
"ignore_dirs": ["dist"]
}
18 changes: 9 additions & 9 deletions build-tests/app-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ You will need the following things properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/)
* [Yarn](https://yarnpkg.com/)
* [pnpm](https://pnpm.io/)
* [Ember CLI](https://cli.emberjs.com/release/)
* [Google Chrome](https://google.com/chrome/)

## Installation

* `git clone <repository-url>` this repository
* `cd app-template`
* `yarn install`
* `pnpm install`

## Running / Development

* `ember serve`
* `pnpm start`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

Expand All @@ -31,18 +31,18 @@ Make use of the many generators for code, try `ember help generate` for more det

### Running Tests

* `ember test`
* `ember test --server`
* `pnpm test`
* `pnpm test:ember --server`

### Linting

* `yarn lint`
* `yarn lint:fix`
* `pnpm lint`
* `pnpm lint:fix`

### Building

* `ember build` (development)
* `ember build --environment production` (production)
* `pnpm ember build` (development)
* `pnpm build` (production)

### Deploying

Expand Down
4 changes: 2 additions & 2 deletions build-tests/app-template/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "4.12.1",
"version": "5.5.0",
"blueprints": [
{
"name": "app",
Expand All @@ -12,7 +12,7 @@
"isBaseBlueprint": true,
"options": [
"--no-welcome",
"--yarn"
"--pnpm"
]
}
]
Expand Down
Loading