-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Upgrade from yarn classic (v1.22) to pnpm v10 (#66)
* Install pnpm using instructions from https://pnpm.io/installation * add preinstall script to prevent non-pnpm usage * add pnpm workspace yaml * package.json: remove workspace since pnpm is used instead * run pnpm import * remove yarn.lock * change specifiers to use workspace: prefix * mv rollup config to .mjs ext * Switch to pnpm for ci * continue-on-error for lint steps * add missing ember-template-lint devdep to addon pkg * add missing eslint/js devdep to test-app * Revert "continue-on-error for lint steps" This reverts commit f61b164. * test-app: empty app.css file to avoid build-time warning about missing test-app.css file * addon: package.json add test script that explains tests are elsewhere * use broccoli-side-watch to sync test/doc-app rebuilds * addon: upgrade eslint 8 -> 9 * for side-watch, lookup name from package.json * update contributing.md * addon: use ember-template-lint-plugin-prettier to run prettier on hbs files * addon: add missing "globals" pkg for eslint * use volta in cli * add volta pin * workflow: remove temp print of pnpm,node version * workflow: enable pnpm caching * minor update to contrib doc * workflow: enable pnpm caching, fix * workflow: enable pnpm caching for all jobs * workflow: dedupe the volta env by moving it to the workflow level rather than per-job * corepack use pnpm@10 * workflow: drop volta pnpm env var * add setup-pnpm action
- Loading branch information
Showing
22 changed files
with
15,295 additions
and
12,142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,51 @@ | ||
# How To Contribute | ||
|
||
This repo is a monorepo, for additional instructions, refer to the package.json files in the workspaces, | ||
or refer to the Github Workflow that runs CI. | ||
|
||
## Installation | ||
|
||
* `git clone <repository-url>` | ||
* `cd ember-json-viewer` | ||
* `npm install` | ||
- `git clone <repository-url>` | ||
- `cd ember-json-viewer` | ||
- `pnpm install` | ||
|
||
## Linting | ||
|
||
* `npm run lint:hbs` | ||
* `npm run lint:js` | ||
* `npm run lint:js -- --fix` | ||
Each workspace has a `lint` run-script. | ||
You can run them all via: | ||
|
||
``` | ||
pnpm --filter '*' lint | ||
``` | ||
|
||
## Running tests | ||
|
||
* `ember test` – Runs the test suite on the current Ember version | ||
* `ember test --server` – Runs the test suite in "watch mode" | ||
* `ember try:each` – Runs the test suite against multiple Ember versions | ||
In one terminal, start the addon build: | ||
|
||
``` | ||
cd addon/ && pnpm start | ||
``` | ||
|
||
In another terminal, start the test-app build: | ||
|
||
``` | ||
cd test-app/ && pnpm start | ||
``` | ||
|
||
Visit the tests in the browser at localhost:4200/tests. | ||
|
||
Alternatively, run tests via CLI with: `cd test-app/ && pnpm test` | ||
|
||
## Running the docs application | ||
|
||
Start the addon build in another terminal window: | ||
|
||
## Running the dummy application | ||
``` | ||
cd addon/ && pnpm start | ||
``` | ||
|
||
* `ember serve` | ||
* Visit the dummy application at [http://localhost:4200](http://localhost:4200). | ||
Then start the docs app: | ||
|
||
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). | ||
``` | ||
cd docs-app/ && pnpm start | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
/** | ||
* 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 globals from "globals"; | ||
import js from "@eslint/js"; | ||
|
||
import ember from "eslint-plugin-ember/recommended"; | ||
import prettier from "eslint-plugin-prettier/recommended"; | ||
import n from "eslint-plugin-n"; | ||
|
||
import babelParser from "@babel/eslint-parser"; | ||
|
||
const esmParserOptions = { | ||
ecmaFeatures: { modules: true }, | ||
ecmaVersion: "latest", | ||
requireConfigFile: false, | ||
babelOptions: { | ||
plugins: [ | ||
["@babel/plugin-proposal-decorators", { decoratorsBeforeExport: true }], | ||
], | ||
}, | ||
}; | ||
|
||
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/", "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, | ||
}, | ||
}, | ||
}, | ||
/** | ||
* CJS node files | ||
*/ | ||
{ | ||
files: [ | ||
"**/*.cjs", | ||
"config/**/*.js", | ||
"testem.js", | ||
"testem*.js", | ||
".prettierrc.js", | ||
".stylelintrc.js", | ||
".template-lintrc.js", | ||
"ember-cli-build.js", | ||
"addon-main.js", | ||
], | ||
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, | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.