nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: ember-cli/ember-try
Pull request #105 (2016-10-14 20:29:25)

add support for npm peerDependencies
Useful for testing future versions, while not officially supporting them yet.


Patch:
diff --git a/lib/dependency-manager-adapters/npm.js b/lib/dependency-manager-adapters/npm.js
index 30fd7ad..3579d7b 100644
--- a/lib/dependency-manager-adapters/npm.js
+++ b/lib/dependency-manager-adapters/npm.js
@@ -88,6 +88,7 @@ module.exports = CoreObject.extend({
 
     this._overridePackageJSONDependencies(packageJSON, depSet, 'dependencies');
     this._overridePackageJSONDependencies(packageJSON, depSet, 'devDependencies');
+    this._overridePackageJSONDependencies(packageJSON, depSet, 'peerDependencies');
 
     return packageJSON;
   },


Test patch:
diff --git a/test/dependency-manager-adapters/npm-adapter-test.js b/test/dependency-manager-adapters/npm-adapter-test.js
index 04291cc..67d8ec2 100644
--- a/test/dependency-manager-adapters/npm-adapter-test.js
+++ b/test/dependency-manager-adapters/npm-adapter-test.js
@@ -115,22 +115,32 @@ describe('npmAdapter', function() {
     it('changes specified dependency versions', function() {
       var npmAdapter = new NpmAdapter({cwd: tmpdir});
       var packageJSON = { devDependencies: { 'ember-feature-flags': '1.0.0' }, dependencies: { 'ember-cli-babel': '5.0.0'} };
-      var depSet =  { dependencies: { 'ember-cli-babel': '6.0.0' } };
+      var depSet = { dependencies: { 'ember-cli-babel': '6.0.0' } };
 
       var resultJSON = npmAdapter._packageJSONForDependencySet(packageJSON, depSet);
 
       expect(resultJSON.dependencies['ember-cli-babel']).to.equal('6.0.0');
     });
 
-    it('changes specified bower dev dependency versions', function() {
+    it('changes specified npm dev dependency versions', function() {
       var npmAdapter = new NpmAdapter({cwd: tmpdir});
       var packageJSON = { devDependencies: { 'ember-feature-flags': '1.0.0' }, dependencies: { 'ember-cli-babel': '5.0.0'} };
-      var depSet =  { devDependencies: { 'ember-feature-flags': '2.0.1' } };
+      var depSet = { devDependencies: { 'ember-feature-flags': '2.0.1' } };
 
       var resultJSON = npmAdapter._packageJSONForDependencySet(packageJSON, depSet);
 
       expect(resultJSON.devDependencies['ember-feature-flags']).to.equal('2.0.1');
     });
+
+    it('changes specified npm peer dependency versions', function() {
+      var npmAdapter = new NpmAdapter({cwd: tmpdir});
+      var packageJSON = { peerDependencies: { 'ember-cli-babel': '5.0.0' } };
+      var depSet = { peerDependencies: { 'ember-cli-babel': '4.0.0' } };
+
+      var resultJSON = npmAdapter._packageJSONForDependencySet(packageJSON, depSet);
+
+      expect(resultJSON.peerDependencies['ember-cli-babel']).to.equal('4.0.0');
+    });
   });
 });
Repository: ember-cli/ember-try
Pull request #135 (2017-07-08 16:19:40)

add --ignore-engines to yarn default options

kellyselden: Partially related to #133.

Patch:
diff --git a/lib/dependency-manager-adapters/npm.js b/lib/dependency-manager-adapters/npm.js
index 75d31a1..39c261d 100644
--- a/lib/dependency-manager-adapters/npm.js
+++ b/lib/dependency-manager-adapters/npm.js
@@ -98,8 +98,15 @@ module.exports = CoreObject.extend({
     debug('Run npm install with options %s', mgrOptions);
 
     var cmd = this.useYarnCommand ? 'yarn' : 'npm';
-    if (this.useYarnCommand && mgrOptions.indexOf('--no-lockfile') === -1) {
-      mgrOptions = mgrOptions.concat(['--no-lockfile']);
+    if (this.useYarnCommand) {
+      if (mgrOptions.indexOf('--no-lockfile') === -1) {
+        mgrOptions = mgrOptions.concat(['--no-lockfile']);
+      }
+      // npm warns on incompatible engines
+      // yarn errors, not a good experience
+      if (mgrOptions.indexOf('--ignore-engines') === -1) {
+        mgrOptions = mgrOptions.concat(['--ignore-engines']);
+      }
     }
 
     return this.run(cmd, [].concat(['install'], mgrOptions), { cwd: this.cwd }).then(function() {


Test patch:
diff --git a/test/dependency-manager-adapters/npm-adapter-test.js b/test/dependency-manager-adapters/npm-adapter-test.js
index 24209c0..887299c 100644
--- a/test/dependency-manager-adapters/npm-adapter-test.js
+++ b/test/dependency-manager-adapters/npm-adapter-test.js
@@ -118,7 +118,7 @@ describe('npmAdapter', function() {
         writeJSONFile('package.json', fixturePackage);
         var runCount = 0;
         var stubbedRun = generateMockRun([{
-          command: 'yarn install --no-lockfile',
+          command: 'yarn install --no-lockfile --ignore-engines',
           callback: function(command, args, opts) {
             runCount++;
             expect(opts).to.have.property('cwd', tmpdir);
@@ -139,7 +139,7 @@ describe('npmAdapter', function() {
         writeJSONFile('package.json', fixturePackage);
         var runCount = 0;
         var stubbedRun = generateMockRun([{
-          command: 'yarn install --flat --no-lockfile',
+          command: 'yarn install --flat --no-lockfile --ignore-engines',
           callback: function() {
             runCount++;
             return RSVP.resolve();
Repository: ember-cli/ember-try
Pull request #171 (2018-01-08 09:31:59)

Explicitly remove `--no-shrinkwrap` from the `npm prune` call
Outputs options in debug when running npm prune

xcambar: 1 test failed for a timeout, maybe a restart would fix it.
rwjblue: Restarted!
xcambar: @kategengler I've applied your suggestion and removed all options to `npm prune`.

The failing Node 6 client-test in Travis is due to a missing WeakMap polyfill (see https://travis-ci.org/ember-cli/ember-try/jobs/326400719#L1660)
xcambar: Any news from this? Are you waiting for an action on my end?
kategengler: @xcambar I had assumed from your comment https://github.com/ember-cli/ember-try/issues/170#issuecomment-355933348 that you were still looking into it. 

If you rebase, the tests should start passing. 

Patch:
diff --git a/lib/dependency-manager-adapters/npm.js b/lib/dependency-manager-adapters/npm.js
index 5fef0f6..fb0c165 100644
--- a/lib/dependency-manager-adapters/npm.js
+++ b/lib/dependency-manager-adapters/npm.js
@@ -114,8 +114,7 @@ module.exports = CoreObject.extend({
 
     return this.run(cmd, [].concat(['install'], mgrOptions), { cwd: this.cwd }).then(() => {
       if (!adapter.useYarnCommand) {
-        debug('Run npm prune');
-        return adapter.run(adapter.configKey, [].concat(['prune'], mgrOptions), { cwd: adapter.cwd });
+        return adapter.run(adapter.configKey, ['prune'], { cwd: adapter.cwd });
       }
     });
   },


Test patch:
diff --git a/test/dependency-manager-adapters/npm-adapter-test.js b/test/dependency-manager-adapters/npm-adapter-test.js
index 2ccbcfc..8b5bef3 100644
--- a/test/dependency-manager-adapters/npm-adapter-test.js
+++ b/test/dependency-manager-adapters/npm-adapter-test.js
@@ -56,8 +56,8 @@ describe('npmAdapter', () => {
             return RSVP.resolve();
           },
         }, {
-          command: 'npm prune --no-shrinkwrap',
-          callback(command, args, opts) {
+          command: 'npm prune',
+          callback: function(command, args, opts) {
             runCount++;
             expect(opts).to.have.property('cwd', tmpdir);
             return RSVP.resolve();
@@ -85,8 +85,8 @@ describe('npmAdapter', () => {
             return RSVP.resolve();
           },
         }, {
-          command: 'npm prune --no-optional --no-shrinkwrap',
-          callback() {
+          command: 'npm prune',
+          callback: function() {
             runCount++;
             return RSVP.resolve();
           },
Repository: tailwindlabs/tailwindcss-jit
Pull request #105 (2021-03-18 02:36:02)

Arbitrary margin value proof of concept
Did I provide a test: **YES**
Do the tests pass: **YES**
Is this ready to merge: **NO**

I used what Adam did in #99 as inspiration for this PR.

I have updated the tests to include a proposed acceptance, though there is still more work to be done to add this support to the other utility classes. The test is definitely brittle.

Since this swaps out `asLength` for `asValue`, I'm guessing that might break something else in the framework, though the tests in this repo did not break. ¯\\\_(ツ)_/¯

I couldn't wrap my head around most of the source code, but I noticed in the `asValue()` helper function, that there is some special stuff going on for `calc()`. I wonder if all of the CSS functions could be supported using a similar method?

I also wonder if you can use `asLength` first, and if that returns `undefined` to then instead try and look for a supported list of arbitrary CSS functions? I know #102 mentions using `var()` and my example is `clamp()`

As a slight tangent, I think this would be super valuable to include, because of the utility of these arbitrary function values. Functions like `clamp`/`min`/`max` etc are extremely helpful for building custom one off design elements.

Great work on the JIT; Overall, it's awesome 🤘


Patch:
diff --git a/src/corePlugins/margin.js b/src/corePlugins/margin.js
index 6c8a64a..c9429a1 100644
--- a/src/corePlugins/margin.js
+++ b/src/corePlugins/margin.js
@@ -1,4 +1,4 @@
-const { asLength, nameClass } = require('../pluginUtils')
+const { asLength, nameClass, asValue } = require('../pluginUtils')
 
 module.exports = function ({ matchUtilities, jit: { theme } }) {
   matchUtilities({
@@ -34,7 +34,7 @@ module.exports = function ({ matchUtilities, jit: { theme } }) {
   })
   matchUtilities({
     mt: (modifier, { theme, candidate }) => {
-      let value = asLength(modifier, theme['margin'])
+      let value = asValue(modifier, theme['margin'])
 
       if (value === undefined) {
         return []


Test patch:
diff --git a/tests/08-arbitrary-values.test.css b/tests/08-arbitrary-values.test.css
index 29f73b4..1c5ee58 100644
--- a/tests/08-arbitrary-values.test.css
+++ b/tests/08-arbitrary-values.test.css
@@ -7,6 +7,9 @@
   --tw-ring-offset-shadow: 0 0 #0000;
   --tw-ring-shadow: 0 0 #0000;
 }
+.mt-\[clamp\(30px\2c 100px\)\] {
+	margin-top: clamp(30px, 100px);
+}
 .w-\[3\.23rem\] {
   width: 3.23rem;
 }
diff --git a/tests/08-arbitrary-values.test.html b/tests/08-arbitrary-values.test.html
index f414c70..3188f43 100644
--- a/tests/08-arbitrary-values.test.html
+++ b/tests/08-arbitrary-values.test.html
@@ -22,5 +22,6 @@
     <div class="rotate-[23deg] rotate-[2.3rad] rotate-[401grad] rotate-[1.5turn]"></div>
     <div class="text-[2.23rem]"></div>
     <div class="duration-[2s]"></div>
+    <div class="mt-[clamp(30px,100px)]"></div>
   </body>
 </html>
Repository: tailwindlabs/tailwindcss-jit
Pull request #114 (2021-03-19 01:54:16)

Fixed issue with negative classes not being generated when used with a prefix.
Fixes https://github.com/tailwindlabs/tailwindcss-jit/issues/42.

As far as I understood the code, it was checking for the first character to be a `-` to treat it as a negative class. However, it's not guaranteed that `-` will always be the first character as the user can freely set a prefix in their config file.

It follows, then, that a class will be negative if the first character after the prefix is `-`.

What we want to do here is 
1. let tailwind know that it needs to generate a negative class by setting the negative flag to true
2. retain the user defined prefix in `candidatePrefix` so that given a `tw--ml-4` class `tw-ml-4` can be passed to the generator 

From that point on the logic stays exactly the same, that is, when the negative flag is set, the modifier from the candidate will be prefixed with a `-`.

I've added a few test cases which seem to have run fine.

Let me know what you guys think.


Patch:
diff --git a/src/lib/generateRules.js b/src/lib/generateRules.js
index f64f90c..88db81a 100644
--- a/src/lib/generateRules.js
+++ b/src/lib/generateRules.js
@@ -140,9 +140,11 @@ function* resolveMatchedPlugins(classCandidate, context) {
   let candidatePrefix = classCandidate
   let negative = false
 
-  if (candidatePrefix[0] === '-') {
+  const twConfigPrefix = context.tailwindConfig.prefix || ''
+  const twConfigPrefixLen = twConfigPrefix.length
+  if (candidatePrefix[twConfigPrefixLen] === '-') {
     negative = true
-    candidatePrefix = candidatePrefix.slice(1)
+    candidatePrefix = twConfigPrefix + candidatePrefix.slice(twConfigPrefixLen + 1)
   }
 
   for (let [prefix, modifier] of candidatePermutations(candidatePrefix)) {


Test patch:
diff --git a/tests/05-prefix.test.css b/tests/05-prefix.test.css
index 92b774c..edb2c47 100644
--- a/tests/05-prefix.test.css
+++ b/tests/05-prefix.test.css
@@ -47,6 +47,9 @@
 .tw-dark .tw-group:hover .custom-component {
   font-weight: 400;
 }
+.tw--ml-4 {
+  margin-left: -1rem;
+}
 .tw-font-bold {
   font-weight: 700;
 }
@@ -71,6 +74,12 @@
   text-align: left;
 }
 @media (min-width: 768px) {
+  .md\:tw--ml-5 {
+    margin-left: -1.25rem;
+  }
+  .md\:hover\:tw--ml-6:hover {
+    margin-left: -1.5rem;
+  }
   .md\:hover\:tw-text-right:hover {
     text-align: right;
   }
diff --git a/tests/05-prefix.test.html b/tests/05-prefix.test.html
index c78c05f..51ed71d 100644
--- a/tests/05-prefix.test.html
+++ b/tests/05-prefix.test.html
@@ -1,3 +1,6 @@
+<div class="tw--ml-4"></div>
+<div class="md:tw--ml-5"></div>
+<div class="md:hover:tw--ml-6"></div>
 <div class="tw-container"></div>
 <div class="btn-no-prefix"></div>
 <div class="tw-btn-prefix"></div>
Repository: gcanti/tcomb
Pull request #122 (2015-08-22 16:03:24)

first draft of match function #121


Patch:
diff --git a/.eslintrc b/.eslintrc
index 12c6768..151b5e9 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,4 +1,5 @@
 {
+  "extends": "eslint:recommended",
   "env": {
     "browser": true,
     "node": true
@@ -7,9 +8,5 @@
     "modules": true
   },
   "rules": {
-    "new-cap": 0,
-    "no-shadow": 0,
-    "quotes": [2, "single"],
-    "comma-dangle": "always"
   }
 }
\ No newline at end of file
diff --git a/index.js b/index.js
index 64dcaf0..a25d58c 100644
--- a/index.js
+++ b/index.js
@@ -898,6 +898,36 @@ function func(domain, codomain, name) {
 
 }
 
+function match(x) {
+  var type, guard, f, count;
+  for (var i = 1, len = arguments.length; i < len; ) {
+    type = arguments[i];
+    guard = arguments[i + 1];
+    f = arguments[i + 2];
+
+    if (isFunction(f) && !isType(f)) {
+      i = i + 3;
+    }
+    else {
+      f = guard;
+      guard = Any.is;
+      i = i + 2;
+    }
+
+    if (process.env.NODE_ENV !== 'production') {
+      count = (count || 0) + 1;
+      assert(isType(type), 'Invalid type in clause #' + count);
+      assert(isFunction(guard), 'Invalid guard in clause #' + count + '');
+      assert(isFunction(f), 'Invalid block in clause #' + count + '');
+    }
+
+    if (type.is(x) && guard(x)) {
+      return f(x);
+    }
+  }
+  exports.fail('Match error');
+}
+
 mixin(exports, {
   is: is,
   isType: isType,
@@ -935,5 +965,6 @@ mixin(exports, {
   list: list,
   dict: dict,
   func: func,
-  intersection: intersection
+  intersection: intersection,
+  match: match
 });
diff --git a/package.json b/package.json
index fb591f4..39c9ab8 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
   },
   "homepage": "https://github.com/gcanti/tcomb",
   "devDependencies": {
-    "eslint": "^0.22.1",
+    "eslint": "^1.2.0",
     "mocha": "^2.2.5"
   },
   "tags": [


Test patch:
diff --git a/test/test.js b/test/test.js
index 31e46b5..612a3c1 100644
--- a/test/test.js
+++ b/test/test.js
@@ -1842,4 +1842,39 @@ describe('ES6 classes', function () {
 
 });
 
+describe('match', function () {
 
+  it('should match on type constructors', function () {
+    eq(t.match(1,
+      t.String, function () { return 'a string'; },
+      t.Number, function (n) { return 2 * n; }
+    ), 2);
+  });
+
+  it('should handle an optional guard', function () {
+    eq(t.match(1,
+      t.String, function () { return 'a string'; },
+      t.Number, function () { return false; }, function (n) { return 2 * n; },
+      t.Number, function (n) { return 3 * n; }
+    ), 3);
+  });
+
+  it('should throw if no match is found', function () {
+    throwsWithMessage(function () {
+      t.match(true,
+        t.String, function () { return 'a string'; },
+        t.Number, function (n) { return 2 * n; }
+      );
+    }, '[tcomb] Match error');
+  });
+
+  it('should throw if cases are misplaced', function () {
+    throwsWithMessage(function () {
+      t.match(true,
+        t.String, function () { return 'a string'; },
+        t.Number
+      );
+    }, '[tcomb] Invalid block in clause #2');
+  });
+
+});
Repository: gcanti/tcomb
Pull request #189 (2016-03-24 06:59:54)

add `t.Integer` to standard types
/cc @gabro 


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 21d3185..48a2330 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,8 @@
 
 - **New Feature**
   - Chrome Dev Tools custom formatter for tcomb types
+  - add `t.Integer` to standard types
+  - add `t.Type` to standard types
 
 # v3.0.0
 
diff --git a/index.js b/index.js
index 3030594..9ff2e93 100644
--- a/index.js
+++ b/index.js
@@ -18,9 +18,11 @@ t.Error = require('./lib/Error');
 t.Function = require('./lib/Function');
 t.Nil = require('./lib/Nil');
 t.Number = require('./lib/Number');
+t.Integer = require('./lib/Integer');
 t.Object = require('./lib/Object');
 t.RegExp = require('./lib/RegExp');
 t.String = require('./lib/String');
+t.Type = require('./lib/Type');
 
 // short alias are deprecated
 t.Arr = t.Array;
diff --git a/lib/Integer.js b/lib/Integer.js
new file mode 100644
index 0000000..9ace852
--- /dev/null
+++ b/lib/Integer.js
@@ -0,0 +1,4 @@
+var refinement = require('./refinement');
+var Number = require('./Number');
+
+module.exports = refinement(Number, function (x) { return x % 1 === 0; }, 'Integer');
diff --git a/lib/Type.js b/lib/Type.js
new file mode 100644
index 0000000..041ac57
--- /dev/null
+++ b/lib/Type.js
@@ -0,0 +1,4 @@
+var irreducible = require('./irreducible');
+var isType = require('./isType');
+
+module.exports = irreducible('Type', isType);
\ No newline at end of file


Test patch:
diff --git a/test/irreducibles.js b/test/irreducibles.js
index 36a46fc..a9513cf 100644
--- a/test/irreducibles.js
+++ b/test/irreducibles.js
@@ -355,3 +355,16 @@ describe('t.Date', function () {
   });
 
 });
+
+describe('t.Type', function () {
+
+  describe('#is(x)', function () {
+
+    it('should return true if x is a tcomb type', function () {
+      assert.equal(t.Type.is(t.String), true);
+      assert.equal(t.Type.is(1), false);
+    });
+
+  });
+
+});
\ No newline at end of file
diff --git a/test/refinement.js b/test/refinement.js
index 88ca25f..8723f62 100644
--- a/test/refinement.js
+++ b/test/refinement.js
@@ -112,4 +112,18 @@ describe('t.refinement(type, predicate, [name])', function () {
 
   });
 
+  describe('Integer type', function () {
+
+    it('should type check integers', function () {
+      assert.equal(t.Integer.is(0), true);
+      assert.equal(t.Integer.is(-0), true);
+      assert.equal(t.Integer.is(0.0), true);
+      assert.equal(t.Integer.is(10), true);
+      assert.equal(t.Integer.is(-10), true);
+      assert.equal(t.Integer.is(0.5), false);
+      assert.equal(t.Integer.is(-0.5), false);
+    });
+
+  });
+
 });
Repository: gcanti/tcomb
Pull request #241 (2016-08-10 06:01:21)

handle nully values in interface `is` function


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9a781bc..8e51cea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,11 @@
 **Note**: Gaps between patch versions are faulty/broken releases.
 **Note**: A feature tagged as Experimental is in a high state of flux, you're at risk of it changing without notice.
 
+# 3.2.10
+
+- **Bug Fix**
+  - handle nully values in interface `is` function (@gcanti)
+
 # 3.2.9
 
 - **New Feature**
diff --git a/lib/interface.js b/lib/interface.js
index f770683..ee78fa5 100644
--- a/lib/interface.js
+++ b/lib/interface.js
@@ -94,6 +94,9 @@ function inter(props, options) {
   Interface.displayName = displayName;
 
   Interface.is = function (x) {
+    if (isNil(x)) {
+      return false;
+    }
     if (strict) {
       for (var k in x) {
         if (!props.hasOwnProperty(k)) {
diff --git a/package.json b/package.json
index a4ac4d3..04d1ca2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "tcomb",
-  "version": "3.2.9",
+  "version": "3.2.10",
   "description": "Type checking and DDD for JavaScript",
   "main": "index.js",
   "typings": "index.d.ts",


Test patch:
diff --git a/test/interface.js b/test/interface.js
index 02ab4f9..4e377b5 100644
--- a/test/interface.js
+++ b/test/interface.js
@@ -162,6 +162,8 @@ describe('t.interface(props, [name])', function () {
       assert.equal(PointInterface.is(1), false);
       assert.equal(ToStringable.is(1), true);
       assert.equal(ToStringable.is({}), true);
+      assert.equal(PointInterface.is(null), false);
+      assert.equal(PointInterface.is(undefined), false);
     });
 
     it('should allow additional props', function () {
Repository: sindresorhus/awesome-lint
Pull request #56 (2019-02-24 08:27:37)

Allow British spelling of 'Licence'
Add accepting British spelling of '[Licence](https://dictionary.cambridge.org/dictionary/english/licence)' (spelt with -ce) as a correct spelling in the License and TOC rules


Patch:
diff --git a/rules/badge.js b/rules/badge.js
index 052df3c..8b53b92 100644
--- a/rules/badge.js
+++ b/rules/badge.js
@@ -9,7 +9,8 @@ const badgeUrlWhitelist = new Set([
 
 const badgeSrcUrlWhitelist = new Set([
 	'https://awesome.re/badge.svg',
-	'https://awesome.re/badge-flat.svg'
+	'https://awesome.re/badge-flat.svg',
+	'https://awesome.re/badge-flat2.svg'
 ]);
 
 const isValidBadgeUrl = url => badgeUrlWhitelist.has(url);
diff --git a/rules/license.js b/rules/license.js
index 80ce30c..999aa2f 100644
--- a/rules/license.js
+++ b/rules/license.js
@@ -8,7 +8,7 @@ const visit = require('unist-util-visit');
 module.exports = rule('remark-lint:awesome/license', (ast, file) => {
 	const license = find(ast, node => (
 		node.type === 'heading' &&
-		toString(node) === 'License'
+		(toString(node) === 'Licence' || toString(node) === 'License')
 	));
 
 	if (!license) {
diff --git a/rules/toc.js b/rules/toc.js
index bab1bb1..6890916 100644
--- a/rules/toc.js
+++ b/rules/toc.js
@@ -15,6 +15,7 @@ const maxListItemDepth = 1;
 const sectionHeadingBlacklist = new Set([
 	'Contribute',
 	'Contributing',
+	'Licence',
 	'License'
 ]);
 


Test patch:
diff --git a/test/fixtures/badge/success2.md b/test/fixtures/badge/success2.md
new file mode 100644
index 0000000..e57e8c2
--- /dev/null
+++ b/test/fixtures/badge/success2.md
@@ -0,0 +1,15 @@
+# Foo [![Awesome](https://awesome.re/badge-flat2.svg)](https://github.com/sindresorhus/awesome)
+
+> Bar
+
+## Contents
+
+- [Foo](#foo)
+
+## Foo
+
+non-empty
+
+## License
+
+non-empty
diff --git a/test/rules/badge.js b/test/rules/badge.js
index 3758489..d997b68 100644
--- a/test/rules/badge.js
+++ b/test/rules/badge.js
@@ -47,3 +47,8 @@ test('badge - success (long)', async t => {
 	const messages = await lint({config, filename: 'test/fixtures/badge/success1.md'});
 	t.deepEqual(messages, []);
 });
+
+test('badge - success (new badge)', async t => {
+	const messages = await lint({config, filename: 'test/fixtures/badge/success2.md'});
+	t.deepEqual(messages, []);
+});
Repository: sindresorhus/dot-prop
Pull request #75 (2020-11-18 16:40:25)

Fix default value issue when last part of part of path is undefined
Fix an issue were the default value was not returned if the last part of the path was undefined.


Patch:
diff --git a/index.js b/index.js
index b8d9f29..aa9c5bb 100644
--- a/index.js
+++ b/index.js
@@ -59,7 +59,7 @@ module.exports = {
 			}
 		}
 
-		return object;
+		return object === undefined ? value : object;
 	},
 
 	set(object, path, value) {


Test patch:
diff --git a/test.js b/test.js
index d9731b7..9a3f6e9 100644
--- a/test.js
+++ b/test.js
@@ -16,6 +16,7 @@ test('get', t => {
 	t.is(dotProp.get({foo: {bar: 'a'}}, 'foo.fake'), undefined);
 	t.is(dotProp.get({foo: {bar: 'a'}}, 'foo.fake.fake2'), undefined);
 	t.is(dotProp.get({foo: {bar: 'a'}}, 'foo.fake.fake2', 'some value'), 'some value');
+	t.is(dotProp.get({foo: {}}, 'foo.fake', 'some value'), 'some value');
 	t.is(dotProp.get({'\\': true}, '\\'), true);
 	t.is(dotProp.get({'\\foo': true}, '\\foo'), true);
 	t.is(dotProp.get({'bar\\': true}, 'bar\\'), true);