Giter VIP home page Giter VIP logo

is-regex's People

Contributors

exe-boss avatar greenkeeperio-bot avatar ljharb avatar phated avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

is-regex's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • [Deps] Update Update eslint to v8.57.0
  • [Deps] Update Update eslint to v9
  • [Deps] Update Update nyc to v15
  • 🔐 Create all pending approval PRs at once 🔐

Detected dependencies

github-actions
.github/workflows/node-aught.yml
.github/workflows/node-harmony.yml
.github/workflows/node-pretest.yml
.github/workflows/node-tens.yml
.github/workflows/rebase.yml
.github/workflows/require-allow-edits.yml
npm
package.json
  • call-bind ^1.0.2
  • has-tostringtag ^1.0.0
  • @ljharb/eslint-config ^21.0.0
  • aud ^2.0.1
  • auto-changelog ^2.4.0
  • core-js ^3.26.0
  • eclint ^2.8.1
  • eslint =8.8.0
  • for-each ^0.3.3
  • in-publish ^2.0.1
  • npmignore ^0.3.0
  • nyc ^10.3.2
  • safe-publish-latest ^2.0.0
  • tape ^5.6.1
  • node >= 0.4

  • Check this box to trigger a request for Renovate to run again on this repository

An in-range update of eslint is breaking the build 🚨

Version 4.15.0 of eslint was just published.

Branch Build failing 🚨
Dependency eslint
Current Version 4.14.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v4.15.0
  • 6ab04b5 New: Add context.report({ messageId }) (fixes #6740) (#9165) (Jed Fox)
  • fc7f404 Docs: add url to each of the rules (refs #6582) (#9788) (Patrick McElhaney)
  • fc44da9 Docs: fix sort-imports rule block language (#9805) (ferhat elmas)
  • 65f0176 New: CLIEngine#getRules() (refs #6582) (#9782) (Patrick McElhaney)
  • c64195f Update: More detailed assert message for rule-tester (#9769) (Weijia Wang)
  • 9fcfabf Fix: no-extra-parens false positive (fixes: #9755) (#9795) (Erin)
  • 61e5fa0 Docs: Add table of contents to Node.js API docs (#9785) (Patrick McElhaney)
  • 4c87f42 Fix: incorrect error messages of no-unused-vars (fixes #9774) (#9791) (akouryy)
  • bbabf34 Update: add ignoreComments option to indent rule (fixes #9018) (#9752) (Kevin Partington)
  • db431cb Docs: HTTP -> HTTPS (fixes #9768) (#9768) (Ronald Eddy Jr)
  • cbf0fb9 Docs: describe how to feature-detect scopeManager/visitorKeys support (#9764) (Teddy Katz)
  • f7dcb70 Docs: Add note about "patch release pending" label to maintainer guide (#9763) (Teddy Katz)
Commits

The new version differs by 14 commits.

  • e14ceb0 4.15.0
  • 2dfc3bd Build: changelog update for 4.15.0
  • 6ab04b5 New: Add context.report({ messageId }) (fixes #6740) (#9165)
  • fc7f404 Docs: add url to each of the rules (refs #6582) (#9788)
  • fc44da9 Docs: fix sort-imports rule block language (#9805)
  • 65f0176 New: CLIEngine#getRules() (refs #6582) (#9782)
  • c64195f Update: More detailed assert message for rule-tester (#9769)
  • 9fcfabf Fix: no-extra-parens false positive (fixes: #9755) (#9795)
  • 61e5fa0 Docs: Add table of contents to Node.js API docs (#9785)
  • 4c87f42 Fix: incorrect error messages of no-unused-vars (fixes #9774) (#9791)
  • bbabf34 Update: add ignoreComments option to indent rule (fixes #9018) (#9752)
  • db431cb Docs: HTTP -> HTTPS (fixes #9768) (#9768)
  • cbf0fb9 Docs: describe how to feature-detect scopeManager/visitorKeys support (#9764)
  • f7dcb70 Docs: Add note about "patch release pending" label to maintainer guide (#9763)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet.
We recommend using:

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

An in-range update of eslint is breaking the build 🚨

Version 4.11.0 of eslint was just published.

Branch Build failing 🚨
Dependency eslint
Current Version 4.10.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v4.11.0
  • d4557a6 Docs: disallow use of the comma operator using no-restricted-syntax (#9585) (薛定谔的猫)
  • d602f9e Upgrade: espree v3.5.2 (#9611) (Kai Cataldo)
  • 4def876 Chore: avoid handling rules instances in config-validator (#9364) (Teddy Katz)
  • fe5ac7e Chore: fix incorrect comment in safe-emitter.js (#9605) (Teddy Katz)
  • 6672fae Docs: Fixed a typo on lines-between-class-members doc (#9603) (Moinul Hossain)
  • 980ecd3 Chore: Update copyright and license info (#9599) (薛定谔的猫)
  • cc2c7c9 Build: use Node 8 in appveyor (#9595) (薛定谔的猫)
  • 2542f04 Docs: Add missing options for lines-around-comment (#9589) (Clément Fiorio)
  • b6a7490 Build: ensure fuzzer tests get run with npm test (#9590) (Teddy Katz)
  • 1073bc5 Build: remove shelljs-nodecli (refs #9533) (#9588) (Teddy Katz)
  • 7e3bf6a Fix: edge-cases of semi-style (#9560) (Toru Nagashima)
  • e5a37ce Fix: object-curly-newline for flow code (#9458) (Tiddo Langerak)
  • 9064b9c Chore: add equalTokens in ast-utils. (#9500) (薛定谔的猫)
  • b7c5b19 Fix: Correct [object Object] output of error.data. (#9561) (Jonathan Pool)
  • 51c8cf0 Docs: Disambiguate definition of Update tag (#9584) (Jonathan Pool)
  • afc3c75 Docs: clarify what eslint-config-eslint is (#9582) (Teddy Katz)
  • aedae9d Docs: fix spelling in valid-typeof example (#9574) (Maksim Degtyarev)
  • 4c5aaf3 Docs: Fix typo in no-underscore-dangle rule (#9567) (Fabien Lucas)
  • 3623600 Chore: upgrade [email protected] (#9557) (薛定谔的猫)
  • 1b606cd Chore: Remove an indirect dependency on jsonify (#9444) (Rouven Weßling)
  • 4d7d7ab Update: Resolve npm installed formatters (#5900) (#9464) (Tom Erik Støwer)
  • accc490 Fix: Files with no failures get "passing" testcase (#9547) (Samuel Levy)
  • ab0f66d Docs: Add examples to better show rule coverage. (#9548) (Jonathan Pool)
  • 88d2303 Chore: Add object-property-newline tests to increase coverage. (#9553) (Jonathan Pool)
  • 7f37b1c Build: test Node 9 on Travis (#9556) (Teddy Katz)
  • acccfbd Docs: Minor rephrase in no-invalid-this. (#9542) (Francisc)
  • 8f9c0fe Docs: improve id-match usage advice (#9544) (Teddy Katz)
  • a9606a3 Fix: invalid tests with super (fixes #9539) (#9545) (Teddy Katz)
  • 8e1a095 Chore: enable a modified version of multiline-comment-style on codebase (#9452) (Teddy Katz)
  • cb60285 Chore: remove commented test for HTML formatter (#9532) (Teddy Katz)
  • 06b491e Docs: fix duplicate entries in changelog (#9530) (Teddy Katz)
  • 2224733 Chore: use eslint-plugin-rulesdir instead of --rulesdir for self-linting (#9164) (Teddy Katz)
  • 9cf4ebe Docs: add .md to link(for github users) (#9529) (薛定谔的猫)
Commits

The new version differs by 35 commits.

  • 1a9a6a5 4.11.0
  • ef4d268 Build: changelog update for 4.11.0
  • d4557a6 Docs: disallow use of the comma operator using no-restricted-syntax (#9585)
  • d602f9e Upgrade: espree v3.5.2 (#9611)
  • 4def876 Chore: avoid handling rules instances in config-validator (#9364)
  • fe5ac7e Chore: fix incorrect comment in safe-emitter.js (#9605)
  • 6672fae Docs: Fixed a typo on lines-between-class-members doc (#9603)
  • 980ecd3 Chore: Update copyright and license info (#9599)
  • cc2c7c9 Build: use Node 8 in appveyor (#9595)
  • 2542f04 Docs: Add missing options for lines-around-comment (#9589)
  • b6a7490 Build: ensure fuzzer tests get run with npm test (#9590)
  • 1073bc5 Build: remove shelljs-nodecli (refs #9533) (#9588)
  • 7e3bf6a Fix: edge-cases of semi-style (#9560)
  • e5a37ce Fix: object-curly-newline for flow code (#9458)
  • 9064b9c Chore: add equalTokens in ast-utils. (#9500)

There are 35 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

version 1.1.4 not published

when doing:
npm i is-regex

the latest version getting installed is 1.1.3

and by doing this:
npm i [email protected]

npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected].
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

isRegex changes lastIndex since node v6

Since node v6 (I believe), testing if an object is a regexp causes lastIndex to be reset to 0. I haven't had a chance to track it down, but my guess is executing call on it?

regexExec.call(value);

test('lastIndex', function (t) {
	var re1 = /a/;
	re1.lastIndex = 3;
	t.ok(re1.lastIndex === 3, 'lastIndex is 3 before isRegex');
	t.ok(isRegex(re1), 'is regex');
	t.ok(re1.lastIndex === 3, 'lastIndex is 3 after isRegex');
	t.end();
});

Running the following in node v6 and above confirms the problem for me.

var regexExec = RegExp.prototype.exec;
var re1 = /a/;
re1.lastIndex = 3;
console.log(re1.lastIndex);
regexExec.call(re1);
console.log(re1.lastIndex);

I tried with RegExp.prototype.test and from v6 onward I get the same result.

The following change appears to fix the problem with the tests that I have performed.

var tryRegexExecCall = function tryRegexExec(value) {
	try {
		var lastIndex = value.lastIndex;
		regexExec.call(value);
		value.lastIndex = lastIndex;
		return true;
	} catch (e) {
		return false;
	}
};

Although I've opened this issue here, I'm not sure that this wouldn't be more appropriate logged against an es-shim?

An in-range update of @ljharb/eslint-config is breaking the build 🚨

The devDependency @ljharb/eslint-config was updated from 13.0.0 to 13.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@ljharb/eslint-config is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 5 commits.

  • 2dd67e5 v13.1.0
  • 34a402a [Minor] update config and require eslint v5.11
  • fd1f310 [Dev Deps] update eslint, replace, safe-publish-latest, semver
  • 2d1a944 [Tests] use npm audit instead of nsp
  • a02c14b [Tests] up to node v11.6, v10.15, v8.15, v6.16

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Reduce the size of the npm package by limiting the included files

Looks like the files property (https://docs.npmjs.com/files/package.json#files) is not used in package.json to specify the included files, nor is the .npmignore file (https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package) is being used for blacklisting unwanted files, for the package published to npm.

Would you consider adding either the files property or the .npmignore file, so that the resulting package file would have smaller size?

The current size can be seen when executing the command npm pack (https://docs.npmjs.com/cli/pack).

This issue was create via tawata

`isRegex(/^0b[01]+$/i)` return `undefined`

Reproduce

import isRegex from "is-regex"
console.log(isRegex(/^0b[01]+$/i))
$ node reproduce.mjs 
true
$ node --frozen-intrinsics reproduce.mjs 
(node:222631) ExperimentalWarning: The --frozen-intrinsics flag is experimental
(Use `node --trace-warnings ...` to show where the warning was created)
undefined
$ 

Upper code

import setDifference1 from "set.prototype.difference"

const sa = new Set([1, 2, 3])
const sb = new Set([3, 4, 5])

console.log(setDifference1(sa, sb))

node_modules/es-abstract/2022/StringToNumber.js

var regexTester = require('safe-regex-test');
...
var isBinary = regexTester(/^0b[01]+$/i);

node_modules/safe-regex-test/index.js

var isRegex = require('is-regex');
...

  if (!isRegex(regex)) {
    throw new $TypeError('`regex` must be a RegExp');
  }

Related

es-shims/Set.prototype.difference#2

An in-range update of replace is breaking the build 🚨

The devDependency replace was updated from 1.0.0 to 1.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

replace is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 2 commits.

  • 86fc01b Merge pull request #1 from bnjmnt4n/yargs
  • 4d1c5bf Replace nomnom with yargs.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of tape is breaking the build 🚨

Version 4.7.0 of tape just got published.

Branch Build failing 🚨
Dependency tape
Current Version 4.6.3
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As tape is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 19 commits.

  • 1d0df26 v4.7.0
  • 51597e2 Merge pull request #374 from feross/master
  • b06f914 [Refactor] instead of throwing on undefined.forEach, throw explicitly.
  • dd93216 [Fix] fix spurious "test exited without ending"
  • 1a8e936 [Deps] update glob, resolve
  • 7eb9e36 [Dev Deps] update falafel, js-yaml
  • e030260 [Tests] on node v8; no need for sudo; v0.8 passes now; allow v5/v7/iojs to fail.
  • 4375661 [Tests] npm v5+ breaks on node < v4
  • df48bfa Only apps should have lock files.
  • 35e47e1 [Tests] npm v4.6+ breaks on node < v1
  • dc1ffa5 [Deps] update object-inspect
  • 66519cb [Deps] update resolve
  • e6d4625 [Dev Deps] update concat-stream, js-yaml
  • bdf2b04 tap-min moved to derhuerst/tap-min
  • 8b3a77e [Tests] fix thrower stack in node 0.8

There are 19 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

remove "has" dependency

has

As it depends on function-bind, which shouldn't be necessary in Node 4. Depending on project requirements, it may not even be necessary for browser builds, and only increases file size.

Performance regression in 1.1.0

I've been helping dig into some Storybook performance issues and I noticed that Telejson's JSON.stringify replacer function is spending a ton of time in is-regex (500+ ms), this seems to be due to the changes in #28, which now causes every plain object given to is-regex to be passed to regexExec (which is also inside a try/catch).

It was suggested by @ljharb to re-add the lastIndex check and test the results in performance. It dropped the time spend in is-regex from 500ms to 1ms.

I will submit a PR with this adjustment, but I'm unsure how to avoid proxy traps as per the tests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.