Skip to content

Commit

Permalink
Merge pull request #24 from svelte-plugins/updates
Browse files Browse the repository at this point in the history
refactor(repo): update tooling and cleaning up builds
  • Loading branch information
dysfunc committed Nov 26, 2023
2 parents 51fa768 + 1f845af commit 77388c9
Show file tree
Hide file tree
Showing 29 changed files with 10,989 additions and 20,035 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
src/**/*.snap.js
.eslintrc.json
28 changes: 28 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"env": {
"es2017": true,
"commonjs": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["vitest"],
"extends": ["eslint:recommended", "plugin:vitest/recommended"],
"ignorePatterns": ["**/*.snap.js"],
"overrides": [
{
"files": ["*.svelte"],
"parser": "svelte-eslint-parser"
}
],
"rules": {
"eqeqeq": "error",
"no-useless-escape": "off",
"no-unused-expressions": "off",
"no-unused-vars": "off",
"no-self-assign": "off",
"no-undef": "off"
}
}
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @dysfunc
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Report a bug to help us improve the overall user experience
title: '🐛 '
labels: 'Type: Bug'
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest a new feature or functionality enhancement
title: ''
labels: 'Type: Feature'
assignees: ''
---

**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 [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

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

**Additional context**
Add any other context or screenshots about the feature request here.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Issue
about: Track a new feature, enhancement, or general task.
title: ''
labels: ''
assignees: ''
---
37 changes: 37 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
**Why these changes?**

**How do we test?**

**Screenshots**

<!--
# Instructions:
1. Choose an emoji to categorize your pull request (copy-paste emoji in front of your title):
✨ New feature
🐛 Bugfix
🔥 P0 fix
🧪 Tests
🚀 Performance improvements
🖍 Styling
♿ Accessibility
🌐 Internationalization
📖 Documentation
🏗 Infrastructure / Tooling / Builds / CI
⏪ Reverting a previous change
🧹 Code refactors and general housekeeping
🗑️ Code removal
2. Pick a meaningful title for your pull request!
- Use sentence case. Keep it short. ex: `✨ Released manage users list view`
3. Enter a succinct description that says why the PR is necessary, and what it does.
Examples of good descriptions:
- Implement aspect of X
- Leave out feature Y because of A
- Improve performance by B
- Improve accessibility by C
4. If the pull request addresses an issue, mention it with keywords `Fixes`, `Closes`, or `Resolves`.
- Using one of the above keywords will automatically close the issue (ex: Fixes #17)
5. Make sure to assign the appropriate label(s) to the pull request!
6. Provide clear testing instructions that include any pertinent information, i.e. roles, feature flags, etc.)
7. Include screenshots of your changes if they impact the UI (Before & After).
-->
37 changes: 37 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Unit Tests (Vitest)

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
runs-on: ubuntu-latest
if: |
(
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, 'version bump')
)
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- uses: szenius/[email protected]
with:
timezoneLinux: "America/Los_Angeles"
timezoneMacos: "America/Los_Angeles"
timezoneWindows: "Pacific Standard Time"
- run: npm i
- run: npm test

- uses: actions/upload-artifact@v2
if: failure()
with:
name: unit-tests
path: ${{ github.workspace }}/coverage/
retention-days: 5
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# except
!.editorconfig
!.eslintignore
!.eslintrc.json
!.github
!.gitignore
Expand All @@ -20,7 +21,6 @@
# generated
.vercel
/node_modules
/lib
/dist

# testing
Expand Down
5 changes: 4 additions & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"./src/**/*.{test.js,js,svelte}": ["eslint -c ./.eslintrc.js --fix", "prettier --write"]
"./src/**/*.{test.js,js,json,svelte}": [
"eslint -c ./.eslintrc.json --fix",
"prettier --write"
]
}
13 changes: 11 additions & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,14 @@
"svelteSortOrder": "options-scripts-markup-styles",
"svelteStrictMode": false,
"svelteBracketNewLine": true,
"svelteAllowShorthand": true
}
"svelteAllowShorthand": true,
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
44 changes: 43 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,48 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.1](https://github.com/svelte-plugins/tooltips/releases/tag/v0.1.0) - 2022-08-21
## [1.0.1](https://github.com/svelte-plugins/tooltips/releases/tag/v1.0.1) - 2022-11-19

- feat(tooltips): add delay prop by @joligoms

## [1.0.0](https://github.com/svelte-plugins/tooltips/releases/tag/v1.0.0) - 2022-11-13

- refactor(tooltips): use absolute positioning with tooltips

## [0.1.9](https://github.com/svelte-plugins/tooltips/releases/tag/v0.1.9) - 2022-11-08

- New prop show that allows the user to control the tooltip visibility outside of standard actions.
- New action type added called prop. This should be used when leveraging show prop.
- Update demo containing an example of how to show

## [0.1.8](https://github.com/svelte-plugins/tooltips/releases/tag/v0.1.8) - 2022-09-12

- Updated Typescript definitions
- Fixed an issue with empty state with action

## [0.1.7](https://github.com/svelte-plugins/tooltips/releases/tag/v0.1.7) - 2022-09-12

- Fix an issue handling empty tooltip
- New action property that supports click or hover as triggers
- New CSS variables to control white-space
- Add Typescript definitions

## [0.1.6](https://github.com/svelte-plugins/tooltips/releases/tag/v0.1.6) - 2022-09-09

- fix(offsets): properly calc position using both x and y offsets

## [0.1.5](https://github.com/svelte-plugins/tooltips/releases/tag/v0.1.5) - 2022-09-09

- Includes a bug fix for a bad reference with SveltKit pre-rendering.

## [0.1.4](https://github.com/svelte-plugins/tooltips/releases/tag/v0.1.4) - 2022-08-30

- This release includes a major fix for animations related to handling auto-positioning and content sizing.

## [0.1.2](https://github.com/svelte-plugins/tooltips/releases/tag/v0.1.2) - 2022-08-21

- Add theme property and update documentation

## [0.1.1](https://github.com/svelte-plugins/tooltips/releases/tag/v0.1.1) - 2022-08-21

- Initial release
File renamed without changes
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<title>@svelte-plugins/tooltips</title>

<link rel="icon" type="image/png" href="./favicon.png" />
<link rel="stylesheet" href="./global.css" />
<link rel="stylesheet" type="text/css" href="./src/styles/styles.scss">

<meta name="description" content="A simple rule-based approach to tracking element viewability." />
<meta name="description" content="A simple tooltip action and component designed for Svelte." />
<meta name="keywords" content="tooltips, tooltip action, tooltip component, svelte, svelte component" />

<meta property="og:url" content="" />
Expand All @@ -23,7 +23,7 @@
<meta name="twitter:image" content="favicon.png" />
</head>
<body>
<a href="https://github.com/svelte-plugins/tooltips" class="github-ribbon"><img loading="lazy" width="149" height="149" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_darkblue_121621.png?resize=149%2C149" class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1"></a>
<a href="https://github.com/svelte-plugins/tooltips" class="github-ribbon"><img loading="lazy" width="300" height="300" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_darkblue_121621.png?resize=300%2C300" class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1"></a>
<script type="module" src="/src/index.js"></script>
</body>
</html>
Loading

0 comments on commit 77388c9

Please sign in to comment.