Skip to content

Commit

Permalink
feat(pix-ui): run upgrade to ember 5.11
Browse files Browse the repository at this point in the history
  • Loading branch information
rouxxi committed Oct 8, 2024
1 parent 66f2699 commit e811495
Show file tree
Hide file tree
Showing 25 changed files with 1,139 additions and 929 deletions.
9 changes: 4 additions & 5 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
/**
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.
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.
*/
"port": 4204,
"disableAnalytics": false
"disableAnalytics": false,
"isTypeScriptProject": false
}
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/vendor/

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

Expand All @@ -13,11 +14,16 @@
# 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

# storybook
.storybook/**
Expand Down
11 changes: 8 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ module.exports = {
files: [
'scripts/*.js',
'.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
Expand All @@ -48,13 +50,16 @@ module.exports = {
'tests/dummy/config/**/*.js',
],
excludedFiles: ['addon/**', 'addon-test-support/**', 'app/**', 'tests/dummy/app/**'],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
extends: ['plugin:n/recommended'],
},
{
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI

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

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

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

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Run Tests
run: npm run test:ember

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Install Dependencies
run: npm install --no-shrinkwrap
- name: Run Tests
run: npm run test:ember

try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: "test"
timeout-minutes: 10

strategy:
fail-fast: false
matrix:
try-scenario:
- ember-lts-4.12
- ember-lts-5.4
- ember-release
- ember-beta
- ember-canary
- embroider-safe
- embroider-optimized

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#pack
1024pix-pix-ui-*.tgz
/declarations/

# dependencies
/bower_components/
Expand All @@ -17,6 +18,7 @@
/.pnp*
/.sass-cache
/connect.lock
/.eslintcache
/coverage/
/libpeerconnection.log
/npm-debug.log*
Expand All @@ -30,6 +32,7 @@
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
/npm-shrinkwrap.json.ember-try

# storybook / chromatic
.storybook/preview-head.html
Expand All @@ -41,3 +44,6 @@ build-storybook.log
*.iml
*.code-workspace
.history

# broccoli-debug
/DEBUG/
11 changes: 4 additions & 7 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
Expand All @@ -18,15 +14,17 @@
/.gitignore
/.prettierignore
/.prettierrc.js
/.stylelintignore
/.stylelintrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
/tsconfig.declarations.json
/tsconfig.json
/yarn-error.log
/yarn.lock
.gitkeep
Expand All @@ -35,7 +33,6 @@

# 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
26 changes: 25 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
/blueprints/**
# 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
12 changes: 12 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

module.exports = {
overrides: [
{
files: '*.{js,ts}',
options: {
singleQuote: true,
},
},
],
};
10 changes: 10 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

# addons
/.node_modules.ember-try

storybook-static/*
5 changes: 5 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# How To Contribute

## Installation

- `git clone <repository-url>`
- `cd 1024pix-pix-ui`
- `npm install`

## Linting

- `npm run lint`
- `npm run lint:fix`

## Running tests

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

## Running the dummy application

- `npm run 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/).
8 changes: 2 additions & 6 deletions blueprints/pix-component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ module.exports = {
};

async function importNewStyleInGlobalStyle(dasherizedName) {
const importName = '@import \'' + dasherizedName + '\';';
const importName = "@import '" + dasherizedName + "';";

await insertIntoFile(
'addon/styles/addon.scss',
importName,
{ before: '\nhtml {' + EOL }
)
await insertIntoFile('addon/styles/addon.scss', importName, { before: '\nhtml {' + EOL });
console.log(' update addon/styles/addon.scss');
}
5 changes: 4 additions & 1 deletion blueprints/pix-component/utilities/insert-into-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ async function insertIntoFile(fullPath, contentsToInsert, providedOptions) {
}

contentsToWrite =
contentsToWrite.slice(0, insertIndex) + contentsToInsert + EOL + contentsToWrite.slice(insertIndex);
contentsToWrite.slice(0, insertIndex) +
contentsToInsert +
EOL +
contentsToWrite.slice(insertIndex);
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions config/environment.js

This file was deleted.

2 changes: 1 addition & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function (defaults) {
let app = new EmberAddon(defaults, {
const app = new EmberAddon(defaults, {
// Add options here
});
/*
Expand Down
Loading

0 comments on commit e811495

Please sign in to comment.