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

chore: update dependencies, add modules export #84

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
22 changes: 0 additions & 22 deletions .babelrc

This file was deleted.

35 changes: 35 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const sharedPresets = [];
const shared = {};

module.exports = {
env: {
esmUnbundled: shared,
esmBundled: {
...shared,
presets: [
[
'@babel/env',
{
targets: '> 0.25%, not dead'
}
],
...sharedPresets
]
},
cjs: {
...shared,
presets: [
[
'@babel/env',
{
modules: 'commonjs'
}
],
...sharedPresets
]
},
test: {
presets: [['@babel/env', { targets: { node: 'current' } }], ...sharedPresets]
}
}
};
2 changes: 1 addition & 1 deletion docs/README.md → README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# plugins-client-sdk
# Plugins Client SDK

[![Build Status](https://github.com/Staffbase/plugins-client-sdk/workflows/Continuous%20Integration/badge.svg?branch=master)](https://github.com/Staffbase/plugins-client-sdk/actions)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
8 changes: 4 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@ module.exports = {

// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',

// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
// "/node_modules/"
@@ -124,7 +123,7 @@ module.exports = {
// snapshotSerializers: [],

// The test environment that will be used for testing
testEnvironment: 'jsdom'
testEnvironment: 'jsdom',

// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},
@@ -159,8 +158,9 @@ module.exports = {
// timers: "real",

// A map from regular expressions to paths to transformers
// transform: null,

transform: {
'\\.[jt]sx?$': 'babel-jest'
}
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
// "/node_modules/"
47 changes: 27 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -2,32 +2,30 @@
"name": "@staffbase/plugins-client-sdk",
"version": "2.0.0",
"description": "Staffbase plugins client SDK for JavaScript",
"main": "dist/plugins-client-sdk.js",
"module": "dist/plugins-client-sdk.esm.js",
"browser": "dist/plugins-client-sdk.umd.js",
"main": "./dist/plugins-client-sdk.cjs.min.js",
"module": "./dist/plugins-client-sdk.esm.min.js",
"browser": "dist/plugins-client-sdk.umd.min.js",
"exports": {
"require": "./dist/plugins-client-sdk.cjs.min.js",
"import": "./dist/plugins-client-sdk.esm.min.js"
},
"scripts": {
"build": "rollup -c",
"build": "yarn rollup -c",
"prebuild": "yarn run lint",
"postbuild": "yarn run size-limit",
"prepare": "husky install",
"dev": "rollup -c rollup.dev.mjs -w",
"test-unit": "jest",
"test-dev": "jest --watch",
"lint": "yarn run lint-code && yarn run lint-size",
"test-unit": "BABEL_ENV=test jest",
"test-dev": "BABEL_ENV=test jest --watch",
"lint": "yarn run lint-code",
"lint-code": "yarn eslint src test",
"lint-size": "yarn size-limit",
"fix": "eslint --fix 'src/**/*.js' 'test/**/*.js'",
"doc": "mkdir -p doc && yarn --silent jsdoc2md src/main.js > doc/api.md",
"release": "semantic-release"
},
"repository": "https://github.com/Staffbase/plugins-client-sdk.git",
"keywords": [
"staffbase",
"client",
"sdk",
"javascript",
"plugin",
"api"
],
"keywords": ["staffbase", "client", "sdk", "javascript", "plugin", "api"],
"author": "Staffbase GmbH (https://staffbase.com/)",
"contributors": [
"Stefan Staude <[email protected]>",
@@ -41,13 +39,21 @@
"directories": {
"test": "test"
},
"files": [
"dist"
],
"files": ["dist"],
"size-limit": [
{
"limit": "8 kB",
"path": "src/main.js"
},
{
"path": "dist/plugins-client-sdk.umd.min.js"
},
{
"path": "dist/plugins-client-sdk.esm.min.js",
"import": "{ openLinkExternal }"
},
{
"path": "dist/plugins-client-sdk.esm.min.js"
}
],
"dependencies": {
@@ -69,9 +75,11 @@
"@rollup/plugin-commonjs": "24.0.1",
"@rollup/plugin-node-resolve": "15.0.1",
"@rollup/plugin-strip": "3.0.2",
"@rollup/plugin-sucrase": "^5.0.1",
"@rollup/plugin-terser": "^0.4.0",
"@size-limit/preset-small-lib": "8.2.4",
"@tmware/semantic-release-npm-github-publish": "^1.5.5",
"babel-cli": "^6.26.0",
"babel-jest": "29.5.0",
"babel-plugin-istanbul": "^6.1.1",
"compare-versions": "^5.0.3",
@@ -85,11 +93,10 @@
"jsdoc-to-markdown": "^8.0.0",
"prettier": "^2.8.4",
"regenerator-runtime": "0.13.11",
"rollup": "^3.18.0",
"rollup": "^3.19.1",
"rollup-plugin-license": "3.0.1",
"rollup-plugin-serve": "2.0.2",
"rollup-plugin-strip-logger": "0.4.1",
"rollup-plugin-template-html": "0.0.3",
"size-limit": "^8.2.4"
}
}
Loading