-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
Showing
19 changed files
with
1,972 additions
and
1,014 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
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) |
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,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": [] | ||
} |
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,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, | ||
}; |
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,7 @@ | ||
--- | ||
"ember-codemod-ember-render-helpers-to-v1": patch | ||
"ember-render-helpers": patch | ||
"test-app": patch | ||
--- | ||
|
||
Updated dependencies |
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,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> |
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
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.