diff -Nru node-toidentifier-1.0.0/debian/changelog node-toidentifier-1.0.1/debian/changelog --- node-toidentifier-1.0.0/debian/changelog 2021-11-02 17:21:33.000000000 +0000 +++ node-toidentifier-1.0.1/debian/changelog 2022-04-08 14:11:25.000000000 +0000 @@ -1,3 +1,10 @@ +node-toidentifier (1.0.1-1) unstable; urgency=medium + + * Team upload + * New upstream version 1.0.1 + + -- Israel Galadima Fri, 08 Apr 2022 14:11:25 +0000 + node-toidentifier (1.0.0-5) unstable; urgency=medium * Team upload diff -Nru node-toidentifier-1.0.0/.eslintrc.yml node-toidentifier-1.0.1/.eslintrc.yml --- node-toidentifier-1.0.0/.eslintrc.yml 2018-07-09 15:56:53.000000000 +0000 +++ node-toidentifier-1.0.1/.eslintrc.yml 2021-11-14 22:18:18.000000000 +0000 @@ -1,2 +1,9 @@ root: true -extends: standard +extends: + - standard + - plugin:markdown/recommended +plugins: + - markdown +overrides: + - files: '**/*.md' + processor: 'markdown/markdown' diff -Nru node-toidentifier-1.0.0/.github/workflows/ci.yml node-toidentifier-1.0.1/.github/workflows/ci.yml --- node-toidentifier-1.0.0/.github/workflows/ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ node-toidentifier-1.0.1/.github/workflows/ci.yml 2021-11-14 22:18:18.000000000 +0000 @@ -0,0 +1,214 @@ +name: ci + +on: +- pull_request +- push + +jobs: + test: + runs-on: ubuntu-18.04 + strategy: + matrix: + name: + - Node.js 0.6 + - Node.js 0.8 + - Node.js 0.10 + - Node.js 0.12 + - io.js 1.x + - io.js 2.x + - io.js 3.x + - Node.js 4.x + - Node.js 5.x + - Node.js 6.x + - Node.js 7.x + - Node.js 8.x + - Node.js 9.x + - Node.js 10.x + - Node.js 11.x + - Node.js 12.x + - Node.js 13.x + - Node.js 14.x + - Node.js 15.x + - Node.js 16.x + - Node.js 17.x + + include: + - name: Node.js 0.6 + node-version: "0.6" + npm-i: mocha@1.21.5 + npm-rm: nyc + + - name: Node.js 0.8 + node-version: "0.8" + npm-i: mocha@2.5.3 + npm-rm: nyc + + - name: Node.js 0.10 + node-version: "0.10" + npm-i: mocha@3.5.3 + npm-rm: nyc + + - name: Node.js 0.12 + node-version: "0.12" + npm-i: mocha@3.5.3 + npm-rm: nyc + + - name: io.js 1.x + node-version: "1.8" + npm-i: mocha@3.5.3 + npm-rm: nyc + + - name: io.js 2.x + node-version: "2.5" + npm-i: mocha@3.5.3 + npm-rm: nyc + + - name: io.js 3.x + node-version: "3.3" + npm-i: mocha@3.5.3 + npm-rm: nyc + + - name: Node.js 4.x + node-version: "4.9" + npm-i: mocha@5.2.0 + npm-rm: nyc + + - name: Node.js 5.x + node-version: "5.12" + npm-i: mocha@5.2.0 + npm-rm: nyc + + - name: Node.js 6.x + node-version: "6.17" + npm-i: mocha@6.2.3 + npm-rm: nyc + + - name: Node.js 7.x + node-version: "7.10" + npm-i: mocha@6.2.3 + npm-rm: nyc + + - name: Node.js 8.x + node-version: "8.17" + npm-i: mocha@7.2.0 + + - name: Node.js 9.x + node-version: "9.11" + npm-i: mocha@7.2.0 + + - name: Node.js 10.x + node-version: "10.24" + npm-i: mocha@8.4.0 + + - name: Node.js 11.x + node-version: "11.15" + npm-i: mocha@8.4.0 + + - name: Node.js 12.x + node-version: "12.22" + + - name: Node.js 13.x + node-version: "13.14" + + - name: Node.js 14.x + node-version: "14.18" + + - name: Node.js 15.x + node-version: "15.14" + + - name: Node.js 16.x + node-version: "16.13" + + - name: Node.js 17.x + node-version: "17.1" + + steps: + - uses: actions/checkout@v2 + + - name: Install Node.js ${{ matrix.node-version }} + shell: bash -eo pipefail -l {0} + run: | + if [[ "${{ matrix.node-version }}" == 0.6* ]]; then + sudo apt-get install g++-4.8 gcc-4.8 libssl1.0-dev + export CC=/usr/bin/gcc-4.8 + export CXX=/usr/bin/g++-4.8 + fi + nvm install --default ${{ matrix.node-version }} + if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then + nvm install --alias=npm 0.10 + nvm use ${{ matrix.node-version }} + if [[ "$(npm -v)" == 1.1.* ]]; then + nvm exec npm npm install -g npm@1.1 + ln -fs "$(which npm)" "$(dirname "$(nvm which npm)")/npm" + else + sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")" + fi + npm config set strict-ssl false + fi + dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" + + - name: Configure npm + run: npm config set shrinkwrap false + + - name: Remove npm module(s) ${{ matrix.npm-rm }} + run: npm rm --silent --save-dev ${{ matrix.npm-rm }} + if: matrix.npm-rm != '' + + - name: Install npm module(s) ${{ matrix.npm-i }} + run: npm install --save-dev ${{ matrix.npm-i }} + if: matrix.npm-i != '' + + - name: Setup Node.js version-specific dependencies + shell: bash + run: | + # eslint for linting + # - remove on Node.js < 10 + if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then + node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \ + grep -E '^eslint(-|$)' | \ + sort -r | \ + xargs -n1 npm rm --silent --save-dev + fi + + - name: Install Node.js dependencies + run: npm install + + - name: List environment + id: list_env + shell: bash + run: | + echo "node@$(node -v)" + echo "npm@$(npm -v)" + npm -s ls ||: + (npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print "::set-output name=" $2 "::" $3 }' + + - name: Run tests + shell: bash + run: | + if npm -ps ls nyc | grep -q nyc; then + npm run test-ci + else + npm test + fi + + - name: Lint code + if: steps.list_env.outputs.eslint != '' + run: npm run lint + + - name: Collect code coverage + uses: coverallsapp/github-action@master + if: steps.list_env.outputs.nyc != '' + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: run-${{ matrix.test_number }} + parallel: true + + coverage: + needs: test + runs-on: ubuntu-latest + steps: + - name: Upload code coverage + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true diff -Nru node-toidentifier-1.0.0/HISTORY.md node-toidentifier-1.0.1/HISTORY.md --- node-toidentifier-1.0.0/HISTORY.md 1970-01-01 00:00:00.000000000 +0000 +++ node-toidentifier-1.0.1/HISTORY.md 2021-11-14 22:18:18.000000000 +0000 @@ -0,0 +1,9 @@ +1.0.1 / 2021-11-14 +================== + + * pref: enable strict mode + +1.0.0 / 2018-07-09 +================== + + * Initial release diff -Nru node-toidentifier-1.0.0/index.js node-toidentifier-1.0.1/index.js --- node-toidentifier-1.0.0/index.js 2018-07-09 15:56:53.000000000 +0000 +++ node-toidentifier-1.0.1/index.js 2021-11-14 22:18:18.000000000 +0000 @@ -4,6 +4,8 @@ * MIT Licensed */ +'use strict' + /** * Module exports. * @public diff -Nru node-toidentifier-1.0.0/package.json node-toidentifier-1.0.1/package.json --- node-toidentifier-1.0.0/package.json 2018-07-09 15:56:53.000000000 +0000 +++ node-toidentifier-1.0.1/package.json 2021-11-14 22:18:18.000000000 +0000 @@ -1,7 +1,7 @@ { "name": "toidentifier", "description": "Convert a string of words to a JavaScript identifier", - "version": "1.0.0", + "version": "1.0.1", "author": "Douglas Christopher Wilson ", "contributors": [ "Douglas Christopher Wilson ", @@ -9,26 +9,30 @@ ], "repository": "component/toidentifier", "devDependencies": { - "eslint": "4.19.1", - "eslint-config-standard": "11.0.0", - "eslint-plugin-import": "2.11.0", - "eslint-plugin-markdown": "1.0.0-beta.6", - "eslint-plugin-node": "6.0.1", - "eslint-plugin-promise": "3.7.0", - "eslint-plugin-standard": "3.1.0", - "mocha": "1.21.5", - "nyc": "11.8.0" + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.3", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.3.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.1.3", + "nyc": "15.1.0" }, "engines": { "node": ">=0.6" }, "license": "MIT", "files": [ + "HISTORY.md", + "LICENSE", "index.js" ], "scripts": { - "lint": "eslint --plugin markdown --ext js,md .", + "lint": "eslint .", "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "nyc --reporter=html --reporter=text npm test" + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "version": "node scripts/version-history.js && git add HISTORY.md" } } diff -Nru node-toidentifier-1.0.0/README.md node-toidentifier-1.0.1/README.md --- node-toidentifier-1.0.0/README.md 2018-07-09 15:56:53.000000000 +0000 +++ node-toidentifier-1.0.1/README.md 2021-11-14 22:18:18.000000000 +0000 @@ -2,7 +2,7 @@ [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] -[![Build Status][travis-image]][travis-url] +[![Build Status][github-actions-ci-image]][github-actions-ci-url] [![Test Coverage][codecov-image]][codecov-url] > Convert a string of words to a JavaScript identifier @@ -48,10 +48,10 @@ [codecov-url]: https://codecov.io/gh/component/toidentifier [downloads-image]: https://img.shields.io/npm/dm/toidentifier.svg [downloads-url]: https://npmjs.org/package/toidentifier +[github-actions-ci-image]: https://img.shields.io/github/workflow/status/component/toidentifier/ci/master?label=ci +[github-actions-ci-url]: https://github.com/component/toidentifier?query=workflow%3Aci [npm-image]: https://img.shields.io/npm/v/toidentifier.svg [npm-url]: https://npmjs.org/package/toidentifier -[travis-image]: https://img.shields.io/travis/component/toidentifier/master.svg -[travis-url]: https://travis-ci.org/component/toidentifier ## diff -Nru node-toidentifier-1.0.0/scripts/version-history.js node-toidentifier-1.0.1/scripts/version-history.js --- node-toidentifier-1.0.0/scripts/version-history.js 1970-01-01 00:00:00.000000000 +0000 +++ node-toidentifier-1.0.1/scripts/version-history.js 2021-11-14 22:18:18.000000000 +0000 @@ -0,0 +1,63 @@ +'use strict' + +var fs = require('fs') +var path = require('path') + +var HISTORY_FILE_PATH = path.join(__dirname, '..', 'HISTORY.md') +var MD_HEADER_REGEXP = /^====*$/ +var VERSION = process.env.npm_package_version +var VERSION_PLACEHOLDER_REGEXP = /^(?:unreleased|(\d+\.)+x)$/ + +var historyFileLines = fs.readFileSync(HISTORY_FILE_PATH, 'utf-8').split('\n') + +if (!MD_HEADER_REGEXP.test(historyFileLines[1])) { + console.error('Missing header in HISTORY.md') + process.exit(1) +} + +if (!VERSION_PLACEHOLDER_REGEXP.test(historyFileLines[0])) { + console.error('Missing placeholder version in HISTORY.md') + process.exit(1) +} + +if (historyFileLines[0].indexOf('x') !== -1) { + var versionCheckRegExp = new RegExp('^' + historyFileLines[0].replace('x', '.+') + '$') + + if (!versionCheckRegExp.test(VERSION)) { + console.error('Version %s does not match placeholder %s', VERSION, historyFileLines[0]) + process.exit(1) + } +} + +historyFileLines[0] = VERSION + ' / ' + getLocaleDate() +historyFileLines[1] = repeat('=', historyFileLines[0].length) + +fs.writeFileSync(HISTORY_FILE_PATH, historyFileLines.join('\n')) + +function getLocaleDate () { + var now = new Date() + + return zeroPad(now.getFullYear(), 4) + '-' + + zeroPad(now.getMonth() + 1, 2) + '-' + + zeroPad(now.getDate(), 2) +} + +function repeat (str, length) { + var out = '' + + for (var i = 0; i < length; i++) { + out += str + } + + return out +} + +function zeroPad (number, length) { + var num = number.toString() + + while (num.length < length) { + num = '0' + num + } + + return num +} diff -Nru node-toidentifier-1.0.0/test/index.js node-toidentifier-1.0.1/test/index.js --- node-toidentifier-1.0.0/test/index.js 2018-07-09 15:56:53.000000000 +0000 +++ node-toidentifier-1.0.1/test/index.js 2021-11-14 22:18:18.000000000 +0000 @@ -4,18 +4,18 @@ describe('toIdentifier', function () { it('should remove spaces', function () { - assert.equal(toIdentifier(' Foo Bar '), 'FooBar') + assert.strictEqual(toIdentifier(' Foo Bar '), 'FooBar') }) it('should upper case first letter', function () { - assert.equal(toIdentifier('foo bar'), 'FooBar') + assert.strictEqual(toIdentifier('foo bar'), 'FooBar') }) it('should preserve case for ', function () { - assert.equal(toIdentifier('foo bar'), 'FooBar') + assert.strictEqual(toIdentifier('foo bar'), 'FooBar') }) it('should remove non-word characters', function () { - assert.equal(toIdentifier('f"o^o $ bar_z'), 'FooBar_z') + assert.strictEqual(toIdentifier('f"o^o $ bar_z'), 'FooBar_z') }) }) diff -Nru node-toidentifier-1.0.0/.travis.yml node-toidentifier-1.0.1/.travis.yml --- node-toidentifier-1.0.0/.travis.yml 2018-07-09 15:56:53.000000000 +0000 +++ node-toidentifier-1.0.1/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -language: node_js -node_js: - - '0.6' - - '0.8' - - '0.10' - - '0.12' - - '1.8' - - '2.5' - - '3.3' - - '4.9' - - '5.12' - - '6.14' - - '7.10' - - '8.11' - - '9.11' - - '10.6' -sudo: false -dist: precise -cache: - directories: - - node_modules -before_install: - # Skip updating shrinkwrap / lock - - "npm config set shrinkwrap false" - # Setup Node.js version-specific dependencies - - "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev nyc" - - "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev $(grep -E '\"eslint\\S*\"' package.json | cut -d'\"' -f2)" - # Update Node.js modules - - "test ! -d node_modules || npm prune" - - "test ! -d node_modules || npm rebuild" -script: - # Run test script, depending on nyc install - - "test ! -z $(npm -ps ls nyc) || npm test" - - "test -z $(npm -ps ls nyc) || npm run-script test-cov" - - "test -z $(npm -ps ls eslint) || npm run-script lint" -after_success: - - "test ! -z $(npm -ps ls nyc) && npm install codecov@2 && nyc report --reporter=text-lcov > coverage.lcov && codecov"