{"id":22648051,"url":"https://github.com/rwaskiewicz/transform-import-paths","last_synced_at":"2025-03-29T06:48:41.954Z","repository":{"id":266175969,"uuid":"656880662","full_name":"rwaskiewicz/transform-import-paths","owner":"rwaskiewicz","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-22T20:47:19.000Z","size":208,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T23:03:40.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rwaskiewicz.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-21T20:52:57.000Z","updated_at":"2023-06-21T20:53:10.000Z","dependencies_parsed_at":"2024-12-03T00:38:32.473Z","dependency_job_id":"39e4c9f9-337a-4cb2-b383-c75870fd6970","html_url":"https://github.com/rwaskiewicz/transform-import-paths","commit_stats":null,"previous_names":["rwaskiewicz/transform-import-paths"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaskiewicz%2Ftransform-import-paths","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaskiewicz%2Ftransform-import-paths/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaskiewicz%2Ftransform-import-paths/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaskiewicz%2Ftransform-import-paths/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwaskiewicz","download_url":"https://codeload.github.com/rwaskiewicz/transform-import-paths/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246150409,"owners_count":20731419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-09T07:40:07.302Z","updated_at":"2025-03-29T06:48:41.922Z","avatar_url":"https://github.com/rwaskiewicz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# transform-import-paths\n\nThis repo contains a reproduction case for issues found when using `dist-hydrate-script` || the prerender task, and `transformAliasedImportPaths`.\n\n# testing\n\nthis reproduction expects that the location of a built stencil compiler to exist at `~/workspaces/stencil/bin/stencil`.\nif your local stencil exists at `~/dev/username/projects/stencil`, update occurences of `~/workspaces` with the parent directory of your stencil repo.\n\nthis project contains `build` and `build-local` scripts.\nthe former will run a build against your local stencil project, the latter against the version of stencil installed by npm.\nwhen running without https://github.com/ionic-team/stencil/pull/4501's PR applied, we expect both to fail.\nonce https://github.com/ionic-team/stencil/pull/4501 is built, `build` ought to work, while `build-local` continues to fail\n\nlikewise, without applying https://github.com/ionic-team/stencil/pull/4501, `npm run prerender` will fail.\nupon applying it, `npm run prerender will pass`\n\n## differences from the stencil component starter\n\n```diff\ndiff --color -r ./package.json /Users/ryan/workspaces/sandbox/stencil-issues/transform-import-paths/package.json\n2c2\n\u003c   \"name\": \"testprerender\",\n---\n\u003e   \"name\": \"create-elm\",\n12c12\n\u003c   \"unpkg\": \"dist/testprerender/testprerender.esm.js\",\n---\n\u003e   \"unpkg\": \"dist/create-elm/create-elm.esm.js\",\n22,29c22,29\n\u003c     \"build\": \"stencil build --docs\",\n\u003c     \"start\": \"stencil build --dev --watch --serve\",\n\u003c     \"test\": \"stencil test --spec --e2e\",\n\u003c     \"test.watch\": \"stencil test --spec --e2e --watchAll\",\n\u003c     \"generate\": \"stencil generate\"\n\u003c   },\n\u003c   \"dependencies\": {\n\u003c     \"@stencil/core\": \"^3.0.0\"\n---\n\u003e     \"build\": \"~/workspaces/stencil/bin/stencil build --config stencil.config.ts --prerender --debug\",\n\u003e     \"build-local\": \"stencil build --config stencil.config.ts --prerender --debug\",\n\u003e     \"prerender\": \"~/workspaces/stencil/bin/stencil prerender --config stencil.config.ts  ./hydrate/index.js\",\n\u003e     \"start\": \"~/workspaces/stencil/bin/stencil build --dev --watch --serve\",\n\u003e     \"start-local\": \"stencil build --dev --watch --serve\",\n\u003e     \"test\": \"~/workspaces/stencil/bin/stencil test --spec --e2e\",\n\u003e     \"test.watch\": \"~/workspaces/stencil/bin/stencil test --spec --e2e --watchAll\",\n\u003e     \"generate\": \"~/workspaces/stencil/bin/stencil generate\"\n36c36\n\u003c     \"puppeteer\": \"^19.5.2\"\n---\n\u003e     \"puppeteer\": \"^20.7.1\"\n38c38,45\n\u003c   \"license\": \"MIT\"\n---\n\u003e   \"license\": \"MIT\",\n\u003e   \"volta\": {\n\u003e     \"node\": \"20.3.1\",\n\u003e     \"npm\": \"9.7.1\"\n\u003e   },\n\u003e   \"dependencies\": {\n\u003e     \"@stencil/core\": \"^3.4.0\"\n\u003e   }\nOnly in /Users/ryan/workspaces/sandbox/stencil-issues/transform-import-paths: prerender.config.js\nOnly in /Users/ryan/workspaces/sandbox/stencil-issues/transform-import-paths/src/components: app-root\nOnly in ./src/components: my-component\ndiff --color -r ./src/components.d.ts /Users/ryan/workspaces/sandbox/stencil-issues/transform-import-paths/src/components.d.ts\n9,21c9\n\u003c     interface MyComponent {\n\u003c         /**\n\u003c           * The first name\n\u003c          */\n\u003c         \"first\": string;\n\u003c         /**\n\u003c           * The last name\n\u003c          */\n\u003c         \"last\": string;\n\u003c         /**\n\u003c           * The middle name\n\u003c          */\n\u003c         \"middle\": string;\n---\n\u003e     interface AppRoot {\n25c13\n\u003c     interface HTMLMyComponentElement extends Components.MyComponent, HTMLStencilElement {\n---\n\u003e     interface HTMLAppRootElement extends Components.AppRoot, HTMLStencilElement {\n27,29c15,17\n\u003c     var HTMLMyComponentElement: {\n\u003c         prototype: HTMLMyComponentElement;\n\u003c         new (): HTMLMyComponentElement;\n---\n\u003e     var HTMLAppRootElement: {\n\u003e         prototype: HTMLAppRootElement;\n\u003e         new (): HTMLAppRootElement;\n32c20\n\u003c         \"my-component\": HTMLMyComponentElement;\n---\n\u003e         \"app-root\": HTMLAppRootElement;\n36,48c24\n\u003c     interface MyComponent {\n\u003c         /**\n\u003c           * The first name\n\u003c          */\n\u003c         \"first\"?: string;\n\u003c         /**\n\u003c           * The last name\n\u003c          */\n\u003c         \"last\"?: string;\n\u003c         /**\n\u003c           * The middle name\n\u003c          */\n\u003c         \"middle\"?: string;\n---\n\u003e     interface AppRoot {\n51c27\n\u003c         \"my-component\": MyComponent;\n---\n\u003e         \"app-root\": AppRoot;\n58c34\n\u003c             \"my-component\": LocalJSX.MyComponent \u0026 JSXBase.HTMLAttributes\u003cHTMLMyComponentElement\u003e;\n---\n\u003e             \"app-root\": LocalJSX.AppRoot \u0026 JSXBase.HTMLAttributes\u003cHTMLAppRootElement\u003e;\ndiff --color -r ./src/index.html /Users/ryan/workspaces/sandbox/stencil-issues/transform-import-paths/src/index.html\n3,13c3,12\n\u003c   \u003chead\u003e\n\u003c     \u003cmeta charset=\"utf-8\" /\u003e\n\u003c     \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0\" /\u003e\n\u003c     \u003ctitle\u003eStencil Component Starter\u003c/title\u003e\n\u003c\n\u003c     \u003cscript type=\"module\" src=\"/build/testprerender.esm.js\"\u003e\u003c/script\u003e\n\u003c     \u003cscript nomodule src=\"/build/testprerender.js\"\u003e\u003c/script\u003e\n\u003c   \u003c/head\u003e\n\u003c   \u003cbody\u003e\n\u003c     \u003cmy-component first=\"Stencil\" last=\"'Don't call me a framework' JS\"\u003e\u003c/my-component\u003e\n\u003c   \u003c/body\u003e\n---\n\u003e \u003chead\u003e\n\u003e   \u003cmeta charset=\"utf-8\"\u003e\n\u003e   \u003ctitle\u003eTest Prerender App\u003c/title\u003e\n\u003e   \u003clink href=\"/prerender/build/testprerender.css\" rel=\"stylesheet\"\u003e\n\u003e   \u003cscript src=\"/prerender/build/testprerender.esm.js\" type=\"module\"\u003e\u003c/script\u003e\n\u003e   \u003cscript src=\"/prerender/build/testprerender.js\" nomodule\u003e\u003c/script\u003e\n\u003e \u003c/head\u003e\n\u003e \u003cbody\u003e\n\u003e   \u003capp-root\u003e\u003c/app-root\u003e\n\u003e \u003c/body\u003e\nOnly in ./src: index.ts\nOnly in ./src: utils\ndiff --color -r ./stencil.config.ts /Users/ryan/workspaces/sandbox/stencil-issues/transform-import-paths/stencil.config.ts\n4c4,7\n\u003c   namespace: 'testprerender',\n---\n\u003e   namespace: 'TestPrerender',\n\u003e   tsconfig: 'tsconfig.json',\n\u003e   transformAliasedImportPaths: true,\n\u003e   maxConcurrentWorkers: 0,\n7,14c10\n\u003c       type: 'dist',\n\u003c       esmLoaderPath: '../loader',\n\u003c     },\n\u003c     {\n\u003c       type: 'dist-custom-elements',\n\u003c     },\n\u003c     {\n\u003c       type: 'docs-readme',\n---\n\u003e       type: 'dist-hydrate-script',\n17a14\n\u003e       baseUrl: 'https://karma.stenciljs.com/prerender',\n18a16,17\n\u003e       empty: false,\n\u003e       prerenderConfig: 'prerender.config.js',\ndiff --color -r ./tsconfig.json /Users/ryan/workspaces/sandbox/stencil-issues/transform-import-paths/tsconfig.json\n2a3,4\n\u003e     // \"strict\": true,\n\u003e     // \"alwaysStrict\": true,\n5a8\n\u003e     \"resolveJsonModule\": true,\n6a10,12\n\u003e     \"forceConsistentCasingInFileNames\": true,\n\u003e     \"jsx\": \"react\",\n\u003e     \"jsxFactory\": \"h\",\n11d16\n\u003c     \"moduleResolution\": \"node\",\n13c18,20\n\u003c     \"target\": \"es2017\",\n---\n\u003e     \"moduleResolution\": \"node\",\n\u003e     \"noImplicitAny\": true,\n\u003e     \"noImplicitReturns\": true,\n16,17c23,33\n\u003c     \"jsx\": \"react\",\n\u003c     \"jsxFactory\": \"h\"\n---\n\u003e     \"pretty\": true,\n\u003e     \"target\": \"es2017\",\n\u003e     \"useUnknownInCatchVariables\": true,\n\u003e     \"baseUrl\": \".\",\n\u003e     \"paths\": {\n\u003e       \"@stencil/core\": [\"../../../stencil/internal\"],\n\u003e       \"@stencil/core/internal\": [\"../../../stencil/internal\"],\n\u003e //      \"jest\": [\"./node_modules/jest\"]\n\u003e //      \"@stencil/core\": [\"@stencil/core\"],\n\u003e //      \"@stencil/core/internal\": [\"@stencil/core\"]\n\u003e     }\n20,23c36\n\u003c     \"src\"\n\u003c   ],\n\u003c   \"exclude\": [\n\u003c     \"node_modules\"\n---\n\u003e     \"src\",\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwaskiewicz%2Ftransform-import-paths","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwaskiewicz%2Ftransform-import-paths","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwaskiewicz%2Ftransform-import-paths/lists"}