-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: migrate to native esm (#1079)
- use "type": "module" - use "exports" - convert cjs scripts to esm - adjust relative imports to use .js postfix - use node16 target/moduleResolution - mark package as "sideEffects": false - avoid publishing src/test and src/tsconfig.json
- Loading branch information
Showing
272 changed files
with
858 additions
and
820 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// @ts-check | ||
|
||
const { stylablePlugin } = require('@stylable/esbuild'); | ||
import { stylablePlugin } from '@stylable/esbuild'; | ||
|
||
/** @type {import('esbuild').BuildOptions} */ | ||
module.exports = { | ||
export default { | ||
plugins: [stylablePlugin({ cssInjection: 'js' })], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
{ | ||
"name": "stylable-components", | ||
"version": "1.3.8", | ||
"type": "module", | ||
"description": "React components that use Stylable.", | ||
"main": "dist/index.js", | ||
"exports": "./dist/index.js", | ||
"scripts": { | ||
"test": "mocha \"dist/test/**/*.spec.js\"" | ||
}, | ||
|
@@ -15,12 +16,13 @@ | |
"files": [ | ||
"dist", | ||
"src", | ||
"!dist/test", | ||
"!dist/tsconfig.tsbuildinfo" | ||
"!*/test", | ||
"!*/tsconfig.{json,tsbuildinfo}" | ||
], | ||
"license": "MIT", | ||
"repository": "[email protected]:wixplosives/stylable-components.git", | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
}, | ||
"sideEffects": false | ||
} |
2 changes: 1 addition & 1 deletion
2
packages/components/src/_codux/boards/hooks/use-element-size/use-element-size.board.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/components/src/_codux/boards/scenario-renderer/scenario-renderer.board.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './area'; | ||
export * from './area.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export * from './item-renderer/item-renderer'; | ||
export * from './item-renderer-expanded/item-renderer-expandable'; | ||
export * from './items'; | ||
export * from './utils'; | ||
export * from './li-item-renderer'; | ||
export * from './stateful-item-renderer'; | ||
export * from './item-renderer/item-renderer.js'; | ||
export * from './item-renderer-expanded/item-renderer-expandable.js'; | ||
export * from './items.js'; | ||
export * from './utils.js'; | ||
export * from './li-item-renderer.js'; | ||
export * from './stateful-item-renderer.js'; |
4 changes: 2 additions & 2 deletions
4
packages/components/src/board-assets/item-renderer-expanded/item-renderer-expandable.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
packages/components/src/board-assets/item-renderer/item-renderer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/components/src/board-assets/stateful-item-renderer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
packages/components/src/board-assets/tree-items/lanes/element-item-renderer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/components/src/board-assets/tree-items/lanes/lane-context.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
packages/components/src/board-assets/tree-items/lanes/lane-item-renderer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
packages/components/src/board-assets/tree-items/lanes/marker-item-renderer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
packages/components/src/board-assets/tree-items/tree-item-renderer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from './scenario-plugin/scenario-plugin'; | ||
export * from './project-themes-plugin'; | ||
export * from './scenario-plugin/scenario-plugin.js'; | ||
export * from './project-themes-plugin.js'; |
2 changes: 1 addition & 1 deletion
2
packages/components/src/board-plugins/project-themes-plugin.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/components/src/board-plugins/scenario-plugin/actions/check-item-render-state.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { expect } from 'chai'; | ||
import { Action, expectElement } from '../scenario-plugin'; | ||
import { Action, expectElement } from '../scenario-plugin.js'; | ||
|
||
export const checkItemRenderState = (id: string): Action => | ||
expectElement(`[data-id='${id}']`, (element) => expect(element).to.exist, `Element [data-id='${id}'] is rendered`); |
4 changes: 2 additions & 2 deletions
4
packages/components/src/board-plugins/scenario-plugin/actions/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from './check-item-render-state'; | ||
export * from './select-item-by-index'; | ||
export * from './check-item-render-state.js'; | ||
export * from './select-item-by-index.js'; |
2 changes: 1 addition & 1 deletion
2
packages/components/src/board-plugins/scenario-plugin/actions/select-item-by-index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.