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 authored Jan 8, 2025
1 parent 5b48066 commit 246457f
Show file tree
Hide file tree
Showing 17 changed files with 873 additions and 668 deletions.
7 changes: 5 additions & 2 deletions .ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
/**
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
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/
8 changes: 0 additions & 8 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 @@ -17,12 +13,9 @@
/.github/
/.gitignore
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
Expand All @@ -35,7 +28,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
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
28 changes: 28 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

const getChannelURL = require('ember-source-channel-url');
const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

const safe = embroiderSafe();
Expand All @@ -16,6 +17,31 @@ module.exports = async function () {
return {
scenarios: [
{
name: 'ember-lts-4.12',
npm: {
devDependencies: {
'ember-source': '~4.12.0',
},
},
},
{
name: 'ember-lts-5.4',
npm: {
devDependencies: {
'ember-source': '~5.4.0',
},
},
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release'),
},
},
},
{
name: 'ember-beta',
...safe,
npm: {
...safe.npm,
Expand All @@ -35,6 +61,8 @@ module.exports = async function () {
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
};
};
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 246457f

Please sign in to comment.