Skip to content

Commit 8bd1e3e

Browse files
authored
Merge pull request #95 from btecu/burebista
Modernize
2 parents 5b629b4 + 6ad0ac5 commit 8bd1e3e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+14656
-17640
lines changed

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,5 @@ insert_final_newline = true
1212
indent_style = space
1313
indent_size = 2
1414

15-
[*.hbs]
16-
insert_final_newline = false
17-
1815
[*.{diff,md}]
1916
trim_trailing_whitespace = false

.github/workflows/ci.yml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,43 +21,40 @@ jobs:
2121
timeout-minutes: 10
2222

2323
steps:
24-
- name: Enable Corepack
25-
run: corepack enable
2624
- uses: actions/checkout@v4
27-
- name: Install Node
28-
uses: actions/setup-node@v4
25+
- uses: pnpm/action-setup@v4
26+
- uses: actions/setup-node@v4
2927
with:
3028
node-version: ${{ env.NODE_VERSION }}
31-
cache: yarn
29+
cache: pnpm
3230
- name: Install Dependencies
33-
run: yarn install --immutable
31+
run: pnpm install --frozen-lockfile
3432
- name: Lint
35-
run: yarn lint
33+
run: pnpm lint
3634
- name: Run Tests
37-
run: yarn test:ember
35+
run: pnpm test
3836

3937
floating:
4038
name: "Floating Dependencies"
4139
runs-on: ubuntu-latest
4240
timeout-minutes: 10
4341

4442
steps:
45-
- name: Enable Corepack
46-
run: corepack enable
4743
- uses: actions/checkout@v4
44+
- uses: pnpm/action-setup@v4
4845
- uses: actions/setup-node@v4
4946
with:
5047
node-version: ${{ env.NODE_VERSION }}
51-
cache: yarn
48+
cache: pnpm
5249
- name: Install Dependencies
53-
run: yarn install --no-lockfile
50+
run: pnpm install --no-lockfile
5451
- name: Run Tests
55-
run: yarn test:ember
52+
run: pnpm test
5653

5754
try-scenarios:
5855
name: ${{ matrix.try-scenario }}
5956
runs-on: ubuntu-latest
60-
needs: "test"
57+
needs: 'test'
6158
timeout-minutes: 10
6259

6360
strategy:
@@ -73,15 +70,14 @@ jobs:
7370
- embroider-optimized
7471

7572
steps:
76-
- name: Enable Corepack
77-
run: corepack enable
7873
- uses: actions/checkout@v4
79-
- name: Install Node
80-
uses: actions/setup-node@v4
74+
- uses: pnpm/action-setup@v4
75+
- uses: actions/setup-node@v4
8176
with:
8277
node-version: ${{ env.NODE_VERSION }}
83-
cache: yarn
78+
cache: pnpm
8479
- name: Install Dependencies
85-
run: yarn install --immutable
80+
run: pnpm install --frozen-lockfile
8681
- name: Run Tests
87-
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
82+
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
83+
working-directory: test-app

.github/workflows/push-dist.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Because this library needs to be built,
2+
# we can't easily point package.json files at the git repo for easy cross-repo testing.
3+
#
4+
# This workflow brings back that capability by placing the compiled assets on a "dist" branch
5+
# (configurable via the "branch" option below)
6+
name: Push dist
7+
8+
env:
9+
NODE_VERSION: 22
10+
11+
on:
12+
push:
13+
branches:
14+
- main
15+
- master
16+
17+
jobs:
18+
push-dist:
19+
name: Push dist
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 10
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: pnpm/action-setup@v4
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ env.NODE_VERSION }}
29+
cache: pnpm
30+
- name: Install Dependencies
31+
run: pnpm install --frozen-lockfile
32+
- uses: kategengler/put-built-npm-package-contents-on-branch@v2.0.0
33+
with:
34+
branch: dist
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
working-directory: 'ember-simple-tree'

CONTRIBUTING.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,29 @@
33
## Installation
44

55
* `git clone https://github.com/btecu/ember-simple-tree`
6-
* `cd ember-simple-tree`
7-
* `yarn install`
6+
- `cd ember-simple-tree`
7+
- `pnpm install`
88

99
## Linting
1010

11-
- `yarn lint`
12-
- `yarn lint:fix`
11+
- `pnpm lint`
12+
- `pnpm lint:fix`
13+
14+
## Building the addon
15+
16+
- `cd ember-simple-tree`
17+
- `pnpm build`
1318

1419
## Running tests
1520

16-
- `yarn test` – Runs the test suite on the current Ember version
17-
- `yarn test:ember --server` – Runs the test suite in "watch mode"
18-
- `yarn test:ember-compatibility` – Runs the test suite against multiple Ember versions
21+
- `cd test-app`
22+
- `pnpm test` – Runs the test suite on the current Ember version
23+
- `pnpm test:watch` – Runs the test suite in "watch mode"
1924

20-
## Running the dummy application
25+
## Running the test application
2126

22-
- `yarn start`
23-
- Visit the dummy application at [http://localhost:4200](http://localhost:4200).
27+
- `cd test-app`
28+
- `pnpm start`
29+
- Visit the test application at [http://localhost:4200](http://localhost:4200).
2430

2531
For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019
3+
Copyright (c) 2025
44

55
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:
66

config/ember-cli-update.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"schemaVersion": "1.0.0",
3+
"projectName": "ember-simple-tree",
4+
"packages": [
5+
{
6+
"name": "@embroider/addon-blueprint",
7+
"version": "4.1.1",
8+
"blueprints": [
9+
{
10+
"name": "@embroider/addon-blueprint",
11+
"isBaseBlueprint": true,
12+
"options": [
13+
"--ci-provider=github",
14+
"--pnpm"
15+
]
16+
}
17+
]
18+
}
19+
]
20+
}

config/environment.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

ember-simple-tree/.gitignore

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
# compiled output
2-
/declarations/
3-
/dist/
4-
5-
# dependencies
6-
/node_modules/
1+
# The authoritative copies of these live in the monorepo root (because they're
2+
# more useful on github that way), but the build copies them into here so they
3+
# will also appear in published NPM packages.
4+
/README.md
5+
/LICENSE.md
76

8-
# misc
9-
/.eslintcache
10-
/.stylelintcache
7+
# compiled output
8+
dist/
9+
declarations/
1110

1211
# npm/pnpm/yarn pack output
1312
*.tgz
13+
14+
# deps & caches
15+
node_modules/
16+
.eslintcache
17+
.prettiercache

ember-simple-tree/.prettierignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# unconventional js
2+
/blueprints/*/files/
3+
14
# compiled output
2-
/declarations/
35
/dist/
6+
/declarations/
7+
8+
# misc
9+
/coverage/

ember-simple-tree/.prettierrc.cjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use strict';
2+
3+
module.exports = {
4+
plugins: ['prettier-plugin-ember-template-tag'],
5+
overrides: [
6+
{
7+
files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
8+
options: {
9+
printWidth: 120,
10+
singleQuote: true,
11+
templateSingleQuote: false,
12+
},
13+
},
14+
],
15+
};

ember-simple-tree/.stylelintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = {
4+
extends: 'recommended',
5+
};

ember-simple-tree/LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019
3+
Copyright (c) 2025
44

55
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:
66

ember-simple-tree/addon-main.cjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
'use strict';
22

33
const { addonV1Shim } = require('@embroider/addon-shim');
4-
54
module.exports = addonV1Shim(__dirname);

ember-simple-tree/babel.config.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
],
1111
[
1212
"module:decorator-transforms",
13-
{
14-
"runtime": {
15-
"import": "decorator-transforms/runtime"
16-
}
17-
}
13+
{ "runtime": { "import": "decorator-transforms/runtime" } }
1814
]
1915
]
2016
}

ember-simple-tree/eslint.config.mjs

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
/**
2+
* Debugging:
3+
* https://eslint.org/docs/latest/use/configure/debug
4+
* ----------------------------------------------------
5+
*
6+
* Print a file's calculated configuration
7+
*
8+
* npx eslint --print-config path/to/file.js
9+
*
10+
* Inspecting the config
11+
*
12+
* npx eslint --inspect-config
13+
*
14+
*/
15+
import babelParser from '@babel/eslint-parser';
16+
import js from '@eslint/js';
17+
import prettier from 'eslint-config-prettier';
18+
import ember from 'eslint-plugin-ember/recommended';
19+
import importPlugin from 'eslint-plugin-import';
20+
import n from 'eslint-plugin-n';
21+
import globals from 'globals';
22+
23+
const esmParserOptions = {
24+
ecmaFeatures: { modules: true },
25+
ecmaVersion: 'latest',
26+
};
27+
28+
export default [
29+
js.configs.recommended,
30+
prettier,
31+
ember.configs.base,
32+
ember.configs.gjs,
33+
/**
34+
* Ignores must be in their own object
35+
* https://eslint.org/docs/latest/use/configure/ignore
36+
*/
37+
{
38+
ignores: ['dist/', 'declarations/', 'node_modules/', 'coverage/', '!**/.*'],
39+
},
40+
/**
41+
* https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
42+
*/
43+
{
44+
linterOptions: {
45+
reportUnusedDisableDirectives: 'error',
46+
},
47+
},
48+
{
49+
files: ['**/*.js'],
50+
languageOptions: {
51+
parser: babelParser,
52+
},
53+
},
54+
{
55+
files: ['**/*.{js,gjs}'],
56+
languageOptions: {
57+
parserOptions: esmParserOptions,
58+
globals: {
59+
...globals.browser,
60+
},
61+
},
62+
},
63+
{
64+
files: ['src/**/*'],
65+
plugins: {
66+
import: importPlugin,
67+
},
68+
rules: {
69+
// require relative imports use full extensions
70+
'import/extensions': ['error', 'always', { ignorePackages: true }],
71+
},
72+
},
73+
/**
74+
* CJS node files
75+
*/
76+
{
77+
files: ['**/*.cjs', '.prettierrc.js', '.stylelintrc.js', '.template-lintrc.js', 'addon-main.cjs'],
78+
plugins: {
79+
n,
80+
},
81+
82+
languageOptions: {
83+
sourceType: 'script',
84+
ecmaVersion: 'latest',
85+
globals: {
86+
...globals.node,
87+
},
88+
},
89+
},
90+
/**
91+
* ESM node files
92+
*/
93+
{
94+
files: ['**/*.mjs'],
95+
plugins: {
96+
n,
97+
},
98+
99+
languageOptions: {
100+
sourceType: 'module',
101+
ecmaVersion: 'latest',
102+
parserOptions: esmParserOptions,
103+
globals: {
104+
...globals.node,
105+
},
106+
},
107+
},
108+
];

0 commit comments

Comments
 (0)