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

build: remove unnecessary bundle fields #139

Merged
merged 1 commit into from
Nov 2, 2023
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
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