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

Migration for pnpm #199

Merged
merged 2 commits into from
Jan 31, 2024
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
33 changes: 21 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request:

env:
NODE_VERSION: '14'
NODE_VERSION: 16
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}

Expand All @@ -24,18 +24,21 @@ jobs:
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: '${{ env.NODE_VERSION }}'
cache: 'yarn'
cache: 'pnpm'
- name: Install Dependencies
run: yarn --prefer-offline --frozen-lockfile
run: pnpm install
- name: Lint JS
run: yarn lint:js
run: pnpm lint:js
- name: Lint HBS
run: yarn run prettier **/*.hbs -c
run: pnpm prettier **/*.hbs -c
- name: Run Tests
run: yarn test:ember
run: pnpm test:ember

release:
name: Release Package
Expand All @@ -45,14 +48,17 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: '${{ env.NODE_VERSION }}'
registry-url: 'https://npm.pkg.github.com'
cache: 'yarn'
cache: 'pnpm'
- name: Install Dependencies
run: yarn --prefer-offline --frozen-lockfile
- run: yarn publish
run: pnpm install
- run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -64,14 +70,17 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: '${{ env.NODE_VERSION }}'
cache: 'yarn'
cache: 'pnpm'
- name: Install Dependencies
run: yarn --prefer-offline --frozen-lockfile
run: pnpm install
- name: Ember Build
run: ./node_modules/ember-cli/bin/ember build --silent --environment=production
run: pnpm ember build --silent --environment=production
- name: Deploy website
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
Expand Down
3 changes: 1 addition & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
/ember-cli-build.js
/testem.js
/tests/
/yarn-error.log
/yarn.lock
/pnpm-lock.yaml
.gitkeep

# ember-try
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.19.0
25 changes: 0 additions & 25 deletions CONTRIBUTING.md

This file was deleted.

21 changes: 8 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@

SHELL := /bin/bash

all: clear upfluence yarn_link_ls echo start ## Runs yarn_link_ls & starts the dev server
all: clear upfluence echo start ## Starts the dev server

clear:
@clear

install: ## Runs 'yarn' to install dependencies
install: ## Install dependencies
@echo 'Installing dependencies'
yarn
pnpm install
@echo ""; echo "\n-------------------------------\n"; echo ""

echo:
@echo Starting Hypertable Dummy App

start: ## Starts the dev server
ember s --port 0
pnpm ember s --port 0

clean: ## Cleans ./node_modules && ./dist
@echo "Cleaning up ./node_modules & ./dist folders"
Expand All @@ -30,26 +30,21 @@ re: clean install echo start ## Reinstalls dependencies & starts the dev server

tests: ## Runs tests once
@echo "Running tests once"
ember test --silent -r dot
pnpm ember test --silent -r dot

testserver: ## Runs the test server
@echo "Starting Test Server"
ember test -s

yarn_link_ls: ## Displays all the current projects linked using 'yarn link'
@echo Checking for yarn-links
@echo $(shell a=`find node_modules node_modules/\@* -maxdepth 1 -type l -print`; if [[ -n $$a ]]; then echo $$a; else echo "There are no linked modules."; fi)
@echo ""; echo "-------------------------------"; echo ""
pnpm ember test -s
JulienVannier66 marked this conversation as resolved.
Show resolved Hide resolved

enable_pre_hook: ## Enables git pre-hook on the project. Will run Linter & Tests before pushing.
@echo "Installing git pre-push hook"
@echo ""; echo "-------------------------------"; echo ""
yarn install-pre-push-hook
pnpm install-pre-push-hook

disable_pre_hook: ## Disables the git pre-push hook.
@echo "Removing git pre-push hook"
@echo ""; echo "-------------------------------"; echo ""
yarn remove-pre-push-hook
pnpm remove-pre-push-hook

help: ## Displays the help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ Contributing

* `git clone <repository-url>`
* `cd hypertable`
* `yarn install`
* `pnpm install`

### Linting

* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js --fix`
* `pnpm lint:hbs`
* `pnpm lint:js`
* `pnpm lint:js --fix`

### Running tests

Expand Down
2 changes: 1 addition & 1 deletion app/styles/hypertable.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'oss-components';
@import 'node_modules/@upfluence/oss-components/app/styles/oss-components';
@import 'animations';
@import 'header';
@import 'inner-table';
Expand Down
27 changes: 1 addition & 26 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,12 @@
'use strict';

/* eslint-disable node/no-extraneous-require */

const { name, version } = require('./package');
const MergeTrees = require('broccoli-merge-trees');
const writeFile = require('broccoli-file-creator');

module.exports = {
name,
version,

isDevelopingAddon: function () {
isDevelopingAddon() {
return true;
},

included: function () {
this._super.included.apply(this, arguments);

this.import('vendor/@upfluence/hypertable/register-version.js');
},

treeForVendor(vendorTree) {
let trees = [];

if (vendorTree) {
trees.push(vendorTree);
}

trees.push(
writeFile('@upfluence/hypertable/register-version.js', `Ember.libraries.register('${name}', '${version}');`)
);

return new MergeTrees(trees);
}
};
/* eslint-enable node/no-extraneous-require */
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"@types/tether": "^1.4.6",
"@typescript-eslint/parser": "^5.32.0",
"@upfluence/oss-components": "^3.x",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "~3.28.6",
"ember-cli-dependency-checker": "^3.2.0",
Expand Down
Loading
Loading