Skip to content

Commit

Permalink
Revert "chore: format all files"
Browse files Browse the repository at this point in the history
This reverts commit 9194553.
  • Loading branch information
ocavue committed Nov 17, 2023
1 parent 61e7593 commit adfe725
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 43 deletions.
38 changes: 20 additions & 18 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/javascript-node
{
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": { "VARIANT": "16-bullseye" }
},
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": { "VARIANT": "16-bullseye" }
},

// Set *default* container specific settings.json values on container create.
"settings": {},
// Set *default* container specific settings.json values on container create.
"settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": ["dbaeumer.vscode-eslint"],
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pnpm install",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pnpm install",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"singleQuote": true,
"semi": false
}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Head over to the [discussions](https://github.com/egoist/tsup/discussions) to sh

## Sponsors


<p align="center">
<a href="https://chromatic.com" target="_blank"><picture>
<source media="(prefers-color-scheme: dark)" width="500" srcset="https://fastly.jsdelivr.net/gh/egoist-bot/images@main/uPic/Group 2 (2).png">
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ If you have multiple entry files, each entry will get a corresponding `.d.ts` fi

Note that `--dts` does not resolve external (aka in `node_modules`) types used in the `.d.ts` file, if that's somehow a requirement, try the experimental `--dts-resolve` flag instead.

Since tsup version 7.4.0, you can also use `--experimental-dts` flag to generate declaration files. This flag use [@microsoft/api-extractor](https://www.npmjs.com/package/@microsoft/api-extractor) to generate declaration files, which is more reliable than the previous `--dts` flag. It's still experimental and we are looking for feedbacks.
Since tsup version 7.4.0, you can also use `--experimental-dts` flag to generate declaration files. This flag use [@microsoft/api-extractor](https://www.npmjs.com/package/@microsoft/api-extractor) to generate declaration files, which is more reliable than the previous `--dts` flag. It's still experimental and we are looking for feedbacks.

To use `--experimental-dts`, you would need to install `@microsoft/api-extractor`, as it's a peer dependency of tsup:

Expand Down
4 changes: 3 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"extends": ["config:base"]
"extends": [
"config:base"
]
}
1 change: 1 addition & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
}
}
]

}
}
},
Expand Down
5 changes: 1 addition & 4 deletions src/cli-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ export async function main(options: Options = {}) {
.option('--dts [entry]', 'Generate declaration file')
.option('--dts-resolve', 'Resolve externals types used for d.ts files')
.option('--dts-only', 'Emit declaration files only')
.option(
'--experimental-dts [entry]',
'Generate declaration file (experimental)'
)
.option('--experimental-dts [entry]', 'Generate declaration file (experimental)')
.option(
'--sourcemap [inline]',
'Generate external sourcemap, or inline source: --sourcemap inline'
Expand Down
27 changes: 12 additions & 15 deletions src/esbuild/node-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@ import { Plugin } from 'esbuild'
* https://nodejs.org/api/esm.html#node-imports
*/
export const nodeProtocolPlugin = (): Plugin => {
const nodeProtocol = 'node:'
const nodeProtocol = 'node:'

return {
name: 'node-protocol-plugin',
setup({ onResolve }) {
onResolve(
{
filter: /^node:/,
},
({ path }) => ({
path: path.slice(nodeProtocol.length),
external: true,
})
)
},
}
return {
name: 'node-protocol-plugin',
setup({ onResolve }) {
onResolve({
filter: /^node:/,
}, ({ path }) => ({
path: path.slice(nodeProtocol.length),
external: true
}))
}
}
}
2 changes: 1 addition & 1 deletion src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function formatDistributionExports(
if (!importPath.match(/^\.+\//)) {
importPath = './' + importPath
}

let seen = {
named: new Set<string>(),
module: new Set<string>(),
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/tree-shaking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const treeShakingPlugin = ({
name,
silent,
}: {
treeshake?: TreeshakingStrategy
treeshake?: TreeshakingStrategy,
name?: string
silent?: boolean
}): Plugin => {
Expand Down Expand Up @@ -46,7 +46,7 @@ export const treeShakingPlugin = ({
format: this.format,
file: 'out.js',
sourcemap: !!this.options.sourcemap,
name,
name
})

for (const file of result.output) {
Expand Down

0 comments on commit adfe725

Please sign in to comment.