diff --git a/src/compiler/config/outputs/index.ts b/src/compiler/config/outputs/index.ts index 05f3950e32a..dfeb82e47e2 100644 --- a/src/compiler/config/outputs/index.ts +++ b/src/compiler/config/outputs/index.ts @@ -1,10 +1,6 @@ import type * as d from '../../../declarations'; -import { buildError, buildWarn } from '@utils'; -import { - DIST_CUSTOM_ELEMENTS_BUNDLE, - isValidConfigOutputTarget, - VALID_CONFIG_OUTPUT_TARGETS, -} from '../../output-targets/output-utils'; +import { buildError } from '@utils'; +import { isValidConfigOutputTarget, VALID_CONFIG_OUTPUT_TARGETS } from '../../output-targets/output-utils'; import { validateCollection } from './validate-collection'; import { validateCustomElement } from './validate-custom-element'; import { validateCustomOutput } from './validate-custom-output'; @@ -25,10 +21,6 @@ export const validateOutputTargets = (config: d.ValidatedConfig, diagnostics: d. err.messageText = `Invalid outputTarget type "${ outputTarget.type }". Valid outputTarget types include: ${VALID_CONFIG_OUTPUT_TARGETS.map((t) => `"${t}"`).join(', ')}`; - } else if (outputTarget.type === DIST_CUSTOM_ELEMENTS_BUNDLE) { - // TODO(STENCIL-260): Remove this check when the 'dist-custom-elements-bundle' is removed - const warning = buildWarn(diagnostics); - warning.messageText = `dist-custom-elements-bundle is deprecated and will be removed in a future major version release. Use "dist-custom-elements" instead. If "dist-custom-elements" does not meet your needs, please add a comment to https://github.com/ionic-team/stencil/issues/3136.`; } }); diff --git a/src/compiler/config/outputs/validate-custom-element-bundle.ts b/src/compiler/config/outputs/validate-custom-element-bundle.ts index 5d2ec35f55d..a95e76367bd 100644 --- a/src/compiler/config/outputs/validate-custom-element-bundle.ts +++ b/src/compiler/config/outputs/validate-custom-element-bundle.ts @@ -1,3 +1,4 @@ +// TODO(STENCIL-561): fully delete dist-custom-elements-bundle code import type * as d from '../../../declarations'; import { COPY, isOutputTargetDistCustomElementsBundle } from '../../output-targets/output-utils'; import { getAbsolutePath } from '../config-utils'; diff --git a/src/compiler/config/test/validate-config.spec.ts b/src/compiler/config/test/validate-config.spec.ts index a189aa30293..93671c2f433 100644 --- a/src/compiler/config/test/validate-config.spec.ts +++ b/src/compiler/config/test/validate-config.spec.ts @@ -344,19 +344,6 @@ describe('validation', () => { expect(validated.diagnostics).toHaveLength(1); }); - it('should warn when dist-custom-elements-bundle is found', () => { - userConfig.outputTargets = [ - { - type: 'dist-custom-elements-bundle', - }, - ]; - const validated = validateConfig(userConfig, bootstrapConfig); - expect(validated.diagnostics).toHaveLength(1); - expect(validated.diagnostics[0].messageText).toBe( - 'dist-custom-elements-bundle is deprecated and will be removed in a future major version release. Use "dist-custom-elements" instead. If "dist-custom-elements" does not meet your needs, please add a comment to https://github.com/ionic-team/stencil/issues/3136.' - ); - }); - it('should default outputTargets with www', () => { const { config } = validateConfig(userConfig, bootstrapConfig); expect(config.outputTargets.some((o) => o.type === 'www')).toBe(true); diff --git a/src/compiler/output-targets/dist-custom-elements-bundle/custom-elements-build-conditionals.ts b/src/compiler/output-targets/dist-custom-elements-bundle/custom-elements-build-conditionals.ts index 8353564d5c5..a84711dfa76 100644 --- a/src/compiler/output-targets/dist-custom-elements-bundle/custom-elements-build-conditionals.ts +++ b/src/compiler/output-targets/dist-custom-elements-bundle/custom-elements-build-conditionals.ts @@ -1,3 +1,4 @@ +// TODO(STENCIL-561): move this into ../dist-custom-elements and rename things accordingly import type * as d from '../../../declarations'; import { getBuildFeatures, updateBuildConditionals } from '../../app-core/app-data'; diff --git a/src/compiler/output-targets/dist-custom-elements-bundle/custom-elements-bundle-types.ts b/src/compiler/output-targets/dist-custom-elements-bundle/custom-elements-bundle-types.ts index 10450fea9d4..fdb9213bf15 100644 --- a/src/compiler/output-targets/dist-custom-elements-bundle/custom-elements-bundle-types.ts +++ b/src/compiler/output-targets/dist-custom-elements-bundle/custom-elements-bundle-types.ts @@ -1,3 +1,4 @@ +// TODO(STENCIL-561): fully delete dist-custom-elements-bundle code import type * as d from '../../../declarations'; import { isOutputTargetDistCustomElementsBundle } from '../output-utils'; import { dirname, join, relative } from 'path'; diff --git a/src/compiler/output-targets/dist-custom-elements-bundle/index.ts b/src/compiler/output-targets/dist-custom-elements-bundle/index.ts index 948af2b94bb..c9d5a8def4d 100644 --- a/src/compiler/output-targets/dist-custom-elements-bundle/index.ts +++ b/src/compiler/output-targets/dist-custom-elements-bundle/index.ts @@ -1,3 +1,4 @@ +// TODO(STENCIL-561): fully delete dist-custom-elements-bundle code import type * as d from '../../../declarations'; import type { BundleOptions } from '../../bundle/bundle-interface'; import { bundleOutput } from '../../bundle/bundle-output'; diff --git a/src/compiler/output-targets/output-utils.ts b/src/compiler/output-targets/output-utils.ts index fe632b4f0ad..25151977557 100644 --- a/src/compiler/output-targets/output-utils.ts +++ b/src/compiler/output-targets/output-utils.ts @@ -27,6 +27,7 @@ export const isOutputTargetDistCollection = (o: d.OutputTarget): o is d.OutputTa export const isOutputTargetDistCustomElements = (o: d.OutputTarget): o is d.OutputTargetDistCustomElements => o.type === DIST_CUSTOM_ELEMENTS; +// TODO(STENCIL-561): fully delete dist-custom-elements-bundle code export const isOutputTargetDistCustomElementsBundle = ( o: d.OutputTarget ): o is d.OutputTargetDistCustomElementsBundle => o.type === DIST_CUSTOM_ELEMENTS_BUNDLE; @@ -72,6 +73,7 @@ export const CUSTOM = 'custom'; export const DIST = 'dist'; export const DIST_COLLECTION = 'dist-collection'; export const DIST_CUSTOM_ELEMENTS = 'dist-custom-elements'; +// TODO(STENCIL-561): fully delete dist-custom-elements-bundle code export const DIST_CUSTOM_ELEMENTS_BUNDLE = 'dist-custom-elements-bundle'; export const DIST_TYPES = 'dist-types'; @@ -100,7 +102,6 @@ export const VALID_CONFIG_OUTPUT_TARGETS = [ DIST, DIST_COLLECTION, DIST_CUSTOM_ELEMENTS, - DIST_CUSTOM_ELEMENTS_BUNDLE, DIST_LAZY, DIST_HYDRATE_SCRIPT, diff --git a/src/compiler/output-targets/test/output-targets-dist-custom-elements.spec.ts b/src/compiler/output-targets/test/output-targets-dist-custom-elements.spec.ts index 0f4f8353b19..0c5bd15ce67 100644 --- a/src/compiler/output-targets/test/output-targets-dist-custom-elements.spec.ts +++ b/src/compiler/output-targets/test/output-targets-dist-custom-elements.spec.ts @@ -18,6 +18,7 @@ import * as outputCustomElementsMod from '../dist-custom-elements'; import { OutputTargetDistCustomElements } from '../../../declarations'; import { stubComponentCompilerMeta } from '../../types/tests/ComponentCompilerMeta.stub'; import { STENCIL_APP_GLOBALS_ID, STENCIL_INTERNAL_CLIENT_ID, USER_INDEX_ENTRY_ID } from '../../bundle/entry-alias-ids'; +// TODO(STENCIL-561): fully delete dist-custom-elements-bundle code import { DIST_CUSTOM_ELEMENTS, DIST_CUSTOM_ELEMENTS_BUNDLE } from '../output-utils'; const setup = () => { diff --git a/src/compiler/types/tests/validate-package-json.spec.ts b/src/compiler/types/tests/validate-package-json.spec.ts index 703a5be3b5e..454469e197c 100644 --- a/src/compiler/types/tests/validate-package-json.spec.ts +++ b/src/compiler/types/tests/validate-package-json.spec.ts @@ -2,6 +2,7 @@ import type * as d from '@stencil/core/declarations'; import { mockBuildCtx, mockCompilerCtx, mockValidatedConfig } from '@stencil/core/testing'; import * as v from '../validate-build-package-json'; import path from 'path'; +// TODO(STENCIL-561): fully delete dist-custom-elements-bundle code import { DIST_COLLECTION, DIST_CUSTOM_ELEMENTS, DIST_CUSTOM_ELEMENTS_BUNDLE } from '../../output-targets/output-utils'; import { normalizePath } from '../../../utils/normalize-path'; @@ -92,6 +93,7 @@ describe('validate-package-json', () => { expect(buildCtx.diagnostics).toHaveLength(0); }); + // TODO(STENCIL-561): fully delete dist-custom-elements-bundle code it('validate custom elements bundle module', async () => { config.outputTargets = [ { diff --git a/test/end-to-end/stencil.config.ts b/test/end-to-end/stencil.config.ts index 69ea184a6c2..4f0e05fe8fa 100644 --- a/test/end-to-end/stencil.config.ts +++ b/test/end-to-end/stencil.config.ts @@ -33,9 +33,6 @@ export const config: Config = { { type: 'dist', }, - { - type: 'dist-custom-elements-bundle', - }, { type: 'dist-hydrate-script', }, diff --git a/test/end-to-end/test-end-to-end-dist.js b/test/end-to-end/test-end-to-end-dist.js index 92cbddd9d95..d6deb629cf1 100644 --- a/test/end-to-end/test-end-to-end-dist.js +++ b/test/end-to-end/test-end-to-end-dist.js @@ -9,11 +9,6 @@ fs.accessSync(path.join(distDir, 'loader')); fs.accessSync(path.join(distDir, 'index.cjs.js')); fs.accessSync(path.join(distDir, 'index.js')); -const customElementsDir = path.join(distDir, 'custom-elements'); -fs.accessSync(path.join(customElementsDir, 'index.d.ts')); -fs.accessSync(path.join(customElementsDir, 'index.js')); -fs.accessSync(path.join(customElementsDir, 'index.js.map')); - const collectionDir = path.join(distDir, 'collection'); fs.accessSync(path.join(collectionDir, 'car-list', 'car-data.js')); fs.accessSync(path.join(collectionDir, 'car-list', 'car-data.js.map')); diff --git a/test/hello-world/stencil.config.ts b/test/hello-world/stencil.config.ts index 2c46c104fcd..d74079fc234 100644 --- a/test/hello-world/stencil.config.ts +++ b/test/hello-world/stencil.config.ts @@ -4,7 +4,6 @@ export const config: Config = { namespace: 'HelloWorld', outputTargets: [ { type: 'dist' }, - { type: 'dist-custom-elements-bundle' }, { type: 'dist-hydrate-script' }, { type: 'www',