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

Upgrade to latest v2 blueprint structure #1072

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
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
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
pull_request: {}

env:
PNPM_VERSION: 8.15.9
PNPM_VERSION: 10.0.0

concurrency:
group: ci-${{ github.head_ref || github.ref }}
Expand All @@ -18,6 +18,7 @@ jobs:
test:
name: "Tests"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
Expand All @@ -31,19 +32,15 @@ jobs:
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Lint Addon
run: pnpm run lint
working-directory: ember-mobile-menu
- name: Lint Test App
run: pnpm run lint
working-directory: test-app
- name: Lint
run: pnpm lint
- name: Run Tests
run: pnpm run test:ember
working-directory: test-app
run: pnpm test

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

steps:
- uses: actions/checkout@v4
Expand All @@ -60,13 +57,13 @@ jobs:
- name: Install Dependencies
run: pnpm install
- name: Run Tests
run: pnpm run test:ember
working-directory: test-app
run: pnpm test

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

strategy:
fail-fast: false
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/plan-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18

- uses: pnpm/action-setup@v2
with:
version: 8
version: 10
- run: pnpm install --frozen-lockfile

- name: "Generate Explanation and Prep Changelogs"
id: explanation
run: |
set -x

pnpm release-plan prepare

echo 'text<<EOF' >> $GITHUB_OUTPUT
jq .description .release-plan.json -r >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- uses: pnpm/action-setup@v2
with:
version: 8
version: 10
- run: pnpm install --frozen-lockfile
- name: npm publish
run: pnpm release-plan publish
Expand Down
23 changes: 20 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# you definitely want this:
node_modules
# See https://help.github.com/ignore-files/ for more about ignoring files.

# and you can put in anything else that tends to accumulate in your environment:
# dependencies
node_modules/

# misc
.env*
.pnp*
.pnpm-debug.log
.sass-cache
.eslintcache
coverage/
npm-debug.log*
yarn-error.log

# ember-try
/.node_modules.ember-try/
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.ember-try.yaml


.DS_Store
/.idea/
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Prettier is also run from each package, so the ignores here
# protect against files that may not be within a package

# misc
!.*
.lint-todo/

# ember-try
/.node_modules.ember-try/
/pnpm-lock.ember-try.yaml
6 changes: 6 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'use strict';

module.exports = {
plugins: ['prettier-plugin-ember-template-tag'],
singleQuote: true,
};
20 changes: 20 additions & 0 deletions config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"schemaVersion": "1.0.0",
"projectName": "ember-mobile-menu",
"packages": [
{
"name": "@embroider/addon-blueprint",
"version": "4.0.0",
"blueprints": [
{
"name": "@embroider/addon-blueprint",
"isBaseBlueprint": true,
"options": [
"--ci-provider=github",
"--pnpm"
]
}
]
}
]
}
9 changes: 0 additions & 9 deletions ember-mobile-menu/.eslintignore

This file was deleted.

43 changes: 0 additions & 43 deletions ember-mobile-menu/.eslintrc.cjs

This file was deleted.

10 changes: 9 additions & 1 deletion ember-mobile-menu/.prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,13 @@

module.exports = {
plugins: ['prettier-plugin-ember-template-tag'],
singleQuote: true,
overrides: [
{
files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
options: {
singleQuote: true,
templateSingleQuote: false,
},
},
],
};
18 changes: 11 additions & 7 deletions ember-mobile-menu/babel.config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"plugins": [
"@embroider/addon-dev/template-colocation-plugin",
"@babel/plugin-transform-class-static-block",
["babel-plugin-ember-template-compilation", {
"targetFormat": "hbs",
"transforms": []
}],
["@babel/plugin-proposal-decorators", { "version": "legacy" }],
"@babel/plugin-proposal-class-properties"
[
"babel-plugin-ember-template-compilation",
{
"targetFormat": "hbs",
"transforms": []
}
],
[
"module:decorator-transforms",
{ "runtime": { "import": "decorator-transforms/runtime" } }
]
]
}
114 changes: 114 additions & 0 deletions ember-mobile-menu/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
/**
* Debugging:
* https://eslint.org/docs/latest/use/configure/debug
* ----------------------------------------------------
*
* Print a file's calculated configuration
*
* npx eslint --print-config path/to/file.js
*
* Inspecting the config
*
* npx eslint --inspect-config
*
*/
import babelParser from '@babel/eslint-parser';
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import ember from 'eslint-plugin-ember/recommended';
import importPlugin from 'eslint-plugin-import';
import n from 'eslint-plugin-n';
import globals from 'globals';

const esmParserOptions = {
ecmaFeatures: { modules: true },
ecmaVersion: 'latest',
};

export default [
js.configs.recommended,
prettier,
ember.configs.base,
ember.configs.gjs,
/**
* Ignores must be in their own object
* https://eslint.org/docs/latest/use/configure/ignore
*/
{
ignores: ['dist/', 'declarations/', 'node_modules/', 'coverage/', '!**/.*'],
},
/**
* https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
*/
{
linterOptions: {
reportUnusedDisableDirectives: 'error',
},
},
{
files: ['**/*.js'],
languageOptions: {
parser: babelParser,
},
},
{
files: ['**/*.{js,gjs}'],
languageOptions: {
parserOptions: esmParserOptions,
globals: {
...globals.browser,
},
},
},
{
files: ['src/**/*'],
plugins: {
import: importPlugin,
},
rules: {
// require relative imports use full extensions
'import/extensions': ['error', 'always', { ignorePackages: true }],
},
},
/**
* CJS node files
*/
{
files: [
'**/*.cjs',
'.prettierrc.js',
'.stylelintrc.js',
'.template-lintrc.js',
'addon-main.cjs',
],
plugins: {
n,
},

languageOptions: {
sourceType: 'script',
ecmaVersion: 'latest',
globals: {
...globals.node,
},
},
},
/**
* ESM node files
*/
{
files: ['**/*.mjs'],
plugins: {
n,
},

languageOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
parserOptions: esmParserOptions,
globals: {
...globals.node,
},
},
},
];
Loading
Loading