Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: github/clipboard-copy-element
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.2
Choose a base ref
...
head repository: github/clipboard-copy-element
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.2.1
Choose a head ref

Commits on Mar 13, 2020

  1. Bump acorn from 7.1.0 to 7.1.1

    Bumps [acorn](https://github.com/acornjs/acorn) from 7.1.0 to 7.1.1.
    - [Release notes](https://github.com/acornjs/acorn/releases)
    - [Commits](acornjs/acorn@7.1.0...7.1.1)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 13, 2020
    Copy the full SHA
    7bc7560 View commit details

Commits on Mar 26, 2020

  1. Merge pull request #29 from github/dependabot/npm_and_yarn/acorn-7.1.1

    Bump acorn from 7.1.0 to 7.1.1
    dgraham authored Mar 26, 2020
    Copy the full SHA
    a42d1ac View commit details

Commits on May 21, 2020

  1. Convert to TypeScript

    muan committed May 21, 2020
    Copy the full SHA
    1bd1772 View commit details
  2. Test w/ GitHub Actions CI

    muan committed May 21, 2020
    Copy the full SHA
    6a8471d View commit details
  3. Remove rollup babel

    muan committed May 21, 2020
    Copy the full SHA
    ba82f40 View commit details
  4. Create CODEOWWNERS

    muan committed May 21, 2020
    Copy the full SHA
    3f71f42 View commit details
  5. Include script tag instruction

    muan committed May 21, 2020
    Copy the full SHA
    89277d9 View commit details

Commits on May 22, 2020

  1. Copy the full SHA
    f5161d8 View commit details
  2. Copy the full SHA
    65924af View commit details
  3. Move tsc to build

    muan committed May 22, 2020
    Copy the full SHA
    62cc841 View commit details
  4. Remove plugins

    muan committed May 22, 2020
    Copy the full SHA
    c43d587 View commit details
  5. Copy the full SHA
    794fa27 View commit details
  6. Merge pull request #30 from github/ts

    TypeScript conversion
    muan authored May 22, 2020
    Copy the full SHA
    0f48091 View commit details
  7. Upgrade eslint-config-github

    muan committed May 22, 2020
    Copy the full SHA
    b85fba9 View commit details
  8. Fix github/no-then

    muan committed May 22, 2020
    Copy the full SHA
    a466a8d View commit details

Commits on May 26, 2020

  1. Copy the full SHA
    ec73125 View commit details
  2. Include recommended rules

    muan committed May 26, 2020
    Copy the full SHA
    d640694 View commit details
  3. Copy the full SHA
    eaa1395 View commit details

Commits on May 27, 2020

  1. Set autocrlf to false to avoid test changing file content on checkout

    In development, we should rely on Prettier to guide people to
    doing the right thing
    muan committed May 27, 2020
    Copy the full SHA
    8c1e1a4 View commit details
  2. Fix typo

    muan committed May 27, 2020
    Copy the full SHA
    7b01d5e View commit details

Commits on May 28, 2020

  1. Only run on ubuntu-latest

    muan committed May 28, 2020
    Copy the full SHA
    cf8ef20 View commit details
  2. Merge pull request #31 from github/eslint

    Upgrade eslint-config-github
    muan authored May 28, 2020
    Copy the full SHA
    ba705d4 View commit details

Commits on Jul 16, 2020

  1. Bump lodash from 4.17.15 to 4.17.19

    Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
    - [Release notes](https://github.com/lodash/lodash/releases)
    - [Commits](lodash/lodash@4.17.15...4.17.19)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jul 16, 2020
    Copy the full SHA
    1a0e7f9 View commit details
  2. Merge pull request #32 from github/dependabot/npm_and_yarn/lodash-4.1…

    …7.19
    
    Bump lodash from 4.17.15 to 4.17.19
    koddsson authored Jul 16, 2020
    Copy the full SHA
    c4328b5 View commit details

Commits on Oct 31, 2020

  1. Update link to polyfill

    sonicdoe authored Oct 31, 2020
    Copy the full SHA
    c2caf74 View commit details

Commits on Nov 2, 2020

  1. Merge pull request #33 from sonicdoe/patch-1

    Update link to polyfill
    koddsson authored Nov 2, 2020
    Copy the full SHA
    66b5e9f View commit details

Commits on Mar 16, 2021

  1. fix HTML in examples page

    koddsson authored Mar 16, 2021
    Copy the full SHA
    d2fa0dd View commit details

Commits on May 5, 2021

  1. Copy the full SHA
    d46894a View commit details

Commits on May 8, 2021

  1. Merge pull request #36 from gambala/main

    Fix typo in example page texts
    koddsson authored May 8, 2021
    Copy the full SHA
    4969cf8 View commit details

Commits on Aug 18, 2021

  1. Bump y18n from 4.0.0 to 4.0.3

    Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.3.
    - [Release notes](https://github.com/yargs/y18n/releases)
    - [Changelog](https://github.com/yargs/y18n/blob/y18n-v4.0.3/CHANGELOG.md)
    - [Commits](yargs/y18n@v4.0.0...y18n-v4.0.3)
    
    ---
    updated-dependencies:
    - dependency-name: y18n
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 18, 2021
    Copy the full SHA
    e8eeac2 View commit details
  2. Bump lodash from 4.17.19 to 4.17.21

    Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
    - [Release notes](https://github.com/lodash/lodash/releases)
    - [Commits](lodash/lodash@4.17.19...4.17.21)
    
    ---
    updated-dependencies:
    - dependency-name: lodash
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 18, 2021
    Copy the full SHA
    90bf458 View commit details
  3. Bump hosted-git-info from 2.8.8 to 2.8.9

    Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
    - [Release notes](https://github.com/npm/hosted-git-info/releases)
    - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
    - [Commits](npm/hosted-git-info@v2.8.8...v2.8.9)
    
    ---
    updated-dependencies:
    - dependency-name: hosted-git-info
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 18, 2021
    Copy the full SHA
    871f7a8 View commit details
  4. Merge pull request #42 from github/dependabot/npm_and_yarn/hosted-git…

    …-info-2.8.9
    
    Bump hosted-git-info from 2.8.8 to 2.8.9
    koddsson authored Aug 18, 2021
    Copy the full SHA
    cd86219 View commit details
  5. Copy the full SHA
    1453e8b View commit details
  6. Bump socket.io from 2.3.0 to 2.4.1

    Bumps [socket.io](https://github.com/socketio/socket.io) from 2.3.0 to 2.4.1.
    - [Release notes](https://github.com/socketio/socket.io/releases)
    - [Changelog](https://github.com/socketio/socket.io/blob/2.4.1/CHANGELOG.md)
    - [Commits](socketio/socket.io@2.3.0...2.4.1)
    
    ---
    updated-dependencies:
    - dependency-name: socket.io
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 18, 2021
    Copy the full SHA
    b3126de View commit details
  7. Copy the full SHA
    a3cb859 View commit details
  8. Merge pull request #43 from github/dependabot/npm_and_yarn/socket.io-…

    …2.4.1
    
    Bump socket.io from 2.3.0 to 2.4.1
    koddsson authored Aug 18, 2021
    Copy the full SHA
    20ada66 View commit details
  9. Copy the full SHA
    698edcf View commit details
  10. Copy the full SHA
    645de4b View commit details
  11. Merge pull request #41 from github/dependabot/npm_and_yarn/lodash-4.1…

    …7.21
    
    Bump lodash from 4.17.19 to 4.17.21
    koddsson authored Aug 18, 2021
    Copy the full SHA
    80ed206 View commit details
  12. Bump glob-parent from 5.1.0 to 5.1.2

    Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.0 to 5.1.2.
    - [Release notes](https://github.com/gulpjs/glob-parent/releases)
    - [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
    - [Commits](gulpjs/glob-parent@v5.1.0...v5.1.2)
    
    ---
    updated-dependencies:
    - dependency-name: glob-parent
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 18, 2021
    Copy the full SHA
    b634f73 View commit details
  13. Copy the full SHA
    89bab7a View commit details
  14. Merge pull request #39 from github/dependabot/npm_and_yarn/glob-paren…

    …t-5.1.2
    
    Bump glob-parent from 5.1.0 to 5.1.2
    koddsson authored Aug 18, 2021
    Copy the full SHA
    e7da91d View commit details
  15. Bump path-parse from 1.0.6 to 1.0.7

    Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
    - [Release notes](https://github.com/jbgutierrez/path-parse/releases)
    - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)
    
    ---
    updated-dependencies:
    - dependency-name: path-parse
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 18, 2021
    Copy the full SHA
    cd4cfb4 View commit details
  16. Merge pull request #38 from github/dependabot/npm_and_yarn/path-parse…

    …-1.0.7
    
    Bump path-parse from 1.0.6 to 1.0.7
    koddsson authored Aug 18, 2021
    Copy the full SHA
    258dbd2 View commit details
  17. Copy the full SHA
    b0b1b60 View commit details
  18. Merge pull request #40 from github/dependabot/npm_and_yarn/y18n-4.0.3

    Bump y18n from 4.0.0 to 4.0.3
    koddsson authored Aug 18, 2021
    Copy the full SHA
    d16e7ae View commit details

Commits on Jan 13, 2022

  1. Bump follow-redirects from 1.11.0 to 1.14.7

    Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.11.0 to 1.14.7.
    - [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
    - [Commits](follow-redirects/follow-redirects@v1.11.0...v1.14.7)
    
    ---
    updated-dependencies:
    - dependency-name: follow-redirects
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 13, 2022
    Copy the full SHA
    633f2bf View commit details
  2. Merge pull request #44 from github/dependabot/npm_and_yarn/follow-red…

    …irects-1.14.7
    
    Bump follow-redirects from 1.11.0 to 1.14.7
    jfuchs authored Jan 13, 2022
    Copy the full SHA
    66114bf View commit details

Commits on Jan 21, 2022

  1. Bump log4js from 6.2.1 to 6.4.0

    Bumps [log4js](https://github.com/log4js-node/log4js-node) from 6.2.1 to 6.4.0.
    - [Release notes](https://github.com/log4js-node/log4js-node/releases)
    - [Changelog](https://github.com/log4js-node/log4js-node/blob/master/CHANGELOG.md)
    - [Commits](log4js-node/log4js-node@v6.2.1...v6.4.0)
    
    ---
    updated-dependencies:
    - dependency-name: log4js
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 21, 2022
    Copy the full SHA
    d44137a View commit details
16 changes: 16 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/javascript-node/.devcontainer/base.Dockerfile

# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
ARG VARIANT="16"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source/usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"
32 changes: 32 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/javascript-node
{
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": { "VARIANT": "16" }
},

// Set *default* container specific settings.json values on container create.
"settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"features": {
"git": "latest"
}
}
32 changes: 26 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
{
"root": true,
"extends": [
"plugin:github/es6",
"plugin:github/browser",
"plugin:github/flow"
"plugin:github/recommended",
"plugin:github/typescript",
"plugin:custom-elements/recommended"
],
"rules": {
"custom-elements/tag-name-matches-class": [
"error",
{
"suffix": "Element"
}
],
"custom-elements/define-tag-after-class-definition": "off",
"custom-elements/no-method-prefixed-with-on": "off",
"custom-elements/expose-class-on-global": "off",
"import/extensions": ["error", "always"],
"import/no-unresolved": "off"
},
"overrides": [
{
"files": "src/*-define.ts",
"rules": {
"@typescript-eslint/no-namespace": "off"
}
},
{
"files": "test/**/*.js",
"rules": {
"flowtype/require-valid-file-annotation": "off"
"github/unescaped-html-literal": "off",
"github/no-inner-html": "off",
"i18n-text/no-en": "off"
},
"env": {
"mocha": true
},
"globals": {
"assert": true
}
}
]
9 changes: 0 additions & 9 deletions .flowconfig

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Node CI

on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
env:
CI: true
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish

on:
release:
types: [created]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: npm
- run: npm ci
- run: npm test
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm --ignore-scripts publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @github/primer-reviewers
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -10,10 +10,22 @@ $ npm install --save @github/clipboard-copy-element

## Usage

### Script

Import as ES modules:

```js
import '@github/clipboard-copy-element'
```

With a script tag:

```html
<script type="module" src="./node_modules/@github/clipboard-copy-element/dist/index.js">
```
### Markup
```html
<clipboard-copy for="blob-path" class="btn btn-sm BtnGroup-item">
Copy path
@@ -72,7 +84,7 @@ Browsers without native [custom element support][support] require a [polyfill][]
- Microsoft Edge
[support]: https://caniuse.com/#feat=custom-elementsv1
[polyfill]: https://github.com/webcomponents/custom-elements
[polyfill]: https://github.com/webcomponents/polyfills/tree/master/packages/custom-elements
## Development
Loading