diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e000b0c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +end_of_line = lf + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fcadb2c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 0000000..31627b0 --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,75 @@ +name: dev +on: + pull_request: + push: + branches: + - master + - main +env: + CI: true + +jobs: + prettier: + name: Format code + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' }} + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Prettier + uses: gulpjs/prettier_action@v3.0 + with: + commit_message: 'chore: Run prettier' + prettier_options: '--write .' + + test: + name: Tests for Node ${{ matrix.node }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + node: [10, 12, 14, 16] + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + + - run: node --version + - run: npm --version + + - name: Install npm dependencies + run: npm install + + - name: Run lint + run: npm run lint + + - name: Run tests + run: npm test + + - name: Coveralls + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: ${{ matrix.os }}-node-${{ matrix.node }} + parallel: true + + coveralls: + needs: test + name: Finish up + + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8a10ce3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +name: release +on: + push: + branches: + - master + - main + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: GoogleCloudPlatform/release-please-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: node + package-name: release-please-action + bump-minor-pre-major: true diff --git a/.gitignore b/.gitignore index dda9df2..58a757a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,17 +2,66 @@ logs *.log npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov # Coverage directory used by tools like istanbul coverage + +# nyc test coverage .nyc_output -.coveralls.yml + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release # Dependency directories -node_modules +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ # Optional npm cache directory .npm -# Files generated by platform. +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next + +# Garbage files .DS_Store + +# Test results +test.xunit diff --git a/.pretterignore b/.pretterignore new file mode 100644 index 0000000..c96ebe0 --- /dev/null +++ b/.pretterignore @@ -0,0 +1,3 @@ +coverage/ +.nyc_output/ +CHANGELOG.md diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d2ba1bd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -sudo: false - -language: node_js - -node_js: - - '14' - - '13' - - '12' - - '11' - - '10' - - '9' - - '8' - - '7' - - '6' - - '5' - - '4' - - '0.12' - - '0.10' - -before_install: - - if [ $(echo "${TRAVIS_NODE_VERSION}" | cut -d'.' -f1) -eq 5 ]; then - npm i -g npm@4; - fi - -after_success: - - if [ $(echo "${TRAVIS_NODE_VERSION}" | cut -d'.' -f1) -ge 6 ]; then - npm run coveralls; - fi - -os: - - linux - - osx diff --git a/README.md b/README.md index b38f2b1..9ba4d3e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,12 @@ -# [copy-props][repo-url] [![NPM][npm-img]][npm-url] [![MIT License][mit-img]][mit-url] [![Build Status][travis-img]][travis-url] [![Build Status][appveyor-img]][appveyor-url] [![Coverage Status][coverage-img]][coverage-url] +
+ + + +
+ +# copy-props + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url] Copy properties between two objects deeply. @@ -214,14 +222,19 @@ Copyright (C) 2016-2021 Gulp Team. This program is free software under [MIT][mit-url] License. See the file LICENSE in this distribution for more details. -[repo-url]: https://github.com/gulpjs/copy-props/ -[npm-img]: https://img.shields.io/badge/npm-v2.0.5-blue.svg -[npm-url]: https://www.npmjs.org/package/copy-props/ -[mit-img]: https://img.shields.io/badge/license-MIT-green.svg -[mit-url]: https://opensource.org/licenses.MIT -[travis-img]: https://travis-ci.org/gulpjs/copy-props.svg?branch=master -[travis-url]: https://travis-ci.org/gulpjs/copy-props -[appveyor-img]: https://ci.appveyor.com/api/projects/status/github/gulpjs/copy-props?branch=master&svg=true -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/copy-props -[coverage-img]: https://coveralls.io/repos/github/gulpjs/copy-props/badge.svg?branch=master -[coverage-url]: https://coveralls.io/github/gulpjs/copy-props?branch=master + + +[downloads-image]: https://img.shields.io/npm/dm/copy-props.svg?style=flat-square +[npm-url]: https://www.npmjs.org/package/copy-props +[npm-image]: https://img.shields.io/npm/v/copy-props.svg?style=flat-square + +[ci-url]: https://github.com/gulpjs/copy-props/actions?query=workflow:dev +[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/copy-props/dev?style=flat-square + +[coveralls-url]: https://coveralls.io/r/gulpjs/copy-props +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/copy-props/master.svg + + + +[mit-url]: https://opensource.org/licenses/MIT + diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 95737c3..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,33 +0,0 @@ -# http://www.appveyor.com/docs/appveyor-yml -# http://www.appveyor.com/docs/lang/nodejs-iojs - -environment: - matrix: - # node.js - - nodejs_version: "14" - - nodejs_version: "13" - - nodejs_version: "12" - - nodejs_version: "11" - - nodejs_version: "10" - - nodejs_version: "9" - - nodejs_version: "8" - - nodejs_version: "7" - - nodejs_version: "6" - - nodejs_version: "5" - - nodejs_version: "4" - - nodejs_version: "0.12" - - nodejs_version: "0.10" - -install: - - ps: Install-Product node $env:nodejs_version - - ps: if ($env:nodejs_version -eq '5') { npm i -g npm@4 } - - cmd: npm install - -test_script: - - node --version - - npm --version - - cmd: npm test - -build: off - -version: "{build}" diff --git a/package.json b/package.json index 6b2a51e..67dc975 100644 --- a/package.json +++ b/package.json @@ -2,19 +2,19 @@ "name": "copy-props", "version": "2.0.5", "description": "Copy properties deeply between two objects.", + "author": "Gulp Team