From 15ab7efc95cef393c1b9215ec5a97e11993f8467 Mon Sep 17 00:00:00 2001 From: neonexus Date: Thu, 2 Nov 2023 18:16:54 -0500 Subject: [PATCH] Added "files" to package.json (smaller footprint on NPM). Updated eslint. Added codeql. --- .github/workflows/codeql-analysis.yml | 69 +++++++++++++++++++++++++++ CHANGELOG.md | 9 ++++ LICENSE | 2 +- README.md | 16 +++++-- mit.svg | 26 ++++++++++ package-lock.json | 43 ++++++++++------- package.json | 11 +++-- 7 files changed, 150 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 mit.svg diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..4ea7577 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,69 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +name: "CodeQL" + +on: + push: + branches: [ "release", "master" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "release", "master" ] + schedule: + - cron: '38 4 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + timeout-minutes: 360 + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + # - name: Autobuild + # uses: github/codeql-action/autobuild@v1 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" + diff --git a/CHANGELOG.md b/CHANGELOG.md index 7720a4e..92eba11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,13 @@ # Changelog + +## [v4.2.3](https://github.com/neonexus/fixted/compare/v4.2.2...v4.2.3) (2023-11-02) + +### Features + +* Added "files" to `package.json`. +* Added `codeql-analysis.yml`. +* Updated dependencies. + ## [v4.2.2](https://github.com/neonexus/fixted/compare/v4.2.1...v4.2.2) (2023-10-03) ### Features diff --git a/LICENSE b/LICENSE index c5b8a08..9eebe2e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ (The MIT License) -Copyright (c) 2022 NeoNexus DeMortis +Copyright (c) 2023 NeoNexus DeMortis 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 diff --git a/README.md b/README.md index 362465c..913858b 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,21 @@ Fixted is based on [Barrels](https://www.npmjs.com/package/barrels), by Ruslan Bredikhin. -For an example of real-world use, see this: https://github.com/neonexus/sails-react-bootstrap-webpack/blob/release/test/startTests.js#L145 - -[![npm](https://img.shields.io/npm/dm/fixted?logo=npm&style=plastic)](https://www.npmjs.com/package/fixted) [![Build Status](https://img.shields.io/travis/com/neonexus/fixted/master?style=plastic&logo=travis)](https://app.travis-ci.com/neonexus/fixted) [![npm (fixted)](https://img.shields.io/npm/v/fixted/latest?style=plastic&logo=npm)](https://www.npmjs.com/package/fixted) [![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/neonexus/fixted/master?style=plastic&logo=github)](https://github.com/neonexus/fixted) +[![npm](https://img.shields.io/npm/dm/fixted?logo=npm&style=plastic)](https://www.npmjs.com/package/fixted) +[![Build Status](https://img.shields.io/travis/com/neonexus/fixted/master?style=plastic&logo=travis)](https://app.travis-ci.com/neonexus/fixted) +[![NPM version](https://img.shields.io/npm/v/fixted/latest?style=plastic&logo=npm&label=latest)](https://www.npmjs.com/package/fixted) +[![GitHub version](https://img.shields.io/github/v/release/neonexus/fixted?style=plastic&logo=github&label=latest)](https://github.com/neonexus/fixted) +[](LICENSE) ## Installation -`npm i --save-dev fixted` +```console +npm i --save-dev fixted +``` + +## Real-World Usage Example + +See [neonexus/sails-react-bootstrap-webpack](https://github.com/neonexus/sails-react-bootstrap-webpack/blob/release/test/startTests.js#L145) for an example of automated tests that depend on fake data. ## Usage diff --git a/mit.svg b/mit.svg new file mode 100644 index 0000000..9502a26 --- /dev/null +++ b/mit.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + license + + MIT + + diff --git a/package-lock.json b/package-lock.json index d533b5b..5a6cfdc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fixted", - "version": "4.2.2", + "version": "4.2.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "fixted", - "version": "4.2.2", + "version": "4.2.3", "funding": [ { "type": "github", @@ -20,7 +20,7 @@ }, "devDependencies": { "chai": "~4.3.10", - "eslint": "~8.50.0", + "eslint": "~8.52.0", "mocha": "~10.2.0", "pre-commit": "~1.2.2", "sails": "~1.5.8", @@ -91,21 +91,21 @@ } }, "node_modules/@eslint/js": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", - "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", + "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", + "@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", "minimatch": "^3.0.5" }, @@ -127,9 +127,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "node_modules/@nodelib/fs.scandir": { @@ -201,6 +201,12 @@ "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ==", "dev": true }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -1173,18 +1179,19 @@ } }, "node_modules/eslint": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", - "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", + "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.50.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/js": "8.52.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", diff --git a/package.json b/package.json index a1b6fde..adfbbd4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fixted", - "version": "4.2.2", + "version": "4.2.3", "description": "A simple way to populate Sails.js v1 models with data fixtures for testing purposes. Originally based on Barrels, by Ruslan Bredikhin.", "keywords": [ "sails", @@ -9,7 +9,9 @@ "testing", "database", "orm", - "waterline" + "waterline", + "fake", + "data" ], "dependencies": { "async": "~3.2.4", @@ -17,7 +19,7 @@ }, "devDependencies": { "chai": "~4.3.10", - "eslint": "~8.50.0", + "eslint": "~8.52.0", "mocha": "~10.2.0", "pre-commit": "~1.2.2", "sails": "~1.5.8", @@ -27,6 +29,9 @@ "peerDependencies": { "sails": "1.x" }, + "files": [ + "index.js" + ], "funding": [ { "type": "github",