Skip to content
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
13 changes: 3 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
Expand All @@ -40,9 +38,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
Expand All @@ -64,7 +60,6 @@ jobs:
try-scenario:
- ember-lts-4.12
- ember-lts-5.4
- ember-lts-5.8
- ember-resolver-10
- ember-resolver-11
- ember-resolver-12
Expand All @@ -76,9 +71,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
Expand Down
32 changes: 25 additions & 7 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
# Docs: https://pnpm.io/npmrc
# https://github.com/emberjs/rfcs/pull/907

# we don't want addons to be bad citizens of the ecosystem
####################
# super strict mode
####################
auto-install-peers=false
strict-peer-dependents=true
resolve-peers-from-workspace-root=false

################
# Optimizations
################
# Less strict, but required for tooling to not barf on duplicate peer trees.
# (many libraries declare the same peers, which resolve to the same
# versions)
peers-suffix-max-length=40
dedupe-injected-deps=true
dedupe-peer-dependents=true
public-hoist-pattern[]=ember-source
sync-injected-deps-after-scripts[]=build
sync-injected-deps-after-scripts[]=sync
inject-workspace-packages=true

# we want true isolation,
# if a dependency is not declared, we want an error
resolve-peers-from-workspace-root=false
################
# Compatibility
################
# highest is what everyone is used to, but
# not ensuring folks are actually compatible with declared ranges.
resolution-mode=highest
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 18.20.4
pnpm 9.11.0
nodejs 20.19.0
pnpm 10.7.1
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2024
Copyright (c) 2025

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ loadInitializers(App, config.modulePrefix);

## Compatibility

* Ember.js v3.28 or above
* Ember.js v4.12 or above
* Embroider or ember-auto-import v2

## Quick Example
Expand Down
5 changes: 3 additions & 2 deletions config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
{
"schemaVersion": "1.0.0",
"projectName": "ember-can",
"packages": [
{
"name": "@embroider/addon-blueprint",
"version": "2.16.0",
"version": "4.1.1",
"blueprints": [
{
"name": "@embroider/addon-blueprint",
"isBaseBlueprint": true,
"options": [
"--ci-provider=github",
"--pnpm",
"--typescript"
]
Expand Down
9 changes: 0 additions & 9 deletions ember-can/.eslintignore

This file was deleted.

57 changes: 0 additions & 57 deletions ember-can/.eslintrc.cjs

This file was deleted.

10 changes: 9 additions & 1 deletion ember-can/.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,
},
},
],
};
25 changes: 19 additions & 6 deletions ember-can/babel.config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
{
"plugins": [
["@babel/plugin-transform-typescript", { "allExtensions": true, "onlyRemoveTypeImports": true, "allowDeclareFields": true }],
[
"@babel/plugin-transform-typescript",
{
"allExtensions": true,
"onlyRemoveTypeImports": true,
"allowDeclareFields": true
}
],
"@embroider/addon-dev/template-colocation-plugin",
["babel-plugin-ember-template-compilation", {
"targetFormat": "hbs",
"transforms": []
}],
["module:decorator-transforms", { "runtime": { "import": "decorator-transforms/runtime" } }],
[
"babel-plugin-ember-template-compilation",
{
"targetFormat": "hbs",
"transforms": []
}
],
[
"module:decorator-transforms",
{ "runtime": { "import": "decorator-transforms/runtime" } }
]
]
}
140 changes: 140 additions & 0 deletions ember-can/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/**
* 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';
import ts from 'typescript-eslint';

const parserOptions = {
esm: {
js: {
ecmaFeatures: { modules: true },
ecmaVersion: 'latest',
},
ts: {
projectService: true,
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
};

export default ts.config(
js.configs.recommended,
ember.configs.base,
ember.configs.gjs,
ember.configs.gts,
prettier,
/**
* Ignores must be in their own object
* https://eslint.org/docs/latest/use/configure/ignore
*/
{
ignores: [
'blueprints/**/*',
'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: parserOptions.esm.js,
globals: {
...globals.browser,
},
},
},
{
files: ['**/*.{ts,gts}'],
languageOptions: {
parser: ember.parser,
parserOptions: parserOptions.esm.ts,
},
extends: [...ts.configs.recommendedTypeChecked, ember.configs.gts],
},
{
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: parserOptions.esm.js,
globals: {
...globals.node,
},
},
},
);
Loading