fix(emcn): resolve Calendar icon/component barrel collision and preserve prism side effects (#5261)

Two post-extraction regressions:

1. The barrel resolves the Calendar name-collision to the date-picker COMPONENT (symmetric with Table). Scheduled-tasks imported Calendar from the barrel but used it as an ICON, so its header rendered a date picker. Route the icon consumers (scheduled-tasks + loading) to @sim/emcn/icons, matching the 'icons come from the /icons subpath' convention.

2. The package's new sideEffects: ['**/*.css'] marked code/prism.ts as side-effect-free, but it registers prismjs languages on the global Prism (a real JS side effect). The bundler could drop/reorder its core init, causing 'Prism is not defined'. Add code/prism.ts to sideEffects so the bundler preserves it.
This commit is contained in:
Waleed
2026-06-29 09:29:12 -07:00
committed by GitHub
parent 6dea1dc5ed
commit f5116f45c3
3 changed files with 4 additions and 3 deletions
@@ -1,6 +1,6 @@
'use client'
import { Calendar, Plus } from '@sim/emcn'
import { Calendar, Plus } from '@sim/emcn/icons'
import {
type ChromeActionSpec,
ResourceChromeFallback,
@@ -1,7 +1,7 @@
'use client'
import { useCallback, useMemo, useState } from 'react'
import { Calendar, Plus } from '@sim/emcn'
import { Calendar, Plus } from '@sim/emcn/icons'
import { useParams } from 'next/navigation'
import type { ResourceAction } from '@/app/workspace/[workspaceId]/components'
import { Resource } from '@/app/workspace/[workspaceId]/components'
+2 -1
View File
@@ -3,7 +3,8 @@
"version": "0.1.0",
"private": true,
"sideEffects": [
"**/*.css"
"**/*.css",
"**/components/code/prism.ts"
],
"type": "module",
"license": "Apache-2.0",