nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: maizzle/framework
Pull request #877 (2023-01-16 12:37:45)

fix: baseURL defaults when configured as object
This PR fixes an issue with `baseURL` defaults when it is configured as an object.

Specifically, in this case the `url` was not being appended to `<style>` tags or inline CSS, you had to enable them manually, i.e.:

```js
baseURL: {
  url: 'https://example.com/images/',
  tags: ['img', 'source'],
  inlineCss: true,
  styleTag: true,
},
```

Now you can just do this and it will work:

```js
baseURL: {
  url: 'https://example.com/images/',
  tags: ['img', 'source']
},
```





Patch:
diff --git a/src/transformers/baseUrl.js b/src/transformers/baseUrl.js
index d1b659a..66c31e8 100644
--- a/src/transformers/baseUrl.js
+++ b/src/transformers/baseUrl.js
@@ -7,13 +7,18 @@ const defaultConfig = require('../generators/posthtml/defaultConfig')
 module.exports = async (html, config = {}, direct = false) => {
   const url = direct ? config : get(config, 'baseURL', get(config, 'baseUrl'))
   const posthtmlOptions = merge(defaultConfig, get(config, 'build.posthtml.options', {}))
+  const defaultOptions = {
+    allTags: true,
+    styleTag: true,
+    inlineCss: true
+  }
 
   // Handle `baseUrl` as a string
   if (typeof url === 'string' && url.length > 0) {
     html = rewriteVMLs(html, url)
 
     return posthtml([
-      baseUrl({url, allTags: true, styleTag: true, inlineCss: true})
+      baseUrl({url, ...defaultOptions})
     ])
       .process(html, posthtmlOptions)
       .then(result => result.html)
@@ -23,7 +28,11 @@ module.exports = async (html, config = {}, direct = false) => {
   if (isObject(url) && !isEmpty(url)) {
     html = rewriteVMLs(html, get(url, 'url', ''))
 
-    return posthtml([baseUrl(url)]).process(html, posthtmlOptions).then(result => result.html)
+    return posthtml([
+      baseUrl(merge(defaultOptions, url))
+    ])
+      .process(html, posthtmlOptions)
+      .then(result => result.html)
   }
 
   return html


Test patch:
diff --git a/test/test-transformers.js b/test/test-transformers.js
index 0787bc7..c74cf89 100644
--- a/test/test-transformers.js
+++ b/test/test-transformers.js
@@ -245,10 +245,7 @@ test('base URL (string)', async t => {
 test('base URL (object)', async t => {
   const source = await fixture('base-url')
   const html = await Maizzle.applyBaseUrl(source, {
-    url: 'https://example.com/',
-    allTags: true,
-    styleTag: true,
-    inlineCss: true
+    url: 'https://example.com/'
   })
 
   t.is(html, await expected('base-url'))
Repository: maizzle/framework
Pull request #878 (2023-01-16 13:43:50)

fix: templates source error
This makes the build error message less confusing when you didn't have a `build.templates.source` defined in the config.

So if you ran `maizzle build imaginary` but had no `config.imaginary.js`, you would have seen this cryptic message:

```
$ maizzle build imaginary
✖ Cannot read properties of undefined (reading 'source')
```

Now you'll get a better error message:

```
$ maizzle build imaginary
✖ No template sources defined in `build.templates`, check your config.imaginary.js file
```



Patch:
diff --git a/src/generators/output/to-disk.js b/src/generators/output/to-disk.js
index 6468327..630a409 100644
--- a/src/generators/output/to-disk.js
+++ b/src/generators/output/to-disk.js
@@ -32,6 +32,11 @@ module.exports = async (env, spinner, config) => {
 
   // Parse each template config object
   await asyncForEach(templatesConfig, async templateConfig => {
+    if (!templateConfig) {
+      const configFileName = env === 'local' ? 'config.js' : `config.${env}.js`
+      throw new Error(`No template sources defined in \`build.templates\`, check your ${configFileName} file`)
+    }
+
     const outputDir = get(templateConfig, 'destination.path', `build_${env}`)
 
     await fs.remove(outputDir)


Test patch:
diff --git a/test/test-todisk.js b/test/test-todisk.js
index d8d6c22..bd996cd 100644
--- a/test/test-todisk.js
+++ b/test/test-todisk.js
@@ -389,7 +389,13 @@ test('local server does not compile unwanted file types', async t => {
 test('throws if it cannot spin up local development server', async t => {
   await t.throwsAsync(async () => {
     await Maizzle.serve('local', {})
-  }, {instanceOf: TypeError})
+  }, {instanceOf: Error})
+})
+
+test('`templates.source` undefined', async t => {
+  await t.throwsAsync(async () => {
+    await Maizzle.build('maizzle-ci')
+  }, {instanceOf: Error})
 })
 
 test('`templates.source` defined as function (string paths)', async t => {
Repository: maizzle/framework
Pull request #1016 (2023-06-07 10:29:21)

Defaults for running `safeClassNames`
This PR changes the way the `safeClassNames` Transformer runs by default.

It now:

- doesn't run when `env` is `local` (developing locally, like with `maizzle serve`)
	- exception: will run locally if explicitly set to `true`
- doesn't run if explicitly disabled (`safeClassNames: false`)

This makes it a little easier to debug when developing locally and inspecting the code - by default now you get to see the Tailwind classes exactly as you wrote them.


Patch:
diff --git a/src/transformers/filters/index.js b/src/transformers/filters/index.js
index 39bdbd1..ecaa4fc 100644
--- a/src/transformers/filters/index.js
+++ b/src/transformers/filters/index.js
@@ -41,7 +41,11 @@ module.exports = async (html, config = {}, direct = false) => {
     posthtmlContent(filters)
   ]
 
-  if (get(config, 'safeClassNames') !== false) {
+  /**
+   * Run `safeClassNames` in filters only when not when developing locally and
+   * `safeClassNames` is not explicitly disabled (set to `false`).
+   */
+  if (get(config, 'env') !== 'local' && get(config, 'safeClassNames') !== false) {
     posthtmlPlugins.push(safeClassNames({
       replacements: {
         '{': '{',
diff --git a/src/transformers/safeClassNames.js b/src/transformers/safeClassNames.js
index 13b1bbe..3019316 100644
--- a/src/transformers/safeClassNames.js
+++ b/src/transformers/safeClassNames.js
@@ -1,20 +1,21 @@
 const posthtml = require('posthtml')
-const {get, merge} = require('lodash')
+const {get, merge, isEmpty} = require('lodash')
 const safeClassNames = require('posthtml-safe-class-names')
 const defaultConfig = require('../generators/posthtml/defaultConfig')
 
 module.exports = async (html, config = {}, direct = false) => {
-  const option = get(config, 'safeClassNames')
-
-  if (option === false) {
-    return html
-  }
-
   /*
-   * Setting it to `true` in the config will run `safeClassNames`
-   * no matter the environment.
+   * Don't run when:
+   * - `config` is falsy or empty
+   * - developing locally and `safeClassNames` is not explicitly `true`
+   * - `safeClassNames` is explicitly `false`
    */
-  if (config.env === 'local' && !option) {
+  if (
+    !config
+    || isEmpty(config)
+    || (get(config, 'env') === 'local' && get(config, 'safeClassNames') !== true)
+    || get(config, 'safeClassNames') === false
+  ) {
     return html
   }
 


Test patch:
diff --git a/test/test-transformers.js b/test/test-transformers.js
index 879a411..5fd4a4f 100644
--- a/test/test-transformers.js
+++ b/test/test-transformers.js
@@ -284,7 +284,7 @@ test('safe class names', async t => {
 })
 
 test('safe class names (disabled)', async t => {
-  const html = await Maizzle.safeClassNames('<div class="sm:text-left">foo</div>', {safeClassNames: false})
+  const html = await Maizzle.safeClassNames('<div class="sm:text-left">foo</div>')
 
   t.is(html, '<div class="sm:text-left">foo</div>')
 })
Repository: dvajs/dva
Pull request #94 (2016-09-19 03:27:02)

Add action type to onEffect
这样，我们就能捕获 effect 级的 loading 状态了。

Related issue:
https://github.com/dvajs/dva-loading/issues/1



Patch:
diff --git a/src/createDva.js b/src/createDva.js
index 8062a5e..d5d1e63 100644
--- a/src/createDva.js
+++ b/src/createDva.js
@@ -268,7 +268,7 @@ export default function createDva(createOpts) {
       }
 
       const onEffect = plugin.get('onEffect');
-      const sagaWithOnEffect = applyOnEffect(onEffect, sagaWithCatch, model);
+      const sagaWithOnEffect = applyOnEffect(onEffect, sagaWithCatch, model, key);
 
       switch (type) {
         case 'watcher':
@@ -324,9 +324,9 @@ export default function createDva(createOpts) {
       };
     }
 
-    function applyOnEffect(fns, effect, model) {
+    function applyOnEffect(fns, effect, model, key) {
       for (const fn of fns) {
-        effect = fn(effect, sagaEffects, model);
+        effect = fn(effect, sagaEffects, model, key);
       }
       return effect;
     }


Test patch:
diff --git a/test/effects-test.js b/test/effects-test.js
index 8bcfc85..9e5e1b4 100644
--- a/test/effects-test.js
+++ b/test/effects-test.js
@@ -203,7 +203,7 @@ describe('effects', () => {
     }).toThrow(/app.start: effect type should be takeEvery, takeLatest or watcher/);
   });
 
-  it.only('onEffect', done => {
+  it('onEffect', done => {
     const SHOW = '@@LOADING/SHOW';
     const HIDE = '@@LOADING/HIDE';
 
@@ -213,6 +213,7 @@ describe('effects', () => {
     let modelNamespace = null;
     // Test onEffect should be run orderly
     let count = 0;
+    let expectedKey = null;
 
     app.use({
       extraReducers: {
@@ -227,7 +228,8 @@ describe('effects', () => {
           }
         },
       },
-      onEffect(effect, { put }, model) {
+      onEffect(effect, { put }, model, key) {
+        expectedKey = key;
         modelNamespace = model.namespace;
         return function*(...args) {
           count = count * 2;
@@ -239,7 +241,7 @@ describe('effects', () => {
     });
 
     app.use({
-      onEffect(effect) {
+      onEffect(effect, { put }, model, key) {
         return function*(...args) {
           count = count + 2;
           yield effect(...args);
@@ -270,6 +272,7 @@ describe('effects', () => {
     app._store.dispatch({ type: 'count/addRemote' });
     expect(app._store.getState().loading).toEqual(true);
     expect(modelNamespace).toEqual('count');
+    expect(expectedKey).toEqual('count/addRemote');
 
     setTimeout(_ => {
       expect(app._store.getState().loading).toEqual(false);
Repository: dvajs/dva
Pull request #351 (2016-12-03 16:34:46)

namespace unique error


Patch:
diff --git a/src/createDva.js b/src/createDva.js
index e920e2a..eed296c 100644
--- a/src/createDva.js
+++ b/src/createDva.js
@@ -74,14 +74,6 @@ export default function createDva(createOpts) {
 
     // inject model dynamically
     function injectModel(createReducer, onError, m) {
-      if (m.namespace) {
-        const hasExisted = this._models.some(model =>
-          model.namespace === m.namespace
-        );
-        if (hasExisted) {
-          return;
-        }
-      }
       m = checkModel(m, mobile);
       this._models.push(m);
       const store = this._store;
@@ -243,6 +235,12 @@ export default function createDva(createOpts) {
         namespace,
         'app.model: namespace should be defined'
       );
+
+      invariant(
+        !app._models.some(model => model.namespace === namespace),
+        'app.model: namespace should be unique'
+      );
+
       invariant(
         mobile || namespace !== 'routing',
         'app.model: namespace should not be routing, it\'s used by react-redux-router'


Test patch:
diff --git a/test/app.model-test.js b/test/app.model-test.js
index 3ce81c7..c23f98d 100644
--- a/test/app.model-test.js
+++ b/test/app.model-test.js
@@ -24,6 +24,18 @@ describe('app.model', () => {
     }).toNotThrow();
   });
 
+  it('namespace: unique error', () => {
+    const app = dva();
+     expect(_ => {
+      app.model({
+        namespace: 'repeat'
+      });
+      app.model({
+        namespace: 'repeat'
+      });
+    }).toThrow(/app.model: namespace should be unique/);
+  });
+
   it('dynamic model', () => {
     let count = 0;
 
@@ -93,8 +105,9 @@ describe('app.model', () => {
     app.model(model);
     app.router(() => 1);
     app.start();
-    app.model(model);
-
-    expect(count).toEqual(1);
+    expect(_ => {
+      app.model(model);
+    }).toThrow(/app.model: namespace should be unique/);
   });
+  
 });
diff --git a/test/reducers-test.js b/test/reducers-test.js
index 6cd8c7f..12afc8c 100644
--- a/test/reducers-test.js
+++ b/test/reducers-test.js
@@ -8,25 +8,25 @@ describe('reducers', () => {
     const app = dva();
     expect(_ => {
       app.model({
-        namespace: '_',
+        namespace: '_array',
         reducers: [{}, () => {}],
       });
     }).toNotThrow();
     expect(_ => {
       app.model({
-        namespace: '_',
+        namespace: '_object',
         reducers: {},
       });
     }).toNotThrow();
     expect(_ => {
       app.model({
-        namespace: '_',
+        namespace: '_neither',
         reducers: '_',
       });
     }).toThrow(/app.model: reducers should be Object or array/);
     expect(_ => {
       app.model({
-        namespace: '_',
+        namespace: '_none',
         reducers: [],
       });
     }).toThrow(/app.model: reducers with array should be app.model\({ reducers: \[object, function\] }\)/);
Repository: donejs/donejs
Pull request #610 (2016-04-05 18:16:06)

Some small changes to finalize CLI for 0.9.0


Patch:
diff --git a/lib/cli/cmd-add.js b/lib/cli/cmd-add.js
index 9221b71..d8f22f3 100644
--- a/lib/cli/cmd-add.js
+++ b/lib/cli/cmd-add.js
@@ -21,6 +21,6 @@ module.exports = function(type, params, options) {
   // handles commands with the following shape `donejs add <name> [params...]`
   else {
     var args = ['add', type].concat(params);
-    return runBinary(args, options);
+    return runBinary(args, options, types);
   }
 };
diff --git a/lib/cli/index.js b/lib/cli/index.js
index ca20bb7..a62edec 100644
--- a/lib/cli/index.js
+++ b/lib/cli/index.js
@@ -7,6 +7,8 @@ var add = require('./cmd-add');
 var init = require('./cmd-init');
 var help = require('./cmd-help');
 
+program.version(require('../../package.json').version);
+
 // donejs add
 program.command('add <type> [params...]')
   .option('-S, --skip-install')
diff --git a/lib/cli/run-binary.js b/lib/cli/run-binary.js
index c602610..3e330d9 100644
--- a/lib/cli/run-binary.js
+++ b/lib/cli/run-binary.js
@@ -3,7 +3,7 @@ var fs = require('fs');
 var path = require('path');
 var utils = require('../utils');
 
-module.exports = function(args, options) {
+module.exports = function(args, options, types) {
   options = options || {};
 
   return utils.projectRoot()
@@ -13,6 +13,11 @@ module.exports = function(args, options) {
 
       if (!fs.existsSync(donejsBinary)) {
         var msg = 'Could not find local DoneJS binary (' + donejsBinary + ')';
+
+        if(args[0] === 'add') {
+          msg += '\nAllowed types for a new project are: ' + (types || []).join(', ');
+        }
+
         return Q.reject(new Error(msg));
       }
 


Test patch:
diff --git a/test/run-binary-test.js b/test/run-binary-test.js
index 3867dcc..2a13342 100644
--- a/test/run-binary-test.js
+++ b/test/run-binary-test.js
@@ -46,8 +46,8 @@ describe('runBinary', function() {
     mockery.deregisterAll();
   });
 
-  it('rejects if binary does not exist', function(done) {
-    runBinary()
+  it('rejects if binary does not exist and adds additional info if the command is `donejs add`', function(done) {
+    runBinary(['add'])
       .then(function() {
         assert(false, 'should have failed');
         done();
@@ -57,6 +57,12 @@ describe('runBinary', function() {
           /Could not find local DoneJS/.test(err.message),
           'it should reject with error'
         );
+
+        assert(
+          /Allowed types for a new project are/.test(err.message),
+          'it should reject with error'
+        );
+        
         done();
       });
   });
Repository: donejs/donejs
Pull request #978 (2017-06-26 22:41:23)

Don’t create a package-lock.json file when installing the CLI
Should fix https://github.com/donejs/donejs/issues/959. I’m submitting this against the [patch branch](https://github.com/donejs/donejs/tree/patch) so I can test a pre-release after this is merged.

coveralls: 
[![Coverage Status](https://:/builds/12142574/badge)](https://:/builds/12142574)

Coverage remained the same at 96.396% when pulling **a5929c781c27d45cccbf92411d6b90a539bb702e on 959-npm-5** into **9562d3aadc778c91df202b6a5c26b9de1131669c on patch**.


Patch:
diff --git a/.travis.yml b/.travis.yml
index c7b1507..edd7635 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,6 +9,7 @@ node_js:
 - 4
 - 6
 - 7
+- 8
 notifications:
   slack:
     secure: TAq0S0FA/OXtLjmIlJsytzz5WMB5L2QEedW7q+rAhKHg+w9FXOkE9guP72yLe92hKLMAsitD4OSACOtIR3QSSGNden/eKYQEVikCeNKOIO/FoHOrPTkXHfW1/2ihIvOBF2NaEvIGZsjwr12wIewSSM5VrdKwl1skgd0K7CoY/Uw=
diff --git a/lib/cli/cmd-init.js b/lib/cli/cmd-init.js
index 0d728b5..0e656c1 100644
--- a/lib/cli/cmd-init.js
+++ b/lib/cli/cmd-init.js
@@ -29,7 +29,7 @@ module.exports = function(folder, opts) {
 // install donejs-cli
 function installCli(version, options) {
   var pkg = 'donejs-cli@' + utils.versionRange(version);
-  var npmArgs = [ 'install', pkg, '--loglevel', 'error' ];
+  var npmArgs = [ 'install', pkg, '--no-package-lock', '--loglevel', 'error' ];
   return utils.spawn('npm', npmArgs, options);
 }
 


Test patch:
diff --git a/test/cmd-init-test.js b/test/cmd-init-test.js
index c5b4f74..91c6647 100644
--- a/test/cmd-init-test.js
+++ b/test/cmd-init-test.js
@@ -89,7 +89,7 @@ describe('cli init cmd', function() {
 
         assert.equal(installCliCall.binary, 'npm');
         assert.deepEqual(installCliCall.args, [
-          'install', 'donejs-cli@latest', '--loglevel', 'error'
+          'install', 'donejs-cli@latest', '--no-package-lock', '--loglevel', 'error'
         ]);
 
         assert.deepEqual(runBinaryCall.args, ['init']);
@@ -121,4 +121,3 @@ describe('cli init cmd', function() {
     }
   }
 });
-
Repository: donejs/donejs
Pull request #990 (2017-07-05 18:40:12)

Add Node 8 to Travis
While https://github.com/donejs/donejs/issues/977 is still being worked out, we can at least turn on Node 8 for Travis and get a new release out the door that fixes the Node 8 issues.


Patch:
diff --git a/.travis.yml b/.travis.yml
index c7b1507..edd7635 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,6 +9,7 @@ node_js:
 - 4
 - 6
 - 7
+- 8
 notifications:
   slack:
     secure: TAq0S0FA/OXtLjmIlJsytzz5WMB5L2QEedW7q+rAhKHg+w9FXOkE9guP72yLe92hKLMAsitD4OSACOtIR3QSSGNden/eKYQEVikCeNKOIO/FoHOrPTkXHfW1/2ihIvOBF2NaEvIGZsjwr12wIewSSM5VrdKwl1skgd0K7CoY/Uw=
diff --git a/lib/cli/cmd-init.js b/lib/cli/cmd-init.js
index 0d728b5..a583999 100644
--- a/lib/cli/cmd-init.js
+++ b/lib/cli/cmd-init.js
@@ -29,7 +29,7 @@ module.exports = function(folder, opts) {
 // install donejs-cli
 function installCli(version, options) {
   var pkg = 'donejs-cli@' + utils.versionRange(version);
-  var npmArgs = [ 'install', pkg, '--loglevel', 'error' ];
+  var npmArgs = [ 'install', pkg, '--no-shrinkwrap', '--loglevel', 'error' ];
   return utils.spawn('npm', npmArgs, options);
 }
 


Test patch:
diff --git a/test/cmd-init-test.js b/test/cmd-init-test.js
index c5b4f74..1bc8ba2 100644
--- a/test/cmd-init-test.js
+++ b/test/cmd-init-test.js
@@ -89,7 +89,7 @@ describe('cli init cmd', function() {
 
         assert.equal(installCliCall.binary, 'npm');
         assert.deepEqual(installCliCall.args, [
-          'install', 'donejs-cli@latest', '--loglevel', 'error'
+          'install', 'donejs-cli@latest', '--no-shrinkwrap', '--loglevel', 'error'
         ]);
 
         assert.deepEqual(runBinaryCall.args, ['init']);
@@ -121,4 +121,3 @@ describe('cli init cmd', function() {
     }
   }
 });
-
Repository: donejs/donejs
Pull request #1044 (2017-10-30 17:35:00)

Install the beta version of donejs-cli
<!--
Thanks for your contribution!

Please make sure your pull request (PR) includes documentation and/or test updates.

In this PR description, please include a link to the issue(s) your PR addresses. If you include the issue number(s) in your commit(s), GitHub can automatically close the original issue(s): https://help.github.com/articles/closing-issues-via-commit-messages/

If applicable, please include a screenshot or gif to demonstrate your change. This makes it easier for reviewers to verify that it works for them. You can use LICEcap to make a gif: http://www.cockos.com/licecap/
-->



Patch:
diff --git a/.travis.yml b/.travis.yml
index 50d22e8..68d5e3e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,9 +7,7 @@ before_install:
 - export DISPLAY=:99.0
 - sh -e /etc/init.d/xvfb start
 node_js:
-- 4
 - 6
-- 7
 - 8
 notifications:
   slack:
diff --git a/appveyor.yml b/appveyor.yml
index a15763e..29bb7bb 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -2,16 +2,15 @@
 environment:
   matrix:
   # node.js
-  - nodejs_version: "4"
   - nodejs_version: "6"
-  - nodejs_version: "7"
+  - nodejs_version: "8"
 
 # Install scripts. (runs after repo cloning)
 install:
   # Get the latest stable version of Node.js or io.js
   - ps: Install-Product node $env:nodejs_version
   # install modules
-  - npm cache clean
+  - npm cache clean --force
   - npm set registry http://registry.npmjs.org/
   - npm install
 
diff --git a/lib/cli/cmd-init.js b/lib/cli/cmd-init.js
index a583999..5f3636a 100644
--- a/lib/cli/cmd-init.js
+++ b/lib/cli/cmd-init.js
@@ -28,7 +28,7 @@ module.exports = function(folder, opts) {
 
 // install donejs-cli
 function installCli(version, options) {
-  var pkg = 'donejs-cli@' + utils.versionRange(version);
+  var pkg = 'donejs-cli@' + 'beta';
   var npmArgs = [ 'install', pkg, '--no-shrinkwrap', '--loglevel', 'error' ];
   return utils.spawn('npm', npmArgs, options);
 }


Test patch:
diff --git a/test/cmd-init-test.js b/test/cmd-init-test.js
index 1bc8ba2..cfcebdc 100644
--- a/test/cmd-init-test.js
+++ b/test/cmd-init-test.js
@@ -89,7 +89,7 @@ describe('cli init cmd', function() {
 
         assert.equal(installCliCall.binary, 'npm');
         assert.deepEqual(installCliCall.args, [
-          'install', 'donejs-cli@latest', '--no-shrinkwrap', '--loglevel', 'error'
+          'install', 'donejs-cli@beta', '--no-shrinkwrap', '--loglevel', 'error'
         ]);
 
         assert.deepEqual(runBinaryCall.args, ['init']);
Repository: donejs/donejs
Pull request #1177 (2019-04-23 19:25:25)

Handle creating folder structure for scoped projects
This enables creating plugins with scoped names:
```bash
donejs add plugin @bitovi/my-plugin
```
will create a folder called `my-plugin`.

Ref - https://github.com/donejs/donejs/issues/1176


Patch:
diff --git a/lib/utils.js b/lib/utils.js
index 35b6281..412009d 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -13,18 +13,22 @@ exports.mkdirp = function(folder) {
   var dfd = Q();
   var current = '';
 
-  parts.forEach(function(part) {
-    var myPath = path.join(current, part);
-
-    current = myPath;
-
-    var resolve = function() {
-      return myPath;
-    };
-
-    dfd = dfd.then(function() {
-      return Q.nfcall(fs.mkdir, myPath).then(resolve, resolve);
-    });
+  parts.forEach(function(part, index) {
+    // If we are using scoped names like "@bitovi/my-plugin"
+    // Only create the folder for "my-plugin" and exclude the scoping
+    if ((index === 0 && part.indexOf('@') === -1) || index > 0) {
+      var myPath = path.join(current, part);
+  
+      current = myPath;
+  
+      var resolve = function() {
+        return myPath;
+      };
+
+      dfd = dfd.then(function() {
+        return Q.nfcall(fs.mkdir, myPath).then(resolve, resolve);
+      });
+    }
   });
 
   return dfd.then(function(myPath) {


Test patch:
diff --git a/test/utils-test.js b/test/utils-test.js
index d58f959..ceadb96 100644
--- a/test/utils-test.js
+++ b/test/utils-test.js
@@ -23,6 +23,13 @@ describe('utils tests', function() {
         assert.equal(folderPath, process.cwd());
       });
   });
+  
+  it('mkdirp ignores scoped project name', function() {
+    return utils.mkdirp('@bitovi/test')
+      .then(function(folderPath) {
+        assert.equal(folderPath, path.join(process.cwd(), 'test'));
+      });
+  });
 
   it('spawns successfully', function(done) {
     var cwd = path.join(__dirname, '..');