Skip to content

Commit

Permalink
Merge branch 'master' of github.com:salesforce/lwc into jtu/template-…
Browse files Browse the repository at this point in the history
…function-styles
  • Loading branch information
jmsjtu committed May 8, 2024
2 parents 85f8a18 + 5c514ad commit 18e50bb
Show file tree
Hide file tree
Showing 314 changed files with 8,970 additions and 1,727 deletions.
94 changes: 3 additions & 91 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
"project": true
},

"plugins": ["jest", "@lwc/lwc-internal", "@typescript-eslint", "import", "header", "jsdoc"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:jsdoc/recommended-typescript"
],
"plugins": ["jest", "@lwc/lwc-internal", "@typescript-eslint", "import", "header"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended-type-checked"],

"env": {
"es6": true
Expand Down Expand Up @@ -163,24 +159,7 @@
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-argument": "off",
// This rule returns false positives with ! assertions, even with strictNullChecks(https://github.com/typescript-eslint/typescript-eslint/issues/1618) on it was complaining
"@typescript-eslint/no-unnecessary-type-assertion": "off",

"jsdoc/require-jsdoc": ["warn", { "publicOnly": true }],
"jsdoc/check-indentation": "error",
"jsdoc/check-syntax": "error",
"jsdoc/informative-docs": "error",
"jsdoc/no-bad-blocks": [
"error",
{ "ignore": ["__PURE__", "__PURE__@", "ts-expect-error", "ts-ignore"] }
],
"jsdoc/no-blank-blocks": "error",
"jsdoc/no-defaults": "error",
"jsdoc/no-types": "error",
"jsdoc/require-description": "error",
"jsdoc/require-example": "error",
"jsdoc/require-hyphen-before-param-description": ["error", "never"],
"jsdoc/require-throws": "error",
"jsdoc/sort-tags": "error"
"@typescript-eslint/no-unnecessary-type-assertion": "off"
},

"overrides": [
Expand Down Expand Up @@ -283,73 +262,6 @@
"header/header": "off"
}
},
{
// Don't complain about 3rd party JSDoc
"files": ["packages/@lwc/synthetic-shadow/src/3rdparty/**"],
"rules": {
"jsdoc/check-alignment": "off",
"jsdoc/check-indentation": "off",
"jsdoc/check-syntax": "off",
"jsdoc/check-values": "off",
"jsdoc/informative-docs": "off",
"jsdoc/no-bad-blocks": "off",
"jsdoc/no-blank-blocks": "off",
"jsdoc/no-defaults": "off",
"jsdoc/no-types": "off",
"jsdoc/require-description": "off",
"jsdoc/require-hyphen-before-param-description": "off",
"jsdoc/require-jsdoc": "off",
"jsdoc/require-param": "off",
"jsdoc/require-throws": "off",
"jsdoc/sort-tags": "off"
}
},
{
"files": [
// Private packages - documentation isn't required (but should still be good, if present)
"packages/@lwc/integration-karma/**",
"packages/@lwc/integration-tests/**",
"packages/@lwc/perf-benchmarks-components/**",
"packages/@lwc/perf-benchmarks/**",
// TODO [W-13278716]: All top-level exports should have JSDOC enforced
"packages/@lwc/engine-core/**",
// "packages/@lwc/engine-server/**",
// Package-level exports are documented, but not all file-level exports are, so we
// should keep these disabled for now
"packages/@lwc/babel-plugin-component/**",
"packages/@lwc/engine-dom/**",
"packages/@lwc/engine-server/**",
"packages/@lwc/module-resolver/**",
"packages/@lwc/shared/**",
"packages/@lwc/style-compiler/**",
"packages/@lwc/synthetic-shadow/**",
"packages/@lwc/template-compiler/**"
],
"rules": {
"jsdoc/require-jsdoc": "off",
// TODO [W-13278716]: All JSDoc should fully describe functions
"jsdoc/require-description": "off",
"jsdoc/require-example": "off",
"jsdoc/require-param-description": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-throws": "off"
}
},
// TODO [W-13278716]: Not everything *needs* an example, so I'll probably disable the rule
// when the ticket is complete, but for now I want to enable by default and disable as I go.
{
"files": [
"packages/@lwc/babel-plugin-component/**",
"packages/@lwc/compiler/**",
"packages/@lwc/errors/**",
"packages/@lwc/engine-dom/**",
"packages/@lwc/rollup-plugin/**",
"packages/@lwc/wire-service/**"
],
"rules": {
"jsdoc/require-example": "off"
}
},
{
// These files aren't JS files, but are directives used to selectively run test fixtures.
// We use eslint to break CI if they are accidentally committed. Note that lint-staged
Expand Down
26 changes: 15 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
groups:
# Non-major version bumps hopefully shouldn't break anything,
# so let's group them together into a single PR!
theoretically-non-breaking:
update-types:
- "minor"
- "patch"
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: 'weekly'
groups:
# Non-major version bumps hopefully shouldn't break anything,
# so let's group them together into a single PR!
theoretically-non-breaking:
update-types:
- 'minor'
- 'patch'
ignore:
# We are pinned to Tachometer 0.5.10 due to a breaking change in 0.6.0.
# See: https://github.com/google/tachometer/issues/244
- dependency-name: 'tachometer'
71 changes: 57 additions & 14 deletions .github/workflows/karma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ env:
PUPPETEER_SKIP_DOWNLOAD: 'true' # only needed for @best/runner-local, unused here
GITHUB_RUN_ID: ${{github.run_id}}
COVERAGE: '1'
NODE_VERSION: '20.12.2'

jobs:
run-karma-tests-group-1:
Expand All @@ -38,7 +39,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20.12.2'
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'

- name: Install dependencies
Expand All @@ -57,14 +58,12 @@ jobs:
- run: FORCE_NATIVE_SHADOW_MODE_FOR_TEST=1 yarn sauce:ci
- run: API_VERSION=58 yarn sauce:ci
- run: API_VERSION=58 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: API_VERSION=59 yarn sauce:ci
- run: API_VERSION=59 DISABLE_SYNTHETIC=1 yarn sauce:ci

- name: Upload coverage results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-report-group-1
path: ./packages/@lwc/integration-karma/coverage
path: ./packages/@lwc/integration-karma/coverage/**/coverage-final.json

run-karma-tests-group-2:
runs-on: ubuntu-22.04
Expand All @@ -80,7 +79,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20.12.2'
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'

- name: Install dependencies
Expand All @@ -93,11 +92,49 @@ jobs:
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: ${{ env.SAUCE_TUNNEL_ID }}

- run: API_VERSION=59 yarn sauce:ci
- run: API_VERSION=59 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: API_VERSION=60 yarn sauce:ci
- run: API_VERSION=60 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: API_VERSION=61 yarn sauce:ci
- run: API_VERSION=61 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER=1 DISABLE_SYNTHETIC=1 yarn sauce:ci

- name: Upload coverage results
uses: actions/upload-artifact@v4
with:
name: coverage-report-group-2
path: ./packages/@lwc/integration-karma/coverage/**/coverage-final.json

run-karma-tests-group-3:
runs-on: ubuntu-22.04
env:
SAUCE_TUNNEL_ID: github-action-tunnel-integration-${{github.run_id}}-group-3
defaults:
run:
working-directory: ./packages/@lwc/integration-karma
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ./

- uses: saucelabs/sauce-connect-action@v2
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: ${{ env.SAUCE_TUNNEL_ID }}

- run: ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL=1 yarn sauce:ci
- run: ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL=1 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER=1 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn sauce:ci
- run: DISABLE_STATIC_CONTENT_OPTIMIZATION=1 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: NODE_ENV_FOR_TEST=production yarn sauce:ci
Expand All @@ -106,10 +143,10 @@ jobs:
- run: ENABLE_SYNTHETIC_SHADOW_IN_HYDRATION=1 yarn hydration:sauce:ci

- name: Upload coverage results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-report-group-2
path: ./packages/@lwc/integration-karma/coverage
name: coverage-report-group-3
path: ./packages/@lwc/integration-karma/coverage/**/coverage-final.json

run-karma-tests:
runs-on: ubuntu-22.04
Expand All @@ -119,35 +156,41 @@ jobs:
needs:
- run-karma-tests-group-1
- run-karma-tests-group-2
- run-karma-tests-group-3
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20.12.2'
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ./

- name: Download coverage results - group 1
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage-report-group-1
path: ./packages/@lwc/integration-karma/coverage
- name: Download coverage results - group 2
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage-report-group-2
path: ./packages/@lwc/integration-karma/coverage
- name: Download coverage results - group 3
uses: actions/download-artifact@v4
with:
name: coverage-report-group-3
path: ./packages/@lwc/integration-karma/coverage

- run: yarn coverage

- name: Upload combined coverage
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-report-combined
path: ./packages/@lwc/integration-karma/coverage/combined
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:

- name: Check package.json integrity
run: node ./scripts/tasks/check-and-rewrite-package-json.js --test
- name: Check licenses are up to date
run: node ./scripts/tasks/generate-license-files.js --test
- name: Verify @lwc/shared is tree-shakable
run: node ./scripts/tasks/verify-treeshakable.js ./packages/@lwc/shared/dist/index.js
- name: Verify that dependencies are declared
Expand Down
33 changes: 19 additions & 14 deletions .nucleus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,28 @@ branches:
auto-start: true
auto-start-from-forks: false
merge-method: disabled # do not auto-merge; we'll do it ourselves
validate-optional-downstream-deps: true # temporarily test non-required downstreams
required-downstream-deps:
- LightningMobileRuntime/ui-lmr-components
- MobilePlatform/lds-debug-app
- Trailhead-Platform/ui-trailhead-core-components
- BuilderFramework/builder-framework-salesforce
- MobilePlatform/lsdk-modules
- MobilePlatform/lwr-lightning-platform
- MobilePlatform/ui-fsm-components
- Skilling-and-Enablement/storybook-utils
- Skilling-and-Enablement/ui-external-enablement
- Skilling-and-Enablement/ui-ses-experience-cloud
- automation-platform/ui-externalservices-builder-components
- automation-platform/ui-interaction-explorer-components
- communities/microsite-template-marketing
- communities/shared-experience-components
- communities/ui-lightning-community
- communities/ui-commerce-components
- lds/lds-plugins
- lwc/lwc-platform
- nrkruk/lwc-dev-core
- ris-gpta/core_via_components
- salesforce/builder-framework
- salesforce-experience-platform-emu/luvio
- salesforce-experience-platform-emu/komaci
- salesforce-experience-platform-emu/locker-pentest-app
- salesforce-experience-platform-emu/lwr
- salesforce/lwr-lightning-platform
- salesforce-experience-platform-emu/lwr-everywhere
- salesforce-experience-platform-emu/lwr-recipes
- salesforce/lwc-test
- salesforce/o11y-sample-app
release:
pull-request:
<<: *branch-definition
Expand All @@ -33,17 +40,15 @@ branches:
summer24:
pull-request:
<<: *branch-definition
milestone-.*: # used for prerelease testing
pull-request:
<<: *branch-definition
workflow: build-and-test # the default workflow is release, and we just want build+tests
jobs:
build-and-test:
memory-limit: 16
create-canary-release:
memory-limit: 16
build-dependency:
memory-limit: 16
release:
memory-limit: 16
steps:
node-conformance:
run:
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,5 @@ The footer should contain any information about **Breaking Changes** and is also
- If your tests have the potential to negatively impact performance, provide a before & after comparison of performance using the test collateral provided in the repo.

It's also worth noting that not all submissions will be accepted, even if all the above criteria are met. There may be constraints in the larger Salesforce ecosystem that prevent certain changes. If your submission is likely to change large parts of the codebase, please open an issue preemptively so that the design can be discussed.

**Working with GitHub:** Pull requests submitted from forks do not have access to the secrets used by GitHub actions. If necessary, please ask a maintainer to run the `copy-fork` script for your pull request.
2 changes: 1 addition & 1 deletion LICENSE → LICENSE-CORE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT LICENSE

Copyright (c) 2018, Salesforce.com, Inc.
Copyright (c) 2024, Salesforce, Inc.
All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Expand Down

0 comments on commit 18e50bb

Please sign in to comment.