Skip to content

Commit

Permalink
Merge branch 'stencil-main' into feat-prop-get-set
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/compiler/transformers/decorators-to-static/convert-decorators.ts
  • Loading branch information
John Jenkins committed Nov 16, 2022
2 parents c558b3d + 00ea02c commit ba4e0ee
Show file tree
Hide file tree
Showing 590 changed files with 9,063 additions and 5,128 deletions.
86 changes: 52 additions & 34 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'jsdoc', 'jest'],
plugins: ['@typescript-eslint', 'jsdoc', 'jest', 'simple-import-sort'],
extends: [
'plugin:jest/recommended',
// including prettier here ensures that we don't set any rules which will conflict
Expand All @@ -10,70 +10,88 @@ module.exports = {
'prettier',
],
rules: {
'@typescript-eslint/no-unused-vars': ['error', {
"argsIgnorePattern": "^_",
// TODO(STENCIL-452): Investigate using eslint-plugin-react to remove the need for varsIgnorePattern
"varsIgnorePattern": "^(h|Fragment)$"
}],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
// TODO(STENCIL-452): Investigate using eslint-plugin-react to remove the need for varsIgnorePattern
varsIgnorePattern: '^(h|Fragment)$',
},
],
/**
* Configuration for Jest rules can be found here:
* Configuration for Jest rules can be found here:
* https://github.com/jest-community/eslint-plugin-jest/tree/main/docs/rules
*/
"jest/expect-expect": [
"error",
'jest/expect-expect': [
'error',
{
// we set this to `expect*` so that any function whose name starts with expect will be counted
// as an assertion function, allowing us to use functions to DRY up test suites.
"assertFunctionNames": ["expect*"],
}
assertFunctionNames: ['expect*'],
},
],
// we...have a number of things disabled :)
// TODO(STENCIL-488): Turn this rule back on once there are no violations of it remaining
"jest/no-disabled-tests": ["off"],
'jest/no-disabled-tests': ['off'],
// we use this in enough places that we don't want to do per-line disables
"jest/no-conditional-expect": ["off"],
'jest/no-conditional-expect': ['off'],
// this enforces that Jest hooks (e.g. `beforeEach`) are declared in test files in their execution order
// see here for details: https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-hooks-in-order.md
"jest/prefer-hooks-in-order": ["warn"],
'jest/prefer-hooks-in-order': ['warn'],
// this enforces that Jest hooks (e.g. `beforeEach`) are declared at the top of `describe` blocks
"jest/prefer-hooks-on-top": ["warn"],
'jest/prefer-hooks-on-top': ['warn'],
/**
* Configuration for the JSDoc plugin rules can be found at:
* https://github.com/gajus/eslint-plugin-jsdoc
*/
// validates that the name immediately following `@param` matches the parameter name in the function signature
// this works in conjunction with "jsdoc/require-param"
"jsdoc/check-param-names": [
"error", {
// if `checkStructured` is `true`, it asks that the JSDoc describe the fields being destructured.
// turn this off to not leak function internals/discourage describing them
checkDestructured: false,
}],
'jsdoc/check-param-names': [
'error',
{
// if `checkStructured` is `true`, it asks that the JSDoc describe the fields being destructured.
// turn this off to not leak function internals/discourage describing them
checkDestructured: false,
},
],
// require that jsdoc attached to a method/function require one `@param` per parameter
"jsdoc/require-param": [
"error", {
'jsdoc/require-param': [
'error',
{
// if `checkStructured` is `true`, it asks that the JSDoc describe the fields being destructured.
// turn this off to not leak function internals/discourage describing them
checkDestructured: false,
// always check setters as they should require a parameter (by definition)
checkSetters: true
}],
checkSetters: true,
},
],
// rely on TypeScript types to be the source of truth, minimize verbosity in comments
"jsdoc/require-param-type": ["off"],
"jsdoc/require-param-description": ["error"],
"jsdoc/require-returns-check": ["error"],
"jsdoc/require-returns-description": ["error"],
'jsdoc/require-param-type': ['off'],
'jsdoc/require-param-description': ['error'],
'jsdoc/require-returns-check': ['error'],
'jsdoc/require-returns-description': ['error'],
// rely on TypeScript types to be the source of truth, minimize verbosity in comments
"jsdoc/require-returns-type": ["off"],
"jsdoc/require-returns": ["error"],
'jsdoc/require-returns-type': ['off'],
'jsdoc/require-returns': ['error'],
'prefer-const': 'error',
'no-var': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
overrides: [
{
// the stencil entry point still uses `var`, ignore errors related to it
files: 'bin/**',
rules: {
'no-var': 'off',
},
},
],
// inform ESLint about the global variables defined in a Jest context
// see https://github.com/jest-community/eslint-plugin-jest/#usage
"env": {
"jest/globals": true
}
env: {
'jest/globals': true,
},
};
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ body:
description: Please reproduce this issue in a blank Stencil starter application and provide a link to the repo. Run `npm init stencil` to quickly spin up a Stencil project. This is the best way to ensure this issue is triaged quickly. Issues without a code reproduction may be closed if the Stencil Team cannot reproduce the issue you are reporting.
placeholder: https://github.com/...
validations:
required: true
required: true
- type: textarea
attributes:
label: Additional Information
Expand Down
37 changes: 28 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,35 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "daily"
open-pull-requests-limit: 5
interval: 'daily'
open-pull-requests-limit: 50
# Disable rebasing for pull requests, as having several open pull requests all get simultaneously rebased gets
# noisy from a notification standpoint
rebase-strategy: "disabled"
rebase-strategy: 'disabled'
ignore:
- dependency-name: "@types/node"
versions: ["17", "18"]
- dependency-name: "typescript"
versions: ["4.8"]
- dependency-name: '@types/node'
versions: ['17', '18']
- dependency-name: 'typescript'
versions: ['4.8']
# disable Jest updates until the new testing architecture is in place
- dependency-name: '@types/jest'
versions: ['>=28']
- dependency-name: 'jest'
versions: ['>=28']
- dependency-name: 'jest-cli'
versions: ['>=28']
- dependency-name: 'jest-environment-node'
versions: ['>=28']
# Disable dependency updates used in release scripts
# TODO(STENCIL-590): remove these once deps are removed
- dependency-name: 'inquirer'
versions: ['>7.3.3']
- dependency-name: '@types/inquirer'
versions: ['>7.3.1']
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
22 changes: 11 additions & 11 deletions .github/ionic-issue-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ triage:

closeAndLock:
labels:
- label: "ionitron: support"
- label: 'ionitron: support'
message: >
Thanks for the issue! This issue appears to be a support request. We use this issue tracker exclusively for
bug reports and feature requests. Please use our [slack channel](https://stencil-worldwide.herokuapp.com/)
for questions about Stencil.
Thank you for using Stencil!
- label: "ionitron: missing template"
- label: 'ionitron: missing template'
message: >
Thanks for the issue! It appears that you have not filled out the provided issue template. We use this issue
template in order to gather more information and further assist you. Please create a new issue and ensure the
Expand All @@ -26,7 +26,7 @@ closeAndLock:

comment:
labels:
- label: "ionitron: needs reproduction"
- label: 'ionitron: needs reproduction'
message: >
Thanks for the issue! This issue has been labeled as `needs reproduction`. This label is added to issues that
need a code reproduction.
Expand Down Expand Up @@ -56,7 +56,7 @@ noReply:
noReproduction:
days: 14
maxIssuesPerRun: 100
label: "ionitron: needs reproduction"
label: 'ionitron: needs reproduction'
responseLabel: triage
exemptProjects: true
exemptMilestones: true
Expand All @@ -74,18 +74,18 @@ stale:
days: 30
maxIssuesPerRun: 100
exemptLabels:
- "Bug: Validated"
- "Feature: Want this? Upvote it!"
- 'Bug: Validated'
- 'Feature: Want this? Upvote it!'
- good first issue
- help wanted
- Request For Comments
- "Resolution: Needs Investigation"
- "Resolution: Refine"
- 'Resolution: Needs Investigation'
- 'Resolution: Refine'
- triage
exemptAssigned: true
exemptProjects: true
exemptMilestones: true
label: "ionitron: stale issue"
label: 'ionitron: stale issue'
message: >
Thanks for the issue! This issue is being closed due to inactivity. If this is still
an issue with the latest version of Stencil, please create a new issue and ensure the
Expand All @@ -99,7 +99,7 @@ stale:

wrongRepo:
repos:
- label: "ionitron: cli"
- label: 'ionitron: cli'
repo: ionic-cli
message: >
Thanks for the issue! We use this issue tracker exclusively for bug reports and feature requests
Expand All @@ -108,7 +108,7 @@ wrongRepo:
Thank you for using Stencil!
- label: "ionitron: ionic"
- label: 'ionitron: ionic'
repo: ionic
message: >
Thanks for the issue! We use this issue tracker exclusively for bug reports and feature requests
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/actions/check-git-context/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'Check Git Context'
description: 'checks for a dirty git context, failing if the context is dirty'
runs:
using: composite
steps:
- name: Git status check
# here we check that there are no changed / new files.
# we use `git status`, grep out the build zip used throughout CI,
# and check if there are more than 0 lines in the output.
run: if [[ $(git status --short | grep -c -v stencil-core-build.zip) -ne 0 ]]; then STATUS=$(git status --verbose); printf "%s" "$STATUS"; git diff | cat; exit 1; fi
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/actions/download-archive/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
runs:
using: 'composite'
steps:
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
- uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/actions/get-core-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ runs:
# this overrides previous versions of the node runtime that was set.
# jobs that need a different version of the Node runtime should explicitly
# set their node version after running this step
- name: Use Node 16
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3.1.1
- name: Use Node Version from Volta
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
with:
node-version: 16
node-version-file: './package.json'
cache: 'npm'

- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actions/upload-archive/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
run: zip -q -r ${{ inputs.output }} ${{ inputs.paths }}
shell: bash

- uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: ${{ inputs.name }}
path: ${{ inputs.output }}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: 'ubuntu-latest'
steps:
- name: Checkout Code
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
# the pull_request_target event will consider the HEAD of `main` to be the SHA to use.
# attempt to use the SHA associated with a pull request and fallback to HEAD of `main`
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint-and-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
runs-on: 'ubuntu-latest'
steps:
- name: Checkout Code
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

- name: Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies

- name: ESLint
run: npm run lint

- name: Prettier Check
run: npm run prettier.dry-run
shell: bash

- name: ESLint
run: npm run lint
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ jobs:

analysis_tests:
name: Analysis Tests
needs: [ build_core ]
needs: [build_core]
uses: ./.github/workflows/test-analysis.yml

bundler_tests:
name: Bundler Tests
needs: [ build_core ]
needs: [build_core]
uses: ./.github/workflows/test-bundlers.yml

e2e_tests:
name: E2E Tests
needs: [ build_core ]
needs: [build_core]
uses: ./.github/workflows/test-e2e.yml

unit_tests:
name: Unit Tests
needs: [ build_core ]
needs: [build_core]
uses: ./.github/workflows/test-unit.yml
Loading

0 comments on commit ba4e0ee

Please sign in to comment.