diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a780ab2..f3bb8e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: env: SLACK_CHANNEL: deployments SLACK_COLOR: "#17BB5E" - SLACK_TITLE: "Built: react-uploader :rocket:" + SLACK_TITLE: "Built: @bytescale/upload-widget-react :rocket:" SLACK_FOOTER: "This package was successfully built." MSG_MINIMAL: true SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} @@ -62,7 +62,7 @@ jobs: env: SLACK_CHANNEL: deployments SLACK_COLOR: "#BB1717" - SLACK_TITLE: "Failed: react-uploader :boom:" + SLACK_TITLE: "Failed: @bytescale/upload-widget-react :boom:" SLACK_FOOTER: "No packages published." MSG_MINIMAL: true SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} diff --git a/BUILD.md b/BUILD.md index c114093..b405e1f 100644 --- a/BUILD.md +++ b/BUILD.md @@ -1,6 +1,6 @@ # Building From Source -This repository contains a hot-reloading sandbox for developing the `react-uploader` NPM package. +This repository contains a hot-reloading sandbox for developing the `@bytescale/upload-widget-react` NPM package. ## Prerequisites @@ -16,8 +16,8 @@ This repository contains a hot-reloading sandbox for developing the `react-uploa ### 1. Clone ```shell -git clone git@github.com:bytescale/react-uploader.git -cd react-uploader +git clone git@github.com:bytescale/upload-widget-react.git +cd upload-widget-react ``` ### 2. Setup Environment @@ -38,4 +38,4 @@ npm install npm test ``` -Note: there is no hot-reloading demo for `react-uploader`. Please see the `uploader` repository instead. +Note: there is no hot-reloading demo for `@bytescale/upload-widget-react`. Please see the `@bytescale/upload-widget` repository instead. diff --git a/jest.config.js b/jest.config.js index f3458de..d35e758 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,7 +2,7 @@ module.exports = { preset: "ts-jest", testEnvironment: "jsdom", moduleNameMapper: { - "react-uploader/(.*)": "/src/$1" + "@bytescale/upload-widget-react/(.*)": "/src/$1" }, setupFilesAfterEnv: ["/jest.config.pretest.js"] }; diff --git a/src/UploadButton.tsx b/src/UploadButton.tsx index 48b5bdc..ae33f48 100644 --- a/src/UploadButton.tsx +++ b/src/UploadButton.tsx @@ -1,4 +1,4 @@ -import { useAutoUpdatingOptions } from "react-uploader/hooks/UseAutoUpdatingOptions"; +import { useAutoUpdatingOptions } from "@bytescale/upload-widget-react/hooks/UseAutoUpdatingOptions"; import { UploadWidget, UploadWidgetConfig, UploadWidgetResult } from "@bytescale/upload-widget"; interface MouseEventLite { diff --git a/src/UploadDropzone.tsx b/src/UploadDropzone.tsx index fe2199b..7055758 100644 --- a/src/UploadDropzone.tsx +++ b/src/UploadDropzone.tsx @@ -1,6 +1,6 @@ import React, { useLayoutEffect } from "react"; import { useElementRef } from "./hooks/UseElementRef"; -import { useAutoUpdatingOptions } from "react-uploader/hooks/UseAutoUpdatingOptions"; +import { useAutoUpdatingOptions } from "@bytescale/upload-widget-react/hooks/UseAutoUpdatingOptions"; import { UploadWidget, UploadWidgetConfig, UploadWidgetResult } from "@bytescale/upload-widget"; interface Props { diff --git a/src/hooks/UseAutoUpdatingOptions.ts b/src/hooks/UseAutoUpdatingOptions.ts index 243ea5a..c4fd0cb 100644 --- a/src/hooks/UseAutoUpdatingOptions.ts +++ b/src/hooks/UseAutoUpdatingOptions.ts @@ -1,4 +1,4 @@ -import { useObjectDep } from "react-uploader/hooks/UseObjectDep"; +import { useObjectDep } from "@bytescale/upload-widget-react/hooks/UseObjectDep"; import { useEffect, useState } from "react"; import { UploadWidgetConfig, UploadWidgetMethods } from "@bytescale/upload-widget"; diff --git a/src/index.cdn.ts b/src/index.cdn.ts index 7d47031..4148633 100644 --- a/src/index.cdn.ts +++ b/src/index.cdn.ts @@ -3,4 +3,4 @@ // we make the packages available on 'global'. export * from "@bytescale/sdk"; export * from "@bytescale/upload-widget"; -export * from "react-uploader"; +export * from "@bytescale/upload-widget-react"; diff --git a/src/index.ts b/src/index.ts index eb23f47..27b878c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,2 @@ -export { UploadButton } from "react-uploader/UploadButton"; -export { UploadDropzone } from "react-uploader/UploadDropzone"; +export { UploadButton } from "@bytescale/upload-widget-react/UploadButton"; +export { UploadDropzone } from "@bytescale/upload-widget-react/UploadDropzone"; diff --git a/tests/UploadButton.test.tsx b/tests/UploadButton.test.tsx index 65bfbba..de089c1 100644 --- a/tests/UploadButton.test.tsx +++ b/tests/UploadButton.test.tsx @@ -1,4 +1,4 @@ -import { UploadButton } from "react-uploader/UploadButton"; +import { UploadButton } from "@bytescale/upload-widget-react/UploadButton"; import React from "react"; import { configure, mount } from "enzyme"; import Adapter from "enzyme-adapter-react-16"; diff --git a/tests/UploadDropzone.test.tsx b/tests/UploadDropzone.test.tsx index 849c4d0..e056456 100644 --- a/tests/UploadDropzone.test.tsx +++ b/tests/UploadDropzone.test.tsx @@ -1,7 +1,7 @@ import React from "react"; import { configure, mount } from "enzyme"; import Adapter from "enzyme-adapter-react-16"; -import { UploadDropzone } from "react-uploader/UploadDropzone"; +import { UploadDropzone } from "@bytescale/upload-widget-react/UploadDropzone"; import { act } from "react-dom/test-utils"; (global as any).ResizeObserver = require("resize-observer-polyfill"); diff --git a/tsconfig.json b/tsconfig.json index 2508ac5..807594a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,8 +19,8 @@ "baseUrl": "./src", "jsx": "react", "paths": { - "react-uploader": ["./"], - "react-uploader/*": ["./*"] + "@bytescale/upload-widget-react": ["./"], + "@bytescale/upload-widget-react/*": ["./*"] } }, "include": ["./**/*"], diff --git a/webpack.config.cdn.js b/webpack.config.cdn.js index d22247f..86ca3b3 100644 --- a/webpack.config.cdn.js +++ b/webpack.config.cdn.js @@ -8,7 +8,7 @@ if (isNaN(majorVersion)) { } /** - * Creates the dist that's published to 'https://js.bytescale.com/react-uploader/v*'. + * Creates the dist that's published to 'https://js.bytescale.com/upload-widget-react/v*'. */ module.exports = { ...config, diff --git a/webpack.config.js b/webpack.config.js index 1c0e9be..e413958 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -27,7 +27,7 @@ module.exports = { extensions: [".ts", ".tsx", ".js", ".jsx"], alias: { // Remember to keep in sync with `tsconfig.json` - "react-uploader": path.resolve(__dirname, "src") + "@bytescale/upload-widget-react": path.resolve(__dirname, "src") } }, externals: nodeExternals(),