Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stenciljs/core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.20.0
Choose a base ref
...
head repository: stenciljs/core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.21.0
Choose a head ref
Loading
Showing with 1,605 additions and 449 deletions.
  1. +13 −1 .github/dependabot.yml
  2. +19 −0 .github/workflows/actions/auto-request-reviews/action.yml
  3. +7 −0 .github/workflows/actions/auto-request-reviews/index.js
  4. +77 −0 .github/workflows/actions/auto-request-reviews/main.ts
  5. +236 −0 .github/workflows/actions/auto-request-reviews/package-lock.json
  6. +16 −0 .github/workflows/actions/auto-request-reviews/package.json
  7. +18 −0 .github/workflows/actions/auto-request-reviews/tsconfig.json
  8. +2 −2 .github/workflows/build.yml
  9. +2 −2 .github/workflows/lint-and-format.yml
  10. +18 −0 .github/workflows/pr-assign.yml
  11. +9 −9 .github/workflows/tech-debt-burndown.yml
  12. +2 −2 .github/workflows/test-analysis.yml
  13. +2 −2 .github/workflows/test-browserstack.yml
  14. +2 −2 .github/workflows/test-bundlers.yml
  15. +2 −2 .github/workflows/test-e2e.yml
  16. +2 −2 .github/workflows/test-unit.yml
  17. +14 −0 CHANGELOG.md
  18. +201 −33 NOTICE.md
  19. +623 −315 package-lock.json
  20. +7 −7 package.json
  21. +5 −0 scripts/bundles/compiler.ts
  22. +8 −0 src/compiler/config/test/validate-dev-server.spec.ts
  23. +37 −0 src/compiler/config/test/validate-hydrated.spec.ts
  24. +4 −2 src/compiler/config/validate-dev-server.ts
  25. +3 −2 src/compiler/config/validate-hydrated.ts
  26. +1 −3 src/compiler/config/validate-service-worker.ts
  27. +22 −2 src/compiler/optimize/optimize-module.ts
  28. +1 −24 src/compiler/public.ts
  29. +6 −12 src/compiler/style/css-parser/parse-css.ts
  30. +1 −0 src/compiler/sys/dependencies.json
  31. +38 −3 src/compiler/transpile.ts
  32. +16 −6 src/compiler/types/generate-app-types.ts
  33. +7 −3 src/compiler/types/generate-component-types.ts
  34. +36 −0 src/declarations/stencil-public-runtime.ts
  35. +7 −2 src/runtime/vdom/h.ts
  36. +51 −0 src/utils/test/util.spec.ts
  37. +66 −1 src/utils/util.ts
  38. +7 −6 test/bundler/package-lock.json
  39. +1 −0 test/bundler/package.json
  40. +12 −0 test/end-to-end/src/components.d.ts
  41. +3 −3 test/karma/package-lock.json
  42. +1 −1 test/karma/package.json
14 changes: 13 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ updates:
- dependency-name: '@types/node'
versions: ['17', '18']
- dependency-name: 'typescript'
versions: ['>=4.9']
versions: ['>=4.10', '>=5.0']
# disable Jest updates until the new testing architecture is in place
- dependency-name: '@types/jest'
versions: ['>=28']
@@ -39,7 +39,19 @@ updates:
# Disable rebasing for pull requests, as having several open pull requests all get simultaneously rebased gets
# noisy from a notification standpoint
rebase-strategy: 'disabled'
ignore:
# These values should match the values ignored by Dependabot for the project's root `package.json` (above)
- dependency-name: '@types/node'
versions: ['17', '18']
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
- package-ecosystem: 'npm' # See documentation for possible values
directory: './.github/workflows/actions/auto-request-reviews'
schedule:
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'
19 changes: 19 additions & 0 deletions .github/workflows/actions/auto-request-reviews/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Auto Request Review

inputs:
org:
description: 'The Github organization name (i.e "ionic-team")'
required: true
team:
description: 'The Github team name (i.e. "stencil") that will be used to assign individual reviewers when the PR author is within the specified organization.'
required: true
orgReadToken:
description: 'The GitHub token with permissions for executing readonly API calls to fetch organization members'
required: true
writeToken:
description: 'The GitHub token with permissions for executing a write action on PRs'
required: true

runs:
using: 'node16'
main: 'index.js'
7 changes: 7 additions & 0 deletions .github/workflows/actions/auto-request-reviews/index.js

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions .github/workflows/actions/auto-request-reviews/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import { getInput, setFailed } from '@actions/core';
import { context, getOctokit } from '@actions/github';

async function run() {
const writeToken = getInput('writeToken');
if (writeToken == null || !writeToken.length) {
throw new Error('No Github write token provided');
}

const readToken = getInput('orgReadToken');
if (readToken == null || !readToken.length) {
throw new Error('No Github read token provided');
}

const organization = getInput('org');
if (organization == null || !organization.length) {
throw new Error('No Github organization specified');
}

const teamSlug = getInput('team');
if (teamSlug == null || !teamSlug.length) {
throw new Error('No Github team specified');
}

const writeOctokit = getOctokit(writeToken);
const readOctokit = getOctokit(readToken);

// PR author
const username = context.payload.pull_request?.user.login as string;

console.log(`${username} opened PR #${context.payload.number}`);

// Check if the PR author is a member of the organization
console.log(`Checking if ${username} is a member of ${organization}`);
const { status } = await readOctokit.rest.orgs.checkMembershipForUser({
org: organization,
username,
});

// 204 means that both the requester (the action's authorization) and the PR author
// are org members, so we should assign the PR to team members accordingly
// Need to cast to a number because the octokit type generics assume this will only return a 302 which is not true
if ((status as number) === 204) {
console.log(`${username} is an organization member`);
console.log(`Fetching ${teamSlug} team members`);

const { data: teamMembers } = await readOctokit.rest.teams.listMembersInOrg({
org: organization,
// Adding the team will only return the members in the org
// that are also in the team
team_slug: teamSlug,
});
const memberUsernames = teamMembers.map((ref) => ref.login);

console.log(`Found ${memberUsernames.length} team members: ${memberUsernames.join(', ')}`);

const reviewers = memberUsernames.filter((ref) => ref !== username);

console.log(`Requesting review from: ${reviewers.join(', ')}`);

await writeOctokit.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.number,
reviewers,
});

console.log('Success!');
} else {
console.log(`${username} is not an organization member. No review requests required.`);
}
}

run().catch((error) => {
console.error(error);
setFailed(error.message);
});
236 changes: 236 additions & 0 deletions .github/workflows/actions/auto-request-reviews/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .github/workflows/actions/auto-request-reviews/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"private": true,
"scripts": {
"build": "ncc build ./main.ts -o . -m"
},
"devDependencies": {
"@actions/core": "^1.9.1",
"@actions/github": "^5.0.3",
"@vercel/ncc": "^0.36.0",
"typescript": "4.9.4"
},
"volta": {
"node": "12.22.7",
"npm": "6.14.15"
}
}
18 changes: 18 additions & 0 deletions .github/workflows/actions/auto-request-reviews/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"alwaysStrict": true,
"strict": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"lib": ["dom", "es2019"],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "build/",
"pretty": true,
"target": "es2015",
"incremental": false,
"useUnknownInCatchVariables": true
},
"include": ["**/*.ts"]
}
Loading