Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook 7 #7

Merged
merged 8 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"excludeAfterRemap": true,
"reporter": ["text-summary", "lcov"],
"include": ["packages/*/*/src/**/*.+(ts|marko)"],
"parserPlugins": ["objectRestSpread", "typescript"]
}
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/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "marko-js/compat" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
11 changes: 11 additions & 0 deletions .changeset/real-horses-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@storybook/marko-webpack": major
"@storybook/marko-vite": major
"@storybook/marko": major
---

Upgrade to Storybook 7.

Note `@storybook/marko/testing` is now exposed via `@storybook/marko` directly.

See https://storybook.js.org/docs/react/migration-guide
3 changes: 0 additions & 3 deletions .commitlintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
node_modules
coverage
dist
__snapshots__
29 changes: 25 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,51 @@
{
"root": true,
"extends": ["eslint:recommended", "prettier"],
"extends": ["eslint:recommended", "plugin:import/recommended", "prettier"],
"parserOptions": {
"sourceType": "module",
"impliedStrict": true
"impliedStrict": true,
"warnOnUnsupportedTypeScriptVersion": false
},
"settings": {
"import/resolver": {
"typescript": {
"project": true
}
}
},
"env": {
"node": true,
"mocha": true,
"es2020": true,
"browser": true
},
"rules": {
"import/order": ["error"],
"sort-imports": [
"error",
{
"allowSeparatedGroups": true,
"ignoreDeclarationSort": true
}
]
},
"overrides": [
{
"files": ["**/*.ts"],
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off"
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-namespace": "off"
}
}
]
Expand Down
3 changes: 0 additions & 3 deletions .fixpackrc

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock.json -diff
22 changes: 22 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Code of Conduct

This project adheres to the [eBay Code of Conduct](http://ebay.github.io/codeofconduct).
By participating in this project you agree to abide by its terms.

- Be friendly and patient.

- Be welcoming: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.

- Be considerate: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language.

- Be respectful: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one.

- Be careful in the words that we choose: we are a community of professionals, and we conduct ourselves professionally.

- Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren’t acceptable.

- Try to understand why we disagree: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively.

- Remember that we’re different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.

Please visit http://ebay.github.io/codeofconduct for the full code of conduct.
14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/Question.md

This file was deleted.

58 changes: 47 additions & 11 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,53 @@
---
name: Bug report 🐞
about: Something is broken and you have a reliable reproduction? Let us know here. For questions, please use "Question" below.
labels: needs triage, bug
name: "\U0001F41BBug report"
about: Something isn't working right
---

**Describe the bug**
A clear and concise description of what the bug is.
## [email protected]

**To Reproduce**
Link to a reproduction repo that demonstrates the bug, plus instructions on how to trigger it.
<!--- Provide the package name and the exact version in which you see the bug. You can run `npm ls <package-name>` to see this. -->

**System**
Please paste the results of `npx sb@next info` here.
### Details

**Additional context**
Add any other context about the problem here.
<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug. How has this bug affected you? What were you trying to accomplish? -->

### Expected Behavior

<!--- Tell us what should happen -->

### Actual Behavior

<!--- Tell us what happens instead -->

### Possible Fix

<!--- Not obligatory, but suggest a fix or reason for the bug -->

<details><summary>Additional Info</summary>

### Your Environment

<!-- Include as many relevant details about the environment you experienced the bug in -->

- Environment name and version (e.g. Chrome 39, node.js 5.4):
- Operating System and version (desktop or mobile):
- Link to your project:

### Steps to Reproduce

<!-- Provide a link to a live example -->

<!-- or an unambiguous set of steps to reproduce this bug -->

<!-- include code to reproduce, if relevant -->

1. first...
2.
3.
4.

### Stack Trace

<!-- If an error is thrown, provide the stack trace here -->

</details>
34 changes: 21 additions & 13 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
---
name: Feature request 💡
about: Suggest an idea for this project
labels: needs triage, feature request
name: "\U0001F680Feature request"
about: Suggest an idea for a package in this repo
---

**Is your feature request related to a problem? Please describe**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
## <package-name>

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
<!--- Which package? -->

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
### Description

**Are you able to assist to bring the feature to reality?**
no | yes, I can...
<!--- Provide a detailed description of the change or addition you are proposing -->

**Additional context**
Add any other context or screenshots about the feature request here.
### Why

<!--- Why is this change important to you? How would you use it? -->

<!--- How can it benefit other users? -->

### Possible Implementation & Open Questions

<!--- Not obligatory, but suggest an idea for implementing addition or change -->

<!--- What still needs to be discussed -->

### Is this something you're interested in working on?

<!--- Yes or no -->
14 changes: 12 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Issue:
<!--- Provide a general summary of your changes in the Title above -->

## What I did
## Description

<!--- Describe your changes in detail. Include the package name if applicable. -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

<!--- If it fixes an open issue, please link to the issue here. -->

## Screenshots (if appropriate):

## Checklist:

Expand Down
80 changes: 67 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,86 @@ name: CI

on:
pull_request:
paths-ignore: ["**.md"]
types: [opened, synchronize]
push:
branches: ["next", "beta"]
paths-ignore: ["**.md"]
branches: [main]

concurrency:
group: "${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
build:
format:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Use node
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Format Code
run: npm run format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[ci] format"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-latest
name: "test: node@${{ matrix.node }}"
strategy:
fail-fast: false
matrix:
node: [14.x, 16.x]
node: [20]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Use node@${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: "npm"
- name: Install Chromium
run: npx playwright install-deps chromium
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
- name: Run tests
run: npm run ci:test
- name: Report code coverage
run: npm run ci:report
uses: codecov/codecov-action@v2
release:
runs-on: ubuntu-latest
needs: [format, test]
if: "${{ github.repository_owner == 'marko-js' && github.event_name == 'push' }}"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Release
id: changesets
uses: changesets/action@v1
with:
version: npm run version
publish: npm run release
commit: "[ci] release"
title: "[ci] release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading