Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
51 changes: 22 additions & 29 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,33 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"targets": {
"chrome": 100
"node": "14",
"browsers": ">0.25%, not ie 11, not op_mini all"
}
}
],
"@babel/preset-typescript",
["@babel/preset-react", { "runtime": "automatic" }]
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
["@babel/plugin-proposal-optional-chaining", { "loose": false }],
[
"module-resolver",
{
"extensions": [".ts", ".tsx"],
"root": "./src",
"alias": {
"#components": "./src/components",
"#types": ["./src/types"],
"#hooks": ["./src/hooks"],
"#lib": ["./src/lib"]
}
}
],
[
"@emotion",
{
"sourceMap": true,
"autoLabel": "dev-only",
"labelFormat": "[local]",
"cssPropOptimization": true
}
]
]
"env": {
"node": {
"plugins": [
[
"babel-plugin-transform-import-ignore",
{
"patterns": [
"*.css",
"react",
"react-dom",
"framer-motion"
]
}
]
]
}
}
}
3 changes: 1 addition & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ tsconfig.json
postcss.config.js
tailwind.config.js
tsdx.config.js
dist/hooks/useUpup.d.ts
dist/version.ts
!dist
5 changes: 4 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"plugins": [
"prettier-plugin-organize-imports",
"prettier-plugin-tailwindcss"
]
],
"importOrder": ["^react$", "^[^.]", "^\\."],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}
4 changes: 0 additions & 4 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ const config = {
},
},
],
docs: {
autodocs: true,
defaultName: 'Documentation',
},
core: {
builder: '@storybook/builder-webpack5',
},
Expand Down
2 changes: 1 addition & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../src/tailwind.css'
import '../src/frontend/tailwind.css'

// https://storybook.js.org/docs/react/writing-stories/parameters#global-parameters
export const parameters = {
Expand Down
46 changes: 39 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,34 @@
"readme": "README.md",
"main": "dist/index.js",
"module": "dist/upup.esm.js",
"types": "dist/index.d.ts",
"typings": "dist/index.d.ts",
"types": "./dist/index.browser.d.ts",
"typings": "./dist/index.browser.d.ts",
"exports": {
".": {
"types": "./dist/index.browser.d.ts",
"browser": "./dist/browser.esm.js",
"import": "./dist/browser.esm.js",
"require": "./dist/browser.cjs.development.js"
},
"./server": {
"types": "./dist/index.node.d.ts",
"default": "./dist/node.node.js"
},
"./shared": {
"types": "./dist/shared/types/StorageSDK.d.ts"
}
},
"typesVersions": {
"*": {
"*": [
"./dist/index.d.ts"
]
}
},
"browser": "./dist/upup.esm.js",
"repository": {
"type": "git",
"url": "git+https://github.com/uNotesOfficial/upup.git"
"url": "git+https://github.com/DevinoSolutions/upup.git"
},
"packageManager": "pnpm@8.10.5",
"keywords": [
Expand All @@ -31,7 +54,9 @@
"scripts": {
"start": "pnpm run prebuild && tsdx watch",
"prebuild": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
"build": "pnpm run prebuild && tsdx build",
"build:browser": "tsdx build --entry ./src/index.browser.ts --tsconfig ./tsconfig.browser.json --format esm,cjs --name browser",
"build:node": "tsdx build --entry ./src/index.node.ts --tsconfig ./tsconfig.node.json --format cjs --name node",
"build": "node scripts/build.js",
"test": "tsdx test --passWithNoTests",
"lint": "tsdx lint",
"prepare": "tsdx build",
Expand Down Expand Up @@ -61,6 +86,8 @@
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@changesets/cli": "^2.26.2",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-replace": "^5.0.5",
"@size-limit/preset-small-lib": "^10.0.3",
"@storybook/addon-docs": "^7.6.20",
Expand Down Expand Up @@ -107,14 +134,14 @@
"@aws-sdk/client-s3": "^3.689.0",
"@aws-sdk/s3-request-presigner": "^3.689.0",
"@aws-sdk/xhr-http-handler": "^3.451.0",
"@azure/identity": "^4.5.0",
"@azure/msal-browser": "^3.5.0",
"@azure/storage-blob": "^12.25.0",
"@emotion/styled": "^11.11.0",
"@google-cloud/storage": "^7.14.0",
"@microsoft/microsoft-graph-client": "^3.0.7",
"@mui/material": "^5.14.18",
"@types/gapi": "^0.0.47",
"authProviders": "link:@microsoft/microsoft-graph-client/authProviders",
"babel-plugin-module-resolver": "^5.0.0",
"framer-motion": "^10.16.5",
"load-script": "^2.0.0",
Expand All @@ -127,8 +154,12 @@
},
"peerDependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.x",
"@mui/material": "^5.x",
"@mui/system": "^5.x",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"react-is": "^18.2.0"
},
"pnpm": {
"overrides": {
Expand All @@ -144,6 +175,7 @@
},
"resolutions": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"rollup": "^2.68.0"
}
}
Loading
Loading