Skip to content

Commit deeb244

Browse files
committed
Update dependencies
1 parent e923f6a commit deeb244

18 files changed

+844
-2722
lines changed

dist/buttons.common.js

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66
'use strict';
77

8-
Object.defineProperty(exports, '__esModule', { value: true });
9-
108
var document = window.document;
119

1210
var Math = window.Math;

package-lock.json

+808-2,680
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+11-12
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@
2828
"jsdelivr": "dist/buttons.min.js",
2929
"types": "dist/buttons.d.ts",
3030
"scripts": {
31-
"build": "rollup -c rollup.config.js",
31+
"build": "rollup -c rollup.config.mjs",
3232
"lint": "eslint .",
3333
"pretest": "npm run lint",
3434
"test": "babel-node --presets @babel/preset-env -- node_modules/karma/bin/karma start --single-run"
3535
},
3636
"devDependencies": {
37-
"@babel/node": "^7.19.1",
38-
"@babel/preset-env": "^7.19.4",
39-
"@primer/octicons": "^17.7.0",
37+
"@babel/node": "^7.20.2",
38+
"@babel/preset-env": "^7.20.2",
39+
"@primer/octicons": "^17.9.0",
4040
"@primer/primitives": "^7.10.0",
41-
"@rollup/plugin-alias": "^4.0.2",
4241
"@rollup/plugin-html": "^1.0.1",
4342
"@rollup/plugin-json": "^5.0.1",
4443
"@rollup/plugin-node-resolve": "^15.0.1",
4544
"@rollup/plugin-replace": "^5.0.1",
45+
"@rollup/plugin-terser": "^0.1.0",
4646
"@rollup/pluginutils": "^5.0.2",
47-
"chai": "^4.3.6",
48-
"eslint": "^8.26.0",
47+
"chai": "^4.3.7",
48+
"eslint": "^8.27.0",
4949
"eslint-config-standard": "^17.0.0",
5050
"eslint-plugin-import": "^2.26.0",
5151
"eslint-plugin-node": "^11.1.0",
@@ -62,11 +62,10 @@
6262
"karma-sinon": "^1.0.5",
6363
"karma-sinon-chai": "^2.0.2",
6464
"mocha": "^10.1.0",
65-
"rollup": "^2.79.1",
66-
"rollup-plugin-istanbul": "^3.0.0",
67-
"rollup-plugin-terser": "^7.0.2",
68-
"sass": "^1.55.0",
69-
"sinon": "^14.0.1",
65+
"rollup": "^3.2.5",
66+
"rollup-plugin-istanbul": "^4.0.0",
67+
"sass": "^1.56.1",
68+
"sinon": "^14.0.2",
7069
"sinon-chai": "^3.7.0"
7170
}
7271
}

rollup.config.js rollup.config.mjs

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
import alias from '@rollup/plugin-alias'
21
import html from '@rollup/plugin-html'
32
import json from '@rollup/plugin-json'
43
import replace from '@rollup/plugin-replace'
54
import resolve from '@rollup/plugin-node-resolve'
5+
import terser from '@rollup/plugin-terser'
66
import { createFilter } from '@rollup/pluginutils'
7-
import { terser } from 'rollup-plugin-terser'
87
import sassImplementation from 'sass'
9-
import sassFunctions from './src/scss/_functions'
8+
import sassFunctions from './src/scss/_functions.mjs'
9+
import fs from 'fs'
1010
import path from 'path'
11-
import packageJSON from './package.json'
11+
import url from 'url'
12+
13+
const packageJSON = JSON.parse(fs.readFileSync('package.json'))
1214

1315
const banner =
1416
`/*!
@@ -69,11 +71,6 @@ const sass = ({ include, exclude, extensions = ['.sass', '.scss'] } = {}) => {
6971
const template = ({ files }) => `<!doctype html><meta charset=utf-8><title>\u200b</title><meta name=robots content=noindex><body>${files.js.map(({ fileName }) => `<script src=${fileName}></script>`).join('')}`
7072

7173
const plugins = [
72-
alias({
73-
entries: [
74-
{ find: '@', replacement: path.resolve(__dirname, 'src') }
75-
]
76-
}),
7774
resolve(),
7875
octicons({
7976
include: [
@@ -109,7 +106,7 @@ const plugins = [
109106
values: {
110107
const: 'var',
111108
let: 'var',
112-
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
109+
'process.env.NODE_ENV': `'${process.env.NODE_ENV || 'development'}'`,
113110
'process.env.DEBUG': process.env.DEBUG || false
114111
}
115112
})

src/scss/_functions.js src/scss/_functions.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
}))
3333
},
3434
'primitive($keys...)': function (args) {
35-
let primitive = primitives
35+
let primitive = primitives.default !== undefined ? primitives.default : primitives
3636
args[0].asList.forEach(value => {
3737
primitive = primitive[value.text]
3838
})

test/unit/config.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { iframeURL } from '@/config'
1+
import { iframeURL } from '../../src/config'
22

33
describe('Config', () => {
44
it('should export iframeUrl', () => {

test/unit/container.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { render } from '@/container'
1+
import { render } from '../../src/container'
22
import {
33
iframeURL,
44
setApiBaseURL,
55
setUseShadowDOM
6-
} from '@/config'
7-
import { onceEvent } from '@/event'
6+
} from '../../src/config'
7+
import { onceEvent } from '../../src/event'
88

99
setApiBaseURL('/base/test/fixtures/api.github.com')
1010

test/unit/content.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import {
22
render
3-
} from '@/content'
3+
} from '../../src/content'
44

55
import {
66
setApiBaseURL
7-
} from '@/config'
7+
} from '../../src/config'
88

99
setApiBaseURL('/base/test/fixtures/xhr/api.github.com')
1010

test/unit/css.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
getColorScheme,
33
widgetColorSchemes
4-
} from '@/css'
4+
} from '../../src/css'
55

66
describe('CSS', () => {
77
const getCss = (noPreference = 'light', light = 'light', dark = 'dark') => {

test/unit/defer.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defer } from '@/defer'
1+
import { defer } from '../../src/defer'
22

33
describe('Defer', () => {
44
describe('defer(func)', () => {

test/unit/event.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
onEvent,
33
onceEvent
4-
} from '@/event'
4+
} from '../../src/event'
55

66
describe('Event', () => {
77
let input

test/unit/fetch.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { setUseXHR } from '@/config'
2-
import { fetch } from '@/fetch'
1+
import { setUseXHR } from '../../src/config'
2+
import { fetch } from '../../src/fetch'
33

44
describe('Fetch', () => {
55
const head = document.getElementsByTagName('head')[0]

test/unit/globals.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
document,
33
location,
44
Math
5-
} from '@/globals'
5+
} from '../../src/globals'
66

77
describe('Globals', () => {
88
it('should export an alias for window.document', () => {

test/unit/options.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {
22
parseOptions
3-
} from '@/options'
3+
} from '../../src/options'
44

55
describe('Options', () => {
66
let a

test/unit/pixel.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
setDevicePixelRatio,
33
ceilPixel
4-
} from '@/pixel'
4+
} from '../../src/pixel'
55

66
describe('Pixel', () => {
77
describe('ceilPixel(px)', () => {

test/unit/querystring.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
stringify,
33
parse
4-
} from '@/querystring'
4+
} from '../../src/querystring'
55

66
describe('QueryString', () => {
77
describe('stringify(obj)', () => {

test/unit/size.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { get, set } from '@/size'
1+
import { get, set } from '../../src/size'
22

33
describe('Size', () => {
44
let el, size

test/unit/util.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
dispatchOnce,
55
hasOwnProperty,
66
toLowerCase
7-
} from '@/util'
7+
} from '../../src/util'
88

99
describe('Util', () => {
1010
describe('createElement(tag, props, children)', () => {

0 commit comments

Comments
 (0)