diff --git a/.github/workflows/actions/download-archive/action.yml b/.github/workflows/actions/download-archive/action.yml index 3db955187e89..26d92589ba5d 100644 --- a/.github/workflows/actions/download-archive/action.yml +++ b/.github/workflows/actions/download-archive/action.yml @@ -10,7 +10,7 @@ inputs: runs: using: 'composite' steps: - - uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5 + - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 with: name: ${{ inputs.name }} path: ${{ inputs.path }} diff --git a/.github/workflows/actions/publish-npm/action.yml b/.github/workflows/actions/publish-npm/action.yml index 66df94d808a7..c9cbc7d0ad64 100644 --- a/.github/workflows/actions/publish-npm/action.yml +++ b/.github/workflows/actions/publish-npm/action.yml @@ -11,7 +11,7 @@ runs: using: 'composite' steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Get Core Dependencies uses: ./.github/workflows/actions/get-core-dependencies diff --git a/.github/workflows/actions/upload-archive/action.yml b/.github/workflows/actions/upload-archive/action.yml index 9588e25ee474..8142eefee8fa 100644 --- a/.github/workflows/actions/upload-archive/action.yml +++ b/.github/workflows/actions/upload-archive/action.yml @@ -14,7 +14,7 @@ runs: run: zip -q -r ${{ inputs.output }} ${{ inputs.paths }} shell: bash - - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 + - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: ${{ inputs.name }} path: ${{ inputs.output }} diff --git a/.github/workflows/build-rollup.yml b/.github/workflows/build-rollup.yml index 6f778e707498..5a93834aaefe 100644 --- a/.github/workflows/build-rollup.yml +++ b/.github/workflows/build-rollup.yml @@ -11,7 +11,7 @@ jobs: runs-on: 'ubuntu-22.04' steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 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` diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 795b8e8354a7..2ed5bdce21d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: runs-on: 'ubuntu-22.04' steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 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` diff --git a/.github/workflows/create-production-pr.yml b/.github/workflows/create-production-pr.yml index 50356f0bb12e..088f41385118 100644 --- a/.github/workflows/create-production-pr.yml +++ b/.github/workflows/create-production-pr.yml @@ -35,7 +35,7 @@ jobs: shell: bash - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: # A depth of 0 gets the entire git history, which we'll want for things like checking all git history/tags. # We need git history to generate the changelog; however, we don't know how deep to go. @@ -70,7 +70,7 @@ jobs: shell: bash - name: Create the Pull Request - uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83 # v6.0.4 + uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5 with: # create a new pull request using the specified base branch base: ${{ inputs.base }} diff --git a/.github/workflows/lint-and-format.yml b/.github/workflows/lint-and-format.yml index dbdb1d7817bb..2c7686b3bb8c 100644 --- a/.github/workflows/lint-and-format.yml +++ b/.github/workflows/lint-and-format.yml @@ -12,7 +12,7 @@ jobs: runs-on: 'ubuntu-22.04' steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Get Core Dependencies uses: ./.github/workflows/actions/get-core-dependencies diff --git a/.github/workflows/pack-and-comment.yml b/.github/workflows/pack-and-comment.yml index 6cedb4988303..6a07dcb50d3f 100644 --- a/.github/workflows/pack-and-comment.yml +++ b/.github/workflows/pack-and-comment.yml @@ -14,7 +14,7 @@ jobs: runs-on: 'ubuntu-22.04' steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 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` @@ -39,7 +39,7 @@ jobs: FILENAME=$(npm pack --quiet) echo "FILENAME=$FILENAME" >> "$GITHUB_OUTPUT" - - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 + - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 id: upload-tarball with: name: ${{ steps.pack.outputs.filename }} diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml index cbb55a4029e8..6f6b3f822d2a 100644 --- a/.github/workflows/release-dev.yml +++ b/.github/workflows/release-dev.yml @@ -23,7 +23,7 @@ jobs: dev-version: ${{ steps.get-dev-version.outputs.DEV_VERSION }} steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Get Core Dependencies uses: ./.github/workflows/actions/get-core-dependencies @@ -60,7 +60,7 @@ jobs: id-token: write steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - uses: ./.github/workflows/actions/publish-npm with: tag: dev diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index ec85d52a1f22..194b48372461 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -22,7 +22,7 @@ jobs: nightly-version: ${{ steps.get-nightly-version.outputs.NIGHTLY_VERSION }} steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Get Core Dependencies uses: ./.github/workflows/actions/get-core-dependencies @@ -62,7 +62,7 @@ jobs: id-token: write steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - uses: ./.github/workflows/actions/publish-npm with: tag: nightly diff --git a/.github/workflows/release-production.yml b/.github/workflows/release-production.yml index 574d2fe19221..445e139a5e2e 100644 --- a/.github/workflows/release-production.yml +++ b/.github/workflows/release-production.yml @@ -43,7 +43,7 @@ jobs: if: ${{ inputs.base != 'main' && inputs.tag == 'latest' }} - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: # A depth of 0 gets the entire git history, which we'll want for things like checking all git history/tags. # We need git history to generate the changelog; however, we don't know how deep to go. diff --git a/.github/workflows/tech-debt-burndown.yml b/.github/workflows/tech-debt-burndown.yml index bbcb3a7c2744..006bfa256c6c 100644 --- a/.github/workflows/tech-debt-burndown.yml +++ b/.github/workflows/tech-debt-burndown.yml @@ -20,13 +20,13 @@ jobs: runs-on: 'ubuntu-22.04' steps: - name: Checkout main - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: ref: main if: ${{ matrix.branch == 'main' }} - name: Checkout PR branch - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 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` @@ -44,7 +44,7 @@ jobs: run: npx tsc --strictNullChecks --noEmit --pretty false | npx tsc-output-parser > null_errors_${{ matrix.branch }}.json - name: Upload null_errors_${{ matrix.branch }}.json - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: null_errors_${{ matrix.branch }} path: 'null_errors_${{ matrix.branch }}.json' @@ -58,13 +58,13 @@ jobs: runs-on: 'ubuntu-22.04' steps: - name: Checkout main - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: ref: main if: ${{ matrix.branch == 'main' }} - name: Checkout PR branch - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 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` @@ -79,7 +79,7 @@ jobs: run: npx ts-prune > unused-exports-${{ matrix.branch }}.txt - name: Upload unused exports - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: unused-exports-${{ matrix.branch }} path: 'unused-exports-${{ matrix.branch }}.txt' @@ -90,7 +90,7 @@ jobs: runs-on: 'ubuntu-22.04' steps: - name: Checkout current branch - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 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` @@ -102,25 +102,25 @@ jobs: # TODO(STENCIL-446): Remove this workflow once `strictNullChecks` is enabled - name: Download null errors file for main branch - uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5 + uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 with: name: null_errors_main # TODO(STENCIL-446): Remove this workflow once `strictNullChecks` is enabled - name: Download null errors file for PR - uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5 + uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 with: name: null_errors_pr # TODO(STENCIL-454): Remove or change this up once we've eliminated unused exports - name: Download unused exports for main - uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5 + uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 with: name: unused-exports-main # TODO(STENCIL-454): Remove or change this up once we've eliminated unused exports - name: Download unused exports for PR - uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5 + uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 with: name: unused-exports-pr diff --git a/.github/workflows/test-analysis.yml b/.github/workflows/test-analysis.yml index 0604e81fe0ee..894d699c9e33 100644 --- a/.github/workflows/test-analysis.yml +++ b/.github/workflows/test-analysis.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Get Core Dependencies uses: ./.github/workflows/actions/get-core-dependencies diff --git a/.github/workflows/test-bundlers.yml b/.github/workflows/test-bundlers.yml index 23092febe74d..1ca1d8e953f3 100644 --- a/.github/workflows/test-bundlers.yml +++ b/.github/workflows/test-bundlers.yml @@ -16,7 +16,7 @@ jobs: runs-on: 'ubuntu-22.04' steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Get Core Dependencies uses: ./.github/workflows/actions/get-core-dependencies diff --git a/.github/workflows/test-component-starter.yml b/.github/workflows/test-component-starter.yml index 8e9a8ba67155..ece5183f8f8e 100644 --- a/.github/workflows/test-component-starter.yml +++ b/.github/workflows/test-component-starter.yml @@ -22,7 +22,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Get Core Dependencies uses: ./.github/workflows/actions/get-core-dependencies diff --git a/.github/workflows/test-docs-build.yml b/.github/workflows/test-docs-build.yml index 0dde27c2208a..0e8c78cd39cd 100644 --- a/.github/workflows/test-docs-build.yml +++ b/.github/workflows/test-docs-build.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Get Core Dependencies uses: ./.github/workflows/actions/get-core-dependencies diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 3adda83f6c90..a71f68516300 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Get Core Dependencies uses: ./.github/workflows/actions/get-core-dependencies diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index ef78c1c1e650..d11752bf3d24 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Get Core Dependencies uses: ./.github/workflows/actions/get-core-dependencies diff --git a/.github/workflows/test-wdio.yml b/.github/workflows/test-wdio.yml index a9fe0721d5f0..5d0a0737aaab 100644 --- a/.github/workflows/test-wdio.yml +++ b/.github/workflows/test-wdio.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Use Node Version from Volta uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 07de0c7dee22..c3b43d900895 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 🏊 [4.17.2](https://github.com/ionic-team/stencil/compare/v4.17.1...v4.17.2) (2024-04-29) + + +### Bug Fixes + +* **build:** address @ionic/angular bundle size issue ([#5705](https://github.com/ionic-team/stencil/issues/5705)) ([0a7becc](https://github.com/ionic-team/stencil/commit/0a7beccb0a62a6a33a18b960aa5e59ada1b509fe)) +* **compiler:** recognize loud comments when generating style docs ([#5706](https://github.com/ionic-team/stencil/issues/5706)) ([a325f5c](https://github.com/ionic-team/stencil/commit/a325f5cd3f691fd3c10a2ab4c19a37d4617a4b79)), closes [#5623](https://github.com/ionic-team/stencil/issues/5623) + + + ## 🚒 [4.17.1](https://github.com/ionic-team/stencil/compare/v4.17.0...v4.17.1) (2024-04-23) diff --git a/package-lock.json b/package-lock.json index a99ad2f8b0f2..d97b88a0a81b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@stencil/core", - "version": "4.17.1", + "version": "4.17.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@stencil/core", - "version": "4.17.1", + "version": "4.17.2", "license": "MIT", "bin": { "stencil": "bin/stencil" @@ -73,7 +73,7 @@ "rollup": "2.56.3", "rollup-plugin-sourcemaps": "^0.6.3", "semver": "^7.3.7", - "terser": "5.30.3", + "terser": "5.30.4", "typescript": "~5.4.0", "webpack": "^5.75.0", "ws": "8.16.0" @@ -3068,16 +3068,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.0.tgz", - "integrity": "sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz", + "integrity": "sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.7.0", - "@typescript-eslint/type-utils": "7.7.0", - "@typescript-eslint/utils": "7.7.0", - "@typescript-eslint/visitor-keys": "7.7.0", + "@typescript-eslint/scope-manager": "7.7.1", + "@typescript-eslint/type-utils": "7.7.1", + "@typescript-eslint/utils": "7.7.1", + "@typescript-eslint/visitor-keys": "7.7.1", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.3.1", @@ -3103,15 +3103,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.0.tgz", - "integrity": "sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.1.tgz", + "integrity": "sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.7.0", - "@typescript-eslint/types": "7.7.0", - "@typescript-eslint/typescript-estree": "7.7.0", - "@typescript-eslint/visitor-keys": "7.7.0", + "@typescript-eslint/scope-manager": "7.7.1", + "@typescript-eslint/types": "7.7.1", + "@typescript-eslint/typescript-estree": "7.7.1", + "@typescript-eslint/visitor-keys": "7.7.1", "debug": "^4.3.4" }, "engines": { @@ -3131,13 +3131,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.0.tgz", - "integrity": "sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz", + "integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.7.0", - "@typescript-eslint/visitor-keys": "7.7.0" + "@typescript-eslint/types": "7.7.1", + "@typescript-eslint/visitor-keys": "7.7.1" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -3148,13 +3148,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.0.tgz", - "integrity": "sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz", + "integrity": "sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.7.0", - "@typescript-eslint/utils": "7.7.0", + "@typescript-eslint/typescript-estree": "7.7.1", + "@typescript-eslint/utils": "7.7.1", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -3175,9 +3175,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.0.tgz", - "integrity": "sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz", + "integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -3188,13 +3188,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz", - "integrity": "sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz", + "integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.7.0", - "@typescript-eslint/visitor-keys": "7.7.0", + "@typescript-eslint/types": "7.7.1", + "@typescript-eslint/visitor-keys": "7.7.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3216,17 +3216,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.0.tgz", - "integrity": "sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.1.tgz", + "integrity": "sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.15", "@types/semver": "^7.5.8", - "@typescript-eslint/scope-manager": "7.7.0", - "@typescript-eslint/types": "7.7.0", - "@typescript-eslint/typescript-estree": "7.7.0", + "@typescript-eslint/scope-manager": "7.7.1", + "@typescript-eslint/types": "7.7.1", + "@typescript-eslint/typescript-estree": "7.7.1", "semver": "^7.6.0" }, "engines": { @@ -3241,12 +3241,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz", - "integrity": "sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz", + "integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.7.0", + "@typescript-eslint/types": "7.7.1", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -11938,9 +11938,9 @@ } }, "node_modules/terser": { - "version": "5.30.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.3.tgz", - "integrity": "sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==", + "version": "5.30.4", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.4.tgz", + "integrity": "sha512-xRdd0v64a8mFK9bnsKVdoNP9GQIKUAaJPTaqEQDL4w/J8WaW4sWXXoMZ+6SimPkfT5bElreXf8m9HnmPc3E1BQ==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", diff --git a/package.json b/package.json index c3076edaff14..60f2fe46aeb0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stencil/core", - "version": "4.17.1", + "version": "4.17.2", "license": "MIT", "main": "./internal/stencil-core/index.cjs", "module": "./internal/stencil-core/index.js", @@ -122,7 +122,7 @@ "rollup": "2.56.3", "rollup-plugin-sourcemaps": "^0.6.3", "semver": "^7.3.7", - "terser": "5.30.3", + "terser": "5.30.4", "typescript": "~5.4.0", "webpack": "^5.75.0", "ws": "8.16.0" @@ -151,6 +151,6 @@ "prettier": "@ionic/prettier-config", "volta": { "node": "20.12.2", - "npm": "10.5.2" + "npm": "10.6.0" } } diff --git a/src/runtime/styles.ts b/src/runtime/styles.ts index 9adc0fc3216c..ed600db3634c 100644 --- a/src/runtime/styles.ts +++ b/src/runtime/styles.ts @@ -8,6 +8,17 @@ import { HYDRATED_STYLE_ID, NODE_TYPE, SLOT_FB_CSS } from './runtime-constants'; const rootAppliedStyles: d.RootAppliedStyleMap = /*@__PURE__*/ new WeakMap(); +/** + * Register the styles for a component by creating a stylesheet and then + * registering it under the component's scope ID in a `WeakMap` for later use. + * + * If constructable stylesheet are not supported or `allowCS` is set to + * `false` then the styles will be registered as a string instead. + * + * @param scopeId the scope ID for the component of interest + * @param cssText styles for the component of interest + * @param allowCS whether or not to use a constructable stylesheet + */ export const registerStyle = (scopeId: string, cssText: string, allowCS: boolean) => { let style = styles.get(scopeId); if (supportsConstructableStylesheets && allowCS) { @@ -23,6 +34,19 @@ export const registerStyle = (scopeId: string, cssText: string, allowCS: boolean styles.set(scopeId, style); }; +/** + * Attach the styles for a given component to the DOM + * + * If the element uses shadow or is already attached to the DOM then we can + * create a stylesheet inside of its associated document fragment, otherwise + * we'll stick the stylesheet into the document head. + * + * @param styleContainerNode the node within which a style element for the + * component of interest should be added + * @param cmpMeta runtime metadata for the component of interest + * @param mode an optional current mode + * @returns the scope ID for the component of interest + */ export const addStyle = (styleContainerNode: any, cmpMeta: d.ComponentRuntimeMeta, mode?: string) => { const scopeId = getScopeId(cmpMeta, mode); const style = styles.get(scopeId); @@ -83,6 +107,12 @@ export const addStyle = (styleContainerNode: any, cmpMeta: d.ComponentRuntimeMet return scopeId; }; +/** + * Add styles for a given component to the DOM, optionally handling 'scoped' + * encapsulation by adding an appropriate class name to the host element. + * + * @param hostRef the host reference for the component of interest + */ export const attachStyles = (hostRef: d.HostRef) => { const cmpMeta = hostRef.$cmpMeta$; const elm = hostRef.$hostElement$; @@ -112,9 +142,42 @@ export const attachStyles = (hostRef: d.HostRef) => { endAttachStyles(); }; +/** + * Get the scope ID for a given component + * + * @param cmp runtime metadata for the component of interest + * @param mode the current mode (optional) + * @returns a scope ID for the component of interest + */ export const getScopeId = (cmp: d.ComponentRuntimeMeta, mode?: string) => 'sc-' + (BUILD.mode && mode && cmp.$flags$ & CMP_FLAGS.hasMode ? cmp.$tagName$ + '-' + mode : cmp.$tagName$); +/** + * Convert a 'scoped' CSS string to one appropriate for use in the shadow DOM. + * + * Given a 'scoped' CSS string that looks like this: + * + * ``` + * /*!@div*\/div.class-name { display: flex }; + * ``` + * + * Convert it to a 'shadow' appropriate string, like so: + * + * ``` + * /*!@div*\/div.class-name { display: flex } + * ─┬─ ────────┬──────── + * │ │ + * │ ┌─────────────────┘ + * ▼ ▼ + * div{ display: flex } + * ``` + * + * Note that forward-slashes in the above are escaped so they don't end the + * comment. + * + * @param css a CSS string to convert + * @returns the converted string + */ export const convertScopedToShadow = (css: string) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{'); declare global {