Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update fast element export paths with extensions #6815

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "BREAKING: update fast-element export paths to include extensions",
"packageName": "@microsoft/fast-element",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "update fast-element export paths to include extensions",
"packageName": "@microsoft/fast-foundation",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "fix test to use fast-element package export with extension",
"packageName": "@microsoft/fast-react-wrapper",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "update fast-element export paths to include extensions",
"packageName": "@microsoft/fast-router",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Breaking: update fast-ssr export paths to include extensions",
"packageName": "@microsoft/fast-ssr",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
2 changes: 1 addition & 1 deletion examples/todo-app/src/todo-app.template.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html, repeat } from "@microsoft/fast-element";
import { twoWay } from "@microsoft/fast-element/binding/two-way";
import { twoWay } from "@microsoft/fast-element/binding/two-way.js";
import type { TodoApp } from "./todo-app.js";
import type { Todo } from "./todo-list.js";
import "./todo-form.js";
Expand Down
6 changes: 2 additions & 4 deletions examples/todo-app/src/todo-form.template.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { html } from "@microsoft/fast-element";
import { twoWay } from "@microsoft/fast-element/binding/two-way";
import { twoWay } from "@microsoft/fast-element/binding/two-way.js";
import type { TodoForm } from "./todo-form.js";

export const template = html<TodoForm>`
<form @submit=${x => x.submitTodo()}>
<input type="text" :value=${twoWay(x => x.description, "input")} />
<button type="submit" ?disabled=${x => !x.description}>
Add Todo
</button>
<button type="submit" ?disabled=${x => !x.description}>Add Todo</button>
</form>
`;
4 changes: 2 additions & 2 deletions examples/todo-app/src/todo-list.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Observable, observable, volatile } from "@microsoft/fast-element";
import { Context } from "@microsoft/fast-element/context";
import { reactive } from "@microsoft/fast-element/state";
import { Context } from "@microsoft/fast-element/context.js";
import { reactive } from "@microsoft/fast-element/state.js";

export type Todo = { description: string; done: boolean };
export type TodoListFilter = "all" | "active" | "completed";
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/fast-react-wrapper/src/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { attr, customElement, DOM, FASTElement, html, nullableNumberConverter, observable, Updates } from '@microsoft/fast-element';
import React from "react";
import ReactDOM from "react-dom";
import { uniqueElementName } from '@microsoft/fast-element/testing';
import { uniqueElementName } from '@microsoft/fast-element/testing.js';
import { expect } from "chai";
import { reactWrapper } from './index.js';

Expand Down
28 changes: 14 additions & 14 deletions packages/web-components/fast-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,59 +26,59 @@
"development": "./dist/esm/index.debug.js",
"default": "./dist/esm/index.js"
},
"./debug": {
"./debug.js": {
"types": "./dist/dts/debug.d.ts",
"default": "./dist/esm/debug.js"
},
"./binding/two-way": {
"./binding/two-way.js": {
"types": "./dist/dts/binding/two-way.d.ts",
"default": "./dist/esm/binding/two-way.js"
},
"./binding/signal": {
"./binding/signal.js": {
"types": "./dist/dts/binding/signal.d.ts",
"default": "./dist/esm/binding/signal.js"
},
"./render": {
"./render.js": {
"types": "./dist/dts/templating/render.d.ts",
"default": "./dist/esm/templating/render.js"
},
"./utilities": {
"./utilities.js": {
"types": "./dist/dts/utilities.d.ts",
"default": "./dist/esm/utilities.js"
},
"./state": {
"./state.js": {
"types": "./dist/dts/state/exports.d.ts",
"default": "./dist/esm/state/exports.js"
},
"./context": {
"./context.js": {
"types": "./dist/dts/context.d.ts",
"default": "./dist/esm/context.js"
},
"./metadata": {
"./metadata.js": {
"types": "./dist/dts/metadata.d.ts",
"default": "./dist/esm/metadata.js"
},
"./testing": {
"./testing.js": {
"types": "./dist/dts/testing/exports.d.ts",
"default": "./dist/esm/testing/exports.js"
},
"./di": {
"./di.js": {
"types": "./dist/dts/di/di.d.ts",
"default": "./dist/esm/di/di.js"
},
"./element-hydration": {
"./element-hydration.js": {
"types": "./dist/dts/components/hydration.d.ts",
"default": "./dist/esm/components/hydration.js"
},
"./install-element-hydration": {
"./install-element-hydration.js": {
"types": "./dist/dts/components/install-hydration.d.ts",
"default": "./dist/esm/components/install-hydration.js"
},
"./pending-task": {
"./pending-task.js": {
"types": "./dist/dts/pending-task.d.ts",
"default": "./dist/esm/pending-task.js"
},
"./dom-policy": {
"./dom-policy.js": {
"types": "./dist/dts/dom-policy.d.ts",
"default": "./dist/esm/dom-policy.js"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
RepeatDirective,
ViewTemplate,
} from "@microsoft/fast-element";
import { ViewBehaviorOrchestrator } from "@microsoft/fast-element/utilities";
import { ViewBehaviorOrchestrator } from "@microsoft/fast-element/utilities.js";
import {
eventClick,
eventFocusOut,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
RepeatDirective,
Updates,
} from "@microsoft/fast-element";
import { ViewBehaviorOrchestrator } from "@microsoft/fast-element/utilities";
import { ViewBehaviorOrchestrator } from "@microsoft/fast-element/utilities.js";
import {
eventFocus,
eventFocusOut,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "./test/fast-element-dom-shim.js";
import type { Subscriber } from "@microsoft/fast-element";
import { Observable } from "@microsoft/fast-element";
import { reactive } from "@microsoft/fast-element/state";
import { reactive } from "@microsoft/fast-element/state.js";
import { test } from "@playwright/test";
import { expect } from "expect";
import jest from "jest-mock";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { css, customElement, FASTElement, HostController, html, Observable, Updates } from "@microsoft/fast-element";
import chai, { expect } from "chai";
import spies from "chai-spies";
import { uniqueElementName } from "@microsoft/fast-element/testing";
import { uniqueElementName } from "@microsoft/fast-element/testing.js";
import {DesignTokenEventResolutionStrategy} from "./event-strategy.js"

const elementName = uniqueElementName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
Observable,
SubscriberSet,
} from "@microsoft/fast-element";
import { composedContains, composedParent } from "@microsoft/fast-element/utilities";
import { composedContains, composedParent } from "@microsoft/fast-element/utilities.js";
import type {
DesignTokenChangeRecord as CoreDesignTokenChangeRecord,
DerivedDesignTokenValue,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css, FASTElement, html, Observable, Updates } from "@microsoft/fast-element";
import { uniqueElementName } from "@microsoft/fast-element/testing";
import { uniqueElementName } from "@microsoft/fast-element/testing.js";
import type { Meta, Story } from "../../__test__/helpers.js";
import { CSSDesignToken, DesignToken as FASTDesignToken } from "../fast-design-token.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html, ref, customElement, FASTElement, Updates } from "@microsoft/fast-element";
import { fixture, uniqueElementName } from "@microsoft/fast-element/testing";
import { fixture, uniqueElementName } from "@microsoft/fast-element/testing.js";
import { reflectAttributes } from "./reflect-attributes.js";
import { expect } from "chai";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DOM } from "@microsoft/fast-element";
import "@microsoft/fast-element/debug";
import { DOMPolicy } from "@microsoft/fast-element/dom-policy";
import "@microsoft/fast-element/debug.js";
import { DOMPolicy } from "@microsoft/fast-element/dom-policy.js";

export * from "@microsoft/fast-element";
export * from "./index.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DOM } from "@microsoft/fast-element";
import { DOMPolicy } from "@microsoft/fast-element/dom-policy";
import { DOMPolicy } from "@microsoft/fast-element/dom-policy.js";

export * from "@microsoft/fast-element";
export * from "./index.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
pickerMenuTemplate,
pickerTemplate,
} from "./index.js";
import { fixture, uniqueElementName } from "@microsoft/fast-element/testing";
import { fixture, uniqueElementName } from "@microsoft/fast-element/testing.js";
import { Updates } from "@microsoft/fast-element";
import {
keyArrowLeft,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Updates,
ViewTemplate,
} from "@microsoft/fast-element";
import { ViewBehaviorOrchestrator } from "@microsoft/fast-element/utilities";
import { ViewBehaviorOrchestrator } from "@microsoft/fast-element/utilities.js";
import {
keyArrowDown,
keyArrowLeft,
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/fast-router/src/router.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FASTElement } from "@microsoft/fast-element";
import { composedParent } from "@microsoft/fast-element/utilities";
import { composedParent } from "@microsoft/fast-element/utilities.js";
import { RenderCommand } from "./commands.js";
import { RouterConfiguration } from "./configuration.js";
import { NavigationContributor } from "./contributors.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/fast-ssr/docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AsyncLocalStorage } from 'async_hooks';
import { Binding } from '@microsoft/fast-element';
import { ComposableStyles } from '@microsoft/fast-element';
import { Constructable } from '@microsoft/fast-element';
import { DOMContainer } from '@microsoft/fast-element/di';
import { DOMContainer } from '@microsoft/fast-element/di.js';
import { ExecutionContext } from '@microsoft/fast-element';
import { FASTElement } from '@microsoft/fast-element';
import { FASTElementDefinition } from '@microsoft/fast-element';
Expand Down
4 changes: 2 additions & 2 deletions packages/web-components/fast-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
"types": "./dist/dts/exports.d.ts",
"default": "./dist/esm/exports.js"
},
"./install-dom-shim": "./dist/esm/install-dom-shim.js",
"./install-dom-shim.js": "./dist/esm/install-dom-shim.js",
"./dom-shim": {
"types": "./dist/dts/dom-shim.d.ts",
"default": "./dist/esm/dom-shim.js"
},
"./request-storage": {
"./request-storage.js": {
"types": "./dist/dts/request-storage.d.ts",
"default": "./dist/esm/request-storage.js"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/fast-ssr/src/dom-shim.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as Foundation from "@microsoft/fast-foundation";
import { expect, test } from "@playwright/test";
import { createWindow } from "./dom-shim.js";
import fastSSR from "./exports.js";
import { uniqueElementName } from "@microsoft/fast-element/testing";
import { uniqueElementName } from "@microsoft/fast-element/testing.js";

test.describe("createWindow", () => {
test("should create a window with a document property that is an instance of the window's Document constructor", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { expect, test } from '@playwright/test';
import { SyncFASTElementRenderer } from "./fast-element-renderer.js";
import fastSSR from "../exports.js";
import { consolidate, consolidateAsync } from "../test-utilities/consolidate.js";
import { uniqueElementName } from "@microsoft/fast-element/testing";
import { PendingTaskEvent } from "@microsoft/fast-element/pending-task";
import { uniqueElementName } from "@microsoft/fast-element/testing.js";
import { PendingTaskEvent } from "@microsoft/fast-element/pending-task.js";

@customElement({
name: "bare-element",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DOM, DOMAspect, ExecutionContext, FASTElement } from "@microsoft/fast-element";
import { PendingTaskEvent } from "@microsoft/fast-element/pending-task";
import { PendingTaskEvent } from "@microsoft/fast-element/pending-task.js";
import { escapeHtml } from "../escape-html.js";
import { RenderInfo } from "../render-info.js";
import { StyleRenderer } from "../styles/style-renderer.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/fast-ssr/src/exports.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { html, RefDirective, ref } from "@microsoft/fast-element";
import fastSSR from "./exports.js";
import { ViewBehaviorFactoryRenderer } from "./template-renderer/directives.js";
import { test, expect } from "@playwright/test";
import { uniqueElementName } from "@microsoft/fast-element/testing";
import { uniqueElementName } from "@microsoft/fast-element/testing.js";
import { FASTElement, HTMLDirective, StatelessAttachedAttributeDirective, ViewBehaviorFactory, ViewController } from "@microsoft/fast-element";
import { consolidate } from "./test-utilities/consolidate.js";

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/fast-ssr/src/request-storage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AsyncLocalStorage } from "async_hooks";
import { DI, DOMContainer } from "@microsoft/fast-element/di";
import { DI, DOMContainer } from "@microsoft/fast-element/di.js";
import { createWindow } from "./dom-shim.js";

let asyncLocalStorage = new AsyncLocalStorage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ViewBehaviorFactory,
ViewTemplate,
} from "@microsoft/fast-element";
import { RenderDirective } from "@microsoft/fast-element/render";
import { RenderDirective } from "@microsoft/fast-element/render.js";
import { RenderInfo } from "../render-info.js";
import { DefaultTemplateRenderer } from "./template-renderer.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { expect, test } from "@playwright/test";
import fastSSR from "../exports.js";
import { consolidate } from "../test-utilities/consolidate.js";
import { DefaultTemplateRenderer } from "./template-renderer.js";
import { render } from "@microsoft/fast-element/render";
import { render } from "@microsoft/fast-element/render.js";
import { DefaultElementRenderer } from "../element-renderer/element-renderer.js";
import { RenderInfo } from "../render-info.js";
import { uniqueElementName } from "@microsoft/fast-element/testing";
import { uniqueElementName } from "@microsoft/fast-element/testing.js";

@customElement("hello-world")
class HelloWorld extends FASTElement {}
Expand Down
Loading