Skip to content

Commit

Permalink
Updated dependencies (#450)
Browse files Browse the repository at this point in the history
* chore: Updated dependencies

* chore: Added lockfile

* chore: Configured changesets

* chore: Reconfigured eslint and prettier

* chore: Fixed linting errors

* chore: Added changeset

---------

Co-authored-by: ijlee2 <ijlee2@users.noreply.github.com>
  • Loading branch information
ijlee2 and ijlee2 committed Apr 30, 2024
1 parent 7c92f62 commit 45231b2
Show file tree
Hide file tree
Showing 19 changed files with 1,972 additions and 1,014 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": "./format-changelogs.cjs",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
55 changes: 55 additions & 0 deletions .changeset/format-changelogs.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
const { getInfo } = require('@changesets/get-github-info');

const repo = 'buschtoens/ember-render-helpers';

async function analyze(changeset) {
const { links: info } = await getInfo({
commit: changeset.commit,
repo,
});

const contributor = info.user ? `(${info.user})` : undefined;
const link = info.pull ?? info.commit ?? undefined;
const summary = (changeset.summary ?? '').split('\n')[0].trim();

return {
contributor,
link,
summary,
};
}

async function summarize(changeset) {
const { contributor, link, summary } = await analyze(changeset);

const line = [link, summary, contributor].filter(Boolean).join(' ');

return `- ${line}`;
}

async function getDependencyReleaseLine(changesets) {
try {
const lines = await Promise.all(changesets.map(summarize));

return lines.join('\n');
} catch (error) {
console.error(`ERROR: getDependencyReleaseLine (${error.message})`);

return '';
}
}

async function getReleaseLine(changeset) {
try {
return summarize(changeset);
} catch (error) {
console.error(`ERROR: getReleaseLine (${error.message})`);

return '';
}
}

module.exports = {
getDependencyReleaseLine,
getReleaseLine,
};
7 changes: 7 additions & 0 deletions .changeset/six-wombats-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"ember-codemod-ember-render-helpers-to-v1": patch
"ember-render-helpers": patch
"test-app": patch
---

Updated dependencies
138 changes: 121 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,130 @@
# How To Contribute
# Contributing to ember-render-helpers

## Installation
## Local development

* `git clone <repository-url>`
* `cd ember-render-helpers`
* `yarn install`
<details>

## Linting
<summary>Install dependencies</summary>

* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js --fix`
1. Fork and clone this repo.

## Running tests
```sh
git clone git@github.com:<your-github-handle>/ember-render-helpers.git
```

* `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
1. Change directory.

## Running the dummy application
```sh
cd ember-render-helpers
```

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
1. Use [`pnpm`](https://pnpm.io/installation) to install dependencies.

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
```sh
pnpm install
```

</details>


<details>

<summary>Run the demo app</summary>

1. Once dependencies have been installed, you can run the [test app](./test-app).

```sh
# From the workspace root
pnpm start
```

1. Open the app at [http://localhost:4200](http://localhost:4200).

</details>


<details>

<summary>Lint files</summary>

1. When you write code, please check that it meets the linting rules.

```sh
# From the workspace root
pnpm lint
```

1. You can run `lint:fix` to automatically fix linting errors.

```sh
# From the workspace root
pnpm lint:fix
```

</details>


<details>

<summary>Run tests</summary>

1. When you write code, please check that all tests continue to pass.

```sh
# From the workspace root
pnpm test
```

</details>


<details>

<summary>Add changeset to pull request</code></summary>

1. To record how a pull request affects packages, you will want to add a changeset.

The changeset provides a summary of the code change. It also describes how package versions should be updated (major, minor, or patch) as a result of the code change.

```sh
# From the workspace root
pnpm changeset
```

</details>


<details>

<summary>Publish packages (for admins)</summary>

1. Generate a [personal access token](https://github.com/settings/tokens/) in GitHub, with `repo` and `read:user` scopes enabled.

1. Run the `release:changelog` script. This removes changesets, updates the package versions, and updates the `CHANGELOG`'s.
```sh
# From the workspace root
GITHUB_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN> pnpm release:changelog
```
1. The workspace root's version (e.g. `0.1.3`) is more of an identifier than a (semantic) version. We will use it to name the tag that will be published.

In the root `package.json`, update the version following the "highest-version" formula:

```
workspace root version = max(
max(all package versions),
workspace root version + 0.0.1,
);
```

1. [Create a tag](https://github.com/buschtoens/ember-render-helpers/releases/new) and provide release notes. The tag name should match the workspace root's version.
1. Publish the packages.
```sh
# From the workspace root
pnpm release:publish
```
</details>
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@
"license": "MIT",
"author": "",
"scripts": {
"build": "pnpm --filter ember-render-helpers build",
"build": "pnpm --filter './packages/**' build",
"lint": "pnpm --filter '*' lint",
"lint:fix": "pnpm --filter '*' lint:fix",
"prepare": "pnpm build",
"release:changelog": "changeset version",
"release:publish": "pnpm build && changeset publish",
"start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start:addon": "pnpm --filter ember-render-helpers start",
"start:test-app": "pnpm --filter test-app start",
"test": "pnpm --filter '*' test"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@changesets/get-github-info": "^0.6.0",
"concurrently": "^8.2.2"
},
"engines": {
Expand Down
12 changes: 6 additions & 6 deletions packages/ember-codemod-ember-render-helpers-to-v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@babel/core": "^7.24.5",
"@codemod-utils/tests": "^1.1.4",
"@sondr3/minitest": "^0.1.2",
"@tsconfig/node18": "^18.2.4",
"@tsconfig/strictest": "^2.0.5",
"@types/node": "^18.19.31",
"@types/yargs": "^17.0.32",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"concurrently": "^8.2.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.0.0",
"eslint-plugin-n": "^17.4.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-typescript-sort-keys": "^3.2.0",
"prettier": "^3.2.5",
"typescript": "^5.4.4"
"typescript": "^5.4.5"
},
"engines": {
"node": "18.* || >= 20"
Expand Down
45 changes: 38 additions & 7 deletions packages/ember-render-helpers/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,32 @@ module.exports = {
},
},
overrides: [
// TypeScript and JavaScript files
// Ember files
{
files: ['**/*.{gjs,gts,js,ts}'],
files: ['**/*.{gts,ts}'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-import-type-side-effects': 'error',
},
},
{
files: ['**/*.gts'],
parser: 'ember-eslint-parser',
extends: ['plugin:ember/recommended-gts'],
},
{
files: ['**/*.gjs'],
parser: 'ember-eslint-parser',
extends: ['plugin:ember/recommended-gjs'],
},
{
files: ['**/*.{gjs,gts,js,ts}'],
rules: {
'import/no-duplicates': 'error',
'import/no-unresolved': [
Expand All @@ -53,13 +72,25 @@ module.exports = {
],
},
},
// Node files (v2 addon)
{
files: ['src/**/*.{gjs,gts,js,ts}'],
rules: {
'import/extensions': [
'error',
'always',
{
ignorePackages: true,
},
],
},
},
// Node files
{
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./.eslintrc.{cjs,js}',
'./.prettierrc.{cjs,js}',
'./.stylelintrc.{cjs,js}',
'./.template-lintrc.{cjs,js}',
'./addon-main.cjs',
'./blueprints/*/index.js',
'./rollup.config.mjs',
Expand Down
Loading

0 comments on commit 45231b2

Please sign in to comment.