ember-codemod-v1-to-v2 0.7.2-alpha.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-codemod-v1-to-v2",
3
- "version": "0.7.2-alpha.1",
3
+ "version": "0.7.2",
4
4
  "description": "Codemod to convert Ember addons to v2 addon format",
5
5
  "keywords": [
6
6
  "codemod",
@@ -71,13 +71,13 @@
71
71
  }
72
72
  },
73
73
  "scripts": {
74
- "build": "tsc --project tsconfig.build.json && chmod +x dist/bin/ember-codemod-v1-to-v2.js && cp -r src/blueprints dist/src/blueprints",
74
+ "build": "./build.sh --production",
75
75
  "changelog": "lerna-changelog",
76
76
  "lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
77
77
  "lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
78
78
  "lint:js": "eslint . --cache",
79
79
  "lint:js:fix": "eslint . --fix",
80
80
  "lint:types": "tsc --noEmit",
81
- "test": "tsc --build && cp -r src/blueprints dist-for-testing/src/blueprints && mt dist-for-testing --quiet"
81
+ "test": "./build.sh --test && mt dist-for-testing --quiet"
82
82
  }
83
83
  }
@@ -1,8 +0,0 @@
1
- # unconventional js
2
- /blueprints/*/files/
3
-
4
- # compiled output
5
- /dist/
6
-
7
- # misc
8
- /coverage/
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- const { addonV1Shim } = require('@embroider/addon-shim');
4
-
5
- module.exports = addonV1Shim(__dirname);
@@ -1,9 +0,0 @@
1
- {
2
- <% if (options.packages.addon.hasTypeScript) { %> "presets": [["@babel/preset-typescript"]],
3
- <% } %> "plugins": [
4
- "@embroider/addon-dev/template-colocation-plugin",<% if (options.packages.addon.hasTypeScript) { %>
5
- ["@babel/plugin-transform-typescript", { "allowDeclareFields": true }],<% } %>
6
- ["@babel/plugin-proposal-decorators", { "version": "legacy" }],
7
- "@babel/plugin-proposal-class-properties"
8
- ]
9
- }
@@ -1,64 +0,0 @@
1
- <% if (options.packages.addon.hasTypeScript) { %>import typescript from 'rollup-plugin-ts';<% } else { %>import { babel } from '@rollup/plugin-babel';<% } %>
2
- import copy from 'rollup-plugin-copy';
3
- import { Addon } from '@embroider/addon-dev/rollup';
4
-
5
- const addon = new Addon({
6
- srcDir: 'src',
7
- destDir: 'dist',
8
- });
9
-
10
- export default {
11
- // This provides defaults that work well alongside `publicEntrypoints` below.
12
- // You can augment this if you need to.
13
- output: addon.output(),
14
-
15
- plugins: [
16
- // These are the modules that users should be able to import from your
17
- // addon. Anything not listed here may get optimized away.
18
- addon.publicEntrypoints([<%= context.addon.publicEntrypoints.map((filePath) => `'${filePath}'`).join(', ') %>]),
19
-
20
- // These are the modules that should get reexported into the traditional
21
- // "app" tree. Things in here should also be in publicEntrypoints above, but
22
- // not everything in publicEntrypoints necessarily needs to go here.
23
- addon.appReexports([<%= context.addon.appReexports.map((filePath) => `'${filePath}'`).join(', ') %>]),
24
-
25
- // Follow the V2 Addon rules about dependencies. Your code can import from
26
- // `dependencies` and `peerDependencies` as well as standard Ember-provided
27
- // package names.
28
- addon.dependencies(),
29
-
30
- <% if (options.packages.addon.hasTypeScript) { %> // compile TypeScript to latest JavaScript, including Babel transpilation
31
- typescript({
32
- transpiler: 'babel',
33
- browserslist: false,
34
- transpileOnly: false,
35
- }),
36
- <% } else { %> // This babel config should *not* apply presets or compile away ES modules.
37
- // It exists only to provide development niceties for you, like automatic
38
- // template colocation.
39
- //
40
- // By default, this will load the actual babel config from the file
41
- // babel.config.json.
42
- babel({
43
- babelHelpers: 'bundled',
44
- }),
45
- <% } %>
46
- // Ensure that standalone .hbs files are properly integrated as Javascript.
47
- addon.hbs(),
48
-
49
- // addons are allowed to contain imports of .css files, which we want rollup
50
- // to leave alone and keep in the published output.
51
- addon.keepAssets(['**/*.css']),
52
-
53
- // Remove leftover build artifacts when starting a new build.
54
- addon.clean(),
55
-
56
- // Copy Readme and License into published package
57
- copy({
58
- targets: [
59
- { src: '../README.md', dest: '.' },
60
- { src: '../LICENSE.md', dest: '.' },
61
- ],
62
- }),
63
- ],
64
- };
@@ -1,14 +0,0 @@
1
- // Add any types here that you need for local development only.
2
- // These will *not* be published as part of your addon, so be careful that your published code does not rely on them!
3
- <% if (options.packages.addon.hasGlint) { %>
4
- import '@glint/environment-ember-loose';
5
-
6
- declare module '@glint/environment-ember-loose/registry' {
7
- // Remove this once entries have been added! 👇
8
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
9
- export default interface Registry {
10
- // Add any registry entries from other addons here that your addon itself uses (in non-strict mode templates)
11
- // See https://typed-ember.gitbook.io/glint/using-glint/ember/using-addons
12
- }
13
- }
14
- <% } %>
@@ -1,24 +0,0 @@
1
- # compiled output
2
- /dist/
3
-
4
- # dependencies
5
- /node_modules/
6
-
7
- # misc
8
- /.env*
9
- /.pnp*
10
- /.eslintcache
11
- /coverage/
12
- /npm-debug.log*
13
- /testem.log
14
- /yarn-error.log
15
-
16
- # ember-try
17
- /.node_modules.ember-try/
18
- /npm-shrinkwrap.json.ember-try
19
- /package.json.ember-try
20
- /package-lock.json.ember-try
21
- /yarn.lock.ember-try
22
-
23
- # broccoli-debug
24
- /DEBUG/
@@ -1,16 +0,0 @@
1
- 'use strict';
2
-
3
- const EmberApp = require('ember-cli/lib/broccoli/ember-app');
4
-
5
- module.exports = function (defaults) {
6
- const app = new EmberApp(defaults, {
7
- // Add options here
8
- autoImport: {
9
- watchDependencies: ['<%= options.packages.addon.name %>'],
10
- },
11
- });
12
-
13
- const { maybeEmbroider } = require('@embroider/test-setup');
14
-
15
- return maybeEmbroider(app);
16
- };
@@ -1,7 +0,0 @@
1
- // Types for compiled templates
2
- declare module '<%= options.packages.testApp.name %>/templates/*' {
3
- import { TemplateFactory } from 'ember-cli-htmlbars';
4
-
5
- const tmpl: TemplateFactory;
6
- export default tmpl;
7
- }
@@ -1,69 +0,0 @@
1
- <% if (options.packageManager.isNpm) { %>{
2
- "name": "<%= options.packages.addon.name %>",
3
- "version": "<%= options.packages.addon.version %>",
4
- "private": true,
5
- "repository": "",
6
- "license": "MIT",
7
- "author": "",
8
- "workspaces": [
9
- "<%= options.locations.addon %>",
10
- "<%= options.locations.testApp %>"
11
- ],
12
- "scripts": {
13
- "build": "npm run build --workspace <%= options.packages.addon.name %>",
14
- "lint": "npm run lint --workspaces --if-present",
15
- "lint:fix": "npm run lint:fix --workspaces --if-present",
16
- "prepare": "npm run build",
17
- "start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
18
- "start:addon": "npm start --workspace <%= options.packages.addon.name %>",
19
- "start:test-app": "npm start --workspace <%= options.packages.testApp.name %>",
20
- "test": "npm run test --workspaces --if-present"
21
- },
22
- "devDependencies": {
23
- "concurrently": "<%= context.projectRoot.devDependencies['concurrently'] %>"
24
- }
25
- }<% } else if (options.packageManager.isPnpm) { %>{
26
- "name": "<%= options.packages.addon.name %>",
27
- "version": "<%= options.packages.addon.version %>",
28
- "private": true,
29
- "repository": "",
30
- "license": "MIT",
31
- "author": "",
32
- "scripts": {
33
- "build": "pnpm --filter <%= options.packages.addon.name %> build",
34
- "lint": "pnpm --filter '*' lint",
35
- "lint:fix": "pnpm --filter '*' lint:fix",
36
- "prepare": "pnpm build",
37
- "start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
38
- "start:addon": "pnpm --filter <%= options.packages.addon.name %> start",
39
- "start:test-app": "pnpm --filter <%= options.packages.testApp.name %> start",
40
- "test": "pnpm --filter '*' test"
41
- },
42
- "devDependencies": {
43
- "concurrently": "<%= context.projectRoot.devDependencies['concurrently'] %>"
44
- }
45
- }<% } else if (options.packageManager.isYarn) { %>{
46
- "name": "<%= options.packages.addon.name %>",
47
- "version": "<%= options.packages.addon.version %>",
48
- "private": true,
49
- "repository": "",
50
- "license": "MIT",
51
- "author": "",
52
- "workspaces": [
53
- "<%= options.locations.addon %>",
54
- "<%= options.locations.testApp %>"
55
- ],
56
- "scripts": {
57
- "build": "yarn workspace <%= options.packages.addon.name %> run build",
58
- "lint": "yarn workspaces run lint",
59
- "lint:fix": "yarn workspaces run lint:fix",
60
- "prepare": "yarn build",
61
- "start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
62
- "start:addon": "yarn workspace <%= options.packages.addon.name %> run start",
63
- "start:test-app": "yarn workspace <%= options.packages.testApp.name %> run start",
64
- "test": "yarn workspaces run test"
65
- },
66
- "devDependencies": {
67
- "concurrently": "<%= context.projectRoot.devDependencies['concurrently'] %>"
68
- }
69
- }<% } %>
@@ -1,3 +0,0 @@
1
- packages:
2
- - '<%= options.locations.addon %>'
3
- - '<%= options.locations.testApp %>'