Skip to content

Commit

Permalink
chore: dependabot fixes (#109)
Browse files Browse the repository at this point in the history
* chore: dependabot fixes

1. updated packages.
2. updated node and npm engines (need npm 8 so that overrides can be specified).
3. overridding several packages that have security issues. packages used by eslint and webpack dev server.
4. attempted to update webpack dev server but middleware configuration has changed. will attempt upgrade later.
5. swapped out tslint for eslint, hence quite a few changes.
6. change github workflow to build with node 14 and 16. removed 10 and 12.
7. switched to nodenv and removed nix shell. easier to deal with node and npm.
8. fixed deprecation warning with tests regarding use of done. then(done) becomes then(() => done())
  • Loading branch information
bryans99 authored Aug 23, 2022
1 parent 7b1bc9e commit 862b84e
Show file tree
Hide file tree
Showing 27 changed files with 23,179 additions and 6,001 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm ci
npm run build --if-present
npm run test-once
env:
CI: true
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm ci
npm run build --if-present
npm run test-once
env:
CI: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dist
lib
node_modules
server_utils/auth_utils.js
.direnv
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.17.4
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"semi": false,
"singleQuote": true
}
61 changes: 52 additions & 9 deletions demo/demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
import { LookerEmbedSDK, LookerEmbedLook, LookerEmbedDashboard } from '../src/index'
/*
MIT License
Copyright (c) 2019 Looker Data Sciences, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
import type { LookerEmbedLook, LookerEmbedDashboard } from '../src/index'
import { LookerEmbedSDK } from '../src/index'

/*
* The MIT License (MIT)
Expand Down Expand Up @@ -26,7 +52,13 @@ import { LookerEmbedSDK, LookerEmbedLook, LookerEmbedDashboard } from '../src/in

// IDs for content to demonstrate are configured in democonfig.ts

import { lookerHost, dashboardId, lookId, exploreId, extensionId } from './demo_config'
import {
lookerHost,
dashboardId,
lookId,
exploreId,
extensionId,
} from './demo_config'

// Initialize the SDK. lookerHost is the address of the Looker instance. It is configured in
// democonfig.ts. lookerHost needs to be set for messages to be exchanged from the host
Expand Down Expand Up @@ -114,11 +146,19 @@ document.addEventListener('DOMContentLoaded', function () {
.appendTo('#dashboard')
// Listen to messages to display progress
.on('dashboard:loaded', () => updateState('#dashboard-state', 'Loaded'))
.on('dashboard:run:start', () => updateState('#dashboard-state', 'Running'))
.on('dashboard:run:complete', () => updateState('#dashboard-state', 'Done'))
.on('dashboard:run:start', () =>
updateState('#dashboard-state', 'Running')
)
.on('dashboard:run:complete', () =>
updateState('#dashboard-state', 'Done')
)
// Listen to messages that change dashboard
.on('dashboard:save:complete', () => updateState('#dashboard-state', 'Saved'))
.on('dashboard:delete:complete', () => updateState('#dashboard-state', 'Deleted'))
.on('dashboard:save:complete', () =>
updateState('#dashboard-state', 'Saved')
)
.on('dashboard:delete:complete', () =>
updateState('#dashboard-state', 'Deleted')
)
// Listen to messages to prevent the user from navigating away
.on('drillmenu:click', canceller)
.on('drillmodal:explore', canceller)
Expand All @@ -141,7 +181,8 @@ document.addEventListener('DOMContentLoaded', function () {
console.error('Connection error', error)
})
} else {
document.querySelector<HTMLDivElement>('#demo-dashboard')!.style.display = 'none'
document.querySelector<HTMLDivElement>('#demo-dashboard')!.style.display =
'none'
}

// Create an embedded Look
Expand Down Expand Up @@ -198,7 +239,8 @@ document.addEventListener('DOMContentLoaded', function () {
console.error('Connection error', error)
})
} else {
document.querySelector<HTMLDivElement>('#demo-explore')!.style.display = 'none'
document.querySelector<HTMLDivElement>('#demo-explore')!.style.display =
'none'
}

// Create an embedded extension (Requires Looker 7.12 and extensions framework)
Expand All @@ -217,6 +259,7 @@ document.addEventListener('DOMContentLoaded', function () {
console.error('Connection error', error)
})
} else {
document.querySelector<HTMLDivElement>('#demo-extension')!.style.display = 'none'
document.querySelector<HTMLDivElement>('#demo-extension')!.style.display =
'none'
}
})
28 changes: 25 additions & 3 deletions demo/demo_config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
// The address of your Looker instance. Required.
// If your instance uses a default port (https://mycompany.looker.com) then
// you should not include a port number here
/*
MIT License
Copyright (c) 2022 Looker Data Sciences, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

export const lookerHost = 'self-signed.looker.com:9999'
// export const lookerHost = 'mycompany.looker.com'
Expand Down
Loading

0 comments on commit 862b84e

Please sign in to comment.