Skip to content

Commit 844cc17

Browse files
committed
Prepare repository for open source
1 parent 2d6d5a2 commit 844cc17

9 files changed

Lines changed: 288 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
test:
18+
name: Typecheck, Test, Build
19+
runs-on: ubuntu-24.04
20+
steps:
21+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
22+
- uses: shop/setup-javascript-action@main
23+
with:
24+
node-version-file: package.json
25+
pnpm-version: 10.28.0
26+
- run: pnpm install --frozen-lockfile
27+
- run: pnpm typecheck
28+
- run: pnpm test
29+
- run: pnpm build

.github/workflows/cla.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Contributor License Agreement (CLA)
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, synchronize]
6+
issue_comment:
7+
types: [created]
8+
9+
permissions:
10+
contents: read
11+
issues: write
12+
pull-requests: write
13+
statuses: write
14+
15+
jobs:
16+
cla:
17+
runs-on: ubuntu-latest
18+
if: |
19+
(github.event.issue.pull_request
20+
&& !github.event.issue.pull_request.merged_at
21+
&& contains(github.event.comment.body, 'signed')
22+
)
23+
|| (github.event.pull_request && !github.event.pull_request.merged)
24+
steps:
25+
- uses: Shopify/shopify-cla-action@9938f4b43524d1cfa7471ce9a803edf226697284 # v1
26+
with:
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
cla-token: ${{ secrets.CLA_TOKEN }}

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,19 @@ dist/
44
*.tgz
55
.pnpm-store/
66
.test-build/
7+
coverage/
8+
9+
# Local environment and editor state
10+
.env
11+
.env.*
12+
.vscode/
13+
.idea/
14+
15+
# Package manager and runtime logs
16+
npm-debug.log*
17+
pnpm-debug.log*
18+
yarn-debug.log*
19+
yarn-error.log*
20+
21+
# Internal-only local agent instructions
722
AGENTS.md

CODE_OF_CONDUCT.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at opensource@shopify.com.
63+
All complaints will be reviewed and investigated promptly and fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Correction
74+
75+
**Community Impact**: Use of inappropriate language or other behavior deemed
76+
unprofessional or unwelcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series of
85+
actions.
86+
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or permanent
92+
ban.
93+
94+
### 3. Temporary Ban
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent Ban
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent ban from any sort of public interaction within the
112+
community.
113+
114+
## Attribution
115+
116+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117+
version 2.1, available at
118+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
119+
120+
Community Impact Guidelines were inspired by
121+
[Mozilla's code of conduct enforcement ladder][mozilla coc].
122+
123+
For answers to common questions about this code of conduct, see the FAQ at
124+
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
125+
[https://www.contributor-covenant.org/translations][translations].
126+
127+
[homepage]: https://www.contributor-covenant.org
128+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
129+
[mozilla coc]: https://github.com/mozilla/diversity
130+
[faq]: https://www.contributor-covenant.org/faq
131+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Contributing
2+
3+
Shop CLI is maintained by Shopify. Contributions are welcome when they fit the project's personal-use scope and keep the CLI safe for shoppers, merchants, and contributors.
4+
5+
## Before You Start
6+
7+
- Search existing issues and pull requests before opening a new one.
8+
- Open an issue for significant user-facing behavior changes before implementation.
9+
- Keep pull requests focused and include tests for behavior changes.
10+
- Do not commit secrets, credentials, private hostnames, internal-only Shopify details, merchant PII, shopper PII, or data copied from private systems.
11+
- Do not copy code from another project unless its license allows it and the attribution requirements are understood.
12+
13+
## Contributor License Agreement
14+
15+
External contributors must sign Shopify's Contributor License Agreement before their pull request can be merged. The CLA check runs automatically on pull requests and will tell you what to do if a signature is required.
16+
17+
## Development
18+
19+
Requirements:
20+
21+
- Node.js 20 or newer
22+
- pnpm 10.28.0
23+
24+
Set up the project:
25+
26+
```bash
27+
pnpm install
28+
```
29+
30+
Run the standard checks:
31+
32+
```bash
33+
pnpm typecheck
34+
pnpm test
35+
pnpm build
36+
```
37+
38+
Run the CLI locally after building:
39+
40+
```bash
41+
pnpm build
42+
pnpm shop --help
43+
```
44+
45+
## Changesets
46+
47+
User-facing changes that should be released need a changeset:
48+
49+
```bash
50+
pnpm changeset
51+
```
52+
53+
Choose the package, select the appropriate semver bump, and write a concise release note.
54+
55+
## Pull Requests
56+
57+
- Include a clear description of the problem and solution.
58+
- Link related issues when applicable.
59+
- Update README or skill documentation when command behavior changes.
60+
- Keep generated output, build artifacts, package tarballs, local environment files, and credentials out of the repository.
61+
62+
## Code of Conduct
63+
64+
All contributors are expected to follow the [Code of Conduct](./CODE_OF_CONDUCT.md).
File renamed without changes.

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,19 @@ This CLI is for individual end-users only. Building commercial services, resale
5151

5252
See https://help.shop.app/shop/shopping/personal-agents for accepted and prohibited use.
5353

54+
## Development
55+
56+
```bash
57+
pnpm install
58+
pnpm typecheck
59+
pnpm test
60+
pnpm build
61+
```
62+
63+
## Contributing
64+
65+
Bug reports and pull requests are welcome. Read [CONTRIBUTING.md](./CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) before getting started.
66+
5467
## License
5568

56-
MIT. See [LICENSE](./LICENSE).
69+
MIT. See [LICENSE.md](./LICENSE.md).

dev.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: shop-cli
2+
# CI's package-manager wrapper checks this before routing npm/pnpm traffic
3+
# through package-proxy. This package installs only public npm dependencies,
4+
# so keep installs direct; package-proxy requires auth that public package
5+
# fetches in this repo do not provide.
6+
package_proxy: false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"files": [
2828
"dist",
2929
"README.md",
30-
"LICENSE",
30+
"LICENSE.md",
3131
"src",
3232
"skill"
3333
],

0 commit comments

Comments
 (0)