Skip to content

Commit

Permalink
build: remove unnecessary bundle fields (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Nov 2, 2023
1 parent dcecfed commit f5feecc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 19 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,5 @@ coverage
.envrc
stats.html
examples
src/ky.js
dist
lightweight/index.js
src/node.mjs
lightweight
18 changes: 6 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
"name": "@microlink/mql",
"description": "Microlink Query Language. The official HTTP client to interact with Microlink API for Node.js, browsers & Deno.",
"homepage": "https://microlink.io/mql",
"version": "0.11.5",
"version": "0.11.6-2",
"types": "lightweight/index.d.ts",
"main": "src/node.js",
"browser": "src/lightweight.js",
"exports": {
".": {
"import": "./lightweight/index.js",
"require": "./src/node.js"
}
"require": "./src/node.js",
"default": "./lightweight/index.js"
},
"author": {
"email": "josefrancisco.verdu@gmail.com",
Expand Down Expand Up @@ -91,14 +87,12 @@
"files": [
"lightweight",
"src/factory.js",
"src/index.d.ts",
"src/ky.js",
"src/node.js"
],
"scripts": {
"build": "rollup -c rollup.config.js --bundleConfigAsCjs",
"clean": "rm -rf node_modules",
"clean:build": "rm -rf dist lightweight/index.js",
"clean:build": "rm -rf lightweight/index.js",
"contributors": "(npx git-authors-cli && npx finepack --sort-ignore-object-at ava && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
"dev": "npm run build -- -w",
"lint": "standard && tsd",
Expand Down Expand Up @@ -144,8 +138,8 @@
},
"standard": {
"ignore": [
"dist",
"lightweight/index.js"
"lightweight/index.js",
"src/node.mjs"
]
},
"standard-version": {
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const builds = [
/* This build is just for testing using ESM interface */
build({
input: './src/node.js',
output: { file: 'dist/node.mjs', format: 'es' },
output: { file: 'src/node.mjs', format: 'es' },
plugins: [commonjs(), rewriteFlattie()]
}),
build({
Expand Down
3 changes: 1 addition & 2 deletions test/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ test('cjs', async t => {

test('esm', async t => {
// eslint-disable-next-line no-template-curly-in-string
const code =
"import {version} from '@microlink/mql'; console.log(`mql v${version}`)"
const code = "import {version} from '@microlink/mql'; console.log(`mql v${version}`)"
const { stdout } = await evalScript.esm(code)
t.is(stdout, `mql v${pkg.version}`)
})
2 changes: 1 addition & 1 deletion test/clients.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import mqlLightweight from '../lightweight/index.js'
import mqlNode from '../dist/node.mjs'
import mqlNode from '../src/node.mjs'

export default [
{ constructor: mqlNode, target: 'node' },
Expand Down

1 comment on commit f5feecc

@vercel
Copy link

@vercel vercel bot commented on f5feecc Nov 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.